No announcement yet.

Graphic possibilities

  • Filter
  • Time
  • Show
Clear All
new posts

  • Graphic possibilities

    Hi everyone !

    I've got a 43PT display screen and I need to plot a spectrometric graph which needs to have 1024 values on the abciss axe and as many as possible on the y axe...

    Actually I need it to be ploted in log mode but according to my understanding, it's not really possible with the visie genie mode. Maybe with the serial mode ?

    I would like to know how I can plot my figure in real time, is it possible in the visie genie mode ? Like connecting two inputs, one to the x and the other to the y axes ? If it's not, is there a library available for graphs ?

    In the demos of scopes there's .hex files which can be uploaded to plot figures (with gtk), I hope it's possible to just send datas and plot it in the scope ?

    To resume, I have a raspberry pi which receives datas and I need to send them on the display in a graphical form...

    Thanks you !

    Ps : sorry for my english, french people are not very good at english !

  • #2
    Well, the display is only 480x272, so really the most you can display is 480 across. To show 1024 at once you will need to compress it somehow, whether that means the average, maximum, or some other calculation based on 3 measurements at a time is up to you.

    To display log values you need to 'convert' them into linear values in your controller before passing them to picaso. There are no Analogue ports on Picaso, so you need to pass the values using Genie or serial.

    From what you have said so far, Genie would appear to be your best bet.

    Yeah, play with the demos and GTX and get it looking like what you are after, then try sending the same information from your Pi.

    Gee, your English is good, I barely noticed that you weren't a native English writer.


    • #3
      Thanks for the compliment !

      Well I'm trying the visi mode, it looks like it offers more freedom to communicate with my raspberry pi, but I'm having un issue... I'm not able to communicate with my raspberry with a serial communication. Here is my code :


      // Strings1 1.1 generated 24/09/2014 14:22:20
      txt_FontID(FONT1) ; // Font index correct at time of code generation
      txt_FGcolour(WHITE) ;
      txt_BGcolour(0x4208) ;
      gfx_MoveTo(150 , 92) ;

      data_in := serin();
      if (data_in != -1)
      print(data_in) ;

      In My raspberry pi, I use this C code :

      int main(){
      open ('/home/file.txt', O_RDWR );
      serialOpen("/dev/ttyAMA0", 9600);
      serialPutchar(fd, 'c');
      return 0;

      Everytime I lunch my C program, I receive "255" on my display... any idea ? (I fixed the baud rate in the inittab file)

      You said that the visie genie mode seems to be the more appropriate for my app, do you know a C function wich can send datas immediatly on the x and y axes on the scope widget ? Frome the VisieGenieLibrary maybe ?

      Thanks !


      • #4
        Do you just get 255, or do you get 25599?

        When you use the 4D terminal program and type c you should just get 99.

        As well as the scope demos I mentioned earlier there is also this the way genie uses the scope it only receives y and x is generated automatically. If you need to play with x+y individually you will need ViSi.



        • #5
          I only receive 255.

          The pdf doesn't show how to send y values from the raspberry pi...

          Is there a visi specific library for serial communication ?


          • #6
            In ViSi you send serial data any way you want to, as you end up coding 'both ends', so you can develop your own protocol.

            Not sure about the 255, I'll see if I can find someone who is more familiar with the Pi.


            • #7

              You could try recreating your project in ViSi Genie. There is an existing library for ViSi-Genie and Raspberry Pi communication, here is the link:


              You can also refer to this app note for ViSi-Genie Pi connection


              Here is the format in writing to the scope object using Genie Pi library:

              genieWrite(GENIE_OBJ_SCOPE, 0, 2);
              0 = index
              2 = value

              If you want to use ViSi, can you send the library you used for serialOpen and serialPutchar? so we can help you to develop your own communication protocol.


              • #8
                Hi there !

                I finally chose the VisiGenie mode to plot my spectrum and it worked !

                The problem is that I'm having refresh issues... When I go back to the welcoming page while the spectrum is still sent on the histo page, there's interferency... do you have un idea of how to avoid it ?

                Thanks !
                Attached Files


                • #9
                  The documentation says:-

                  "Values can only be meaningfully be written to a Spectrum whilst its form is displayed." There are a couple of other notes there as well, that are probably relevant to what you are doing.

                  It would appear you are still writing to the spectrum after another form is displayed. You need to suppress this by tracking the current form in your program.


                  • #10
                    Here we go! Thanks !