Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot waterfall graph in vb6 from offline data

How to plot waterfall graph in vb6 from offline data?The data load from SQL Server Database.Thanks.
0 Kudos
Message 1 of 9
(11,027 Views)

Hello,

If you want to plot data using Measurement Studio for VS6 you can use the CWGraph3D object.  There are examples that ship with Measurement Studio you can review to see how this object and its members are used.  You can find them here: C:\Documents and Settings\All Users\Documents\National Instruments\MStudioVS6\VB\Samples\3DGraph.  Pulling data from a database in VB6 is a generic VB functionality and not a part of the Measurement Studio library.  This website seems to have some good resources on that subject.  If you have any more specific questions about getting the data into the graph or problems with the graph feel free to post them and we can help you out.

John B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(11,016 Views)
asrol,
 
If you look at the Plot Styles example in the folder I mentioned in the previous post there is a section of code there that you might want to refer to in order to recreate your data.
 
'=============================================================================
' Plot Curve Button Handler
'=============================================================================

Private Sub PlotCurve_Click()
    ' Create curve data
    Dim x(40)
    Dim y(40)
    Dim z(40)
    For i = 0 To 40
        x(i) = Sin(i / 3#)
        y(i) = Cos(i / 3#)
        z(i) = i
    Next i
...
 
In this example they create 3 arrays to represent the three dimensions of the array. For your case if you were to plug your data into two of the array (axes) that would give you the data for the channels, then you can simply input a constant for the third array it would produce a single line of your data as shown in your example GIF.  You can then repeat this process for each set of data, with a new constant value for that third axis, and it should manually create a graph that will look something like you desire.
John B.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 9
(10,989 Views)

Thank John,

             

 

0 Kudos
Message 4 of 9
(10,972 Views)

John,

 Can you give me specified example. I am not understand the example that you give to me. I am not familiar with array.Thanks. 

0 Kudos
Message 5 of 9
(10,964 Views)
How to plot FFT Waterfall using cwgraph3d in vb6. What is formula to plot it.Thanks.
0 Kudos
Message 6 of 9
(10,903 Views)

asrol,

If you want some help in understanding arrays I would recommend searching online as there are many existing resources out there that would give you an overview of the concept and even contain some example code.

All of the Plot3D methods accept arrays (1D or 2D) as the function parameters.  If you want to plot your data you will need to ensure it is in an array in order to properly plot the data.  Therefore you can take your data, copy it into an array, and (maybe in a manner similar to that outlined in my previous post) plot those arrays on the 3D graph.  You can find all the Plot3D function parameters in the Measurement Studio 3D Graph help to see what data types a specific function would accept.  For most curves you could use something like CWGraph3D1.Plot3DCurve x, y, z (where x,y & z are your three arrays).

John B.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 9
(10,880 Views)

Thanks John,

                     How about printing function? How to Print Preview and select Printer in vb6. Can i using cwgraph3d to plot Orbital Plot. What is the formula to plot this graph.Thanks. 

0 Kudos
Message 8 of 9
(10,854 Views)
The printing and print preview would be information you can probably find by searching the internet, since its not Measurement Studio specific.  There is one KnowledgeBase article that talks about printing Graphs from Measurement Studio that may be helpful if you decide to do that. For the answer to the question of graphing an Orbital Plot you can check this thread which contains the same question.
John B.
Applications Engineer
National Instruments
0 Kudos
Message 9 of 9
(10,752 Views)