Announcement

Collapse
No announcement yet.

Using Scope in ViSi

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Scope in ViSi

    Hi,

    I'm new to 4d displays, but so far I'm not finding anything pertaining to my issue. I'm using a diablo16 35DT in the ViSi environment.

    I'd like to plot an analogue input using the scope. Getting the analogue input is no problem, but I cannot find much documentation about using the Scope widget in ViSi. Can somebody provide some links/tutorials?


    Thanks

  • #2
    Hi,

    There are 2 scope examples in Workshop that may help. You can find them by clicking on File, then Samples and then click on Diablo Designer.

    When the folder opens you will find 2 Designer files,

    Scope
    Scope2

    I hope this helps

    Best regards

    Paul

    Comment


    • #3
      Hi,

      There is also this appnote that you may find useful

      https://4dsystems.com.au/blog/4d-an-00028/

      Best regards

      Paul

      Comment


      • #4
        I think those designer files are above my current understanding. The ViSi-Genie appnote makes it seem pretty simple, but i'm using ViSi.

        To begin with, I cannot seem to compile the program after pressing "paste code" and draw the empty scope, since it appears to be missing the function Graticule( ). Is there a file i should include to get this to work?

        I'm also not clear on a lot of the functions used when you paste the scope code. Presumably once initialized and in a loop, all I need are the Graticule, gfx_Scope, and gfx_Hline functions. I've added my current understanding of each line when using the "paste code" after putting a scope on the display.


        // Scope1 1.0 generated 2019-11-28 9:33:05 AM
        // Create empty initial scope
        gfx_RectangleFilled(36, 44, 310, 175, BLACK) ; //this appears to draw the background as a black rectangle
        gfx_Hline(44 + 60, 36, 310, 0x171D) ; //draws a horizontal line, not exactly clear for what
        Graticule(36, 44, 310, 175, 10, 10, 0x0280) ; //this function doesn't appear to be defined
        // draw and update scope
        Graticule(36, 44, 310, 175, 10, 10, 0x0280) ; //again, I don't know what this function does
        gfx_Scope(36, 275, 175, 275, 0, 100, BLACK, //This appears to be the function that does most of what i need, though I have not wrapped my head around its 19 parameters.
        old_y1, new_y1, LIME, 0,0,0, 0,0,0, 0,0,0 ) ;
        gfx_Hline(44 + 60, 36, 310, 0x171D) ; //draws another horizontal line, not clear for what


        Ideally I'd like to start with a program loop that just puts a new int value on the scope every second and ends when the entire width of the scope is full.

        I guess I'm not really clear on where to begin modifying or understanding the sample code. The sample code in workshop contains a number of other variables/functions that I'm having trouble understanding the use of. Is there a functional block diagram for how the Scope works?

        Thanks again, apologies if these are silly questions, or if I have fundamentally misunderstood how to use the scope.

        Comment


        • #5
          is all the data supposed to be written into the buffer then the scope refreshed? Still confused and I cannot, for the life of me, locate a tutorial on using the gfx_scope function. It does not have an example in the diablo16 internal functions manual either. The manual states [After the waveform is drawn, "newy" buffer is automatically copied to "oldy" buffer. So i need to declare two variables, old_y and new_y of equal size with the scope "width". then i write data in to new_y then call gfx_scope to display that data?

          Comment


          • #6
            Hi,

            I have an example that I made a while ago that does exactly what you want. None of your questions are silly, it can be quite complex to work out.

            Please bear with me a short while and I will send it to you as soon as I locate it.

            Best regards

            Paul

            Comment


            • #7
              Hi Paul,

              Any luck in finding that example?

              thanks

              Comment


              • #8
                Hi,

                Sorry for the delay, I know which drive it is on so I will be able to retrieve it today.

                Best regards

                Paul

                Comment


                • #9
                  Hi Paul,

                  If you have a chance today, it would be very appreciated.

                  Thanks

                  Comment


                  • #10
                    Hi,

                    I found the example on my old hard drive that crashed a while ago. I just tried the example and it might not be what you want but we could possibly fix / modify it. I have attached the example below.

                    Best regards

                    Paul
                    Attached Files

                    Comment

                    Working...
                    X