LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to draw a graph step by step ?

Hi, sirs,

Can you tell me how to draw a graph step by step by using Labview 6.0 ? On one step, I create two variables : one variable is used for X-axis, and other variable is used for Y-axis. Can you give me a simple example ?
Thanks a lot.
0 Kudos
Message 1 of 6
(3,822 Views)
Hi,

unfortunataly I'm not "Sir xxx" , but let's go.

Find attached a sweep.vi - normally used for a GPIB-Instrument - but now sterilized for "test".
There you will find a possible solution, how to show measurement results and how to append Data.
You should play with it; remove the local variables - introduced for show effect only.

regards
wha
0 Kudos
Message 2 of 6
(3,822 Views)
Hi,

Try this VI I created. I am assuming you want an "X-Y" graph since you have two variables (so you are not plotting normal functions, but maybe polar functions instead?)

The VI is easy to use. Choose an X and Y value and then click "plot." Do this multiple times. It's like one of those toys, etch-a-sketch.
0 Kudos
Message 3 of 6
(3,822 Views)
Hi, David Duffey,
Thank you for your answer,and I use your example and it is good. But in your program, on the outer loop, there are two small orange color squares in which there is one triangle. I don't know how to add these squares and triangle. Without them, the graph doesn't work. So, can you tell me how to add them ?
Thanks a lot.
0 Kudos
Message 4 of 6
(3,822 Views)
The triangle is called a shift register, you right click on the edge of a while loop and select "add shift register."

Once you wire a data type to it, the shift register will change color. The "two orange squares" are simply constants. Or, an array of clusters of two doubles. You can see how I build it up in the loop. I take two doubles, bundle them together, append them into an array, and then wire it to the "up" triangle (right side of loop). I then right click on the "down arrow" and selected "create constant" so that the shift register is cleared every time the VI is run.

I hope this points you in the right direction. There is information in the LabVIEW user manual on shift registers, clusters and arrays that should help you out.

0 Kudos
Message 5 of 6
(3,822 Views)
Hi, David Duffey,
Thanks a lot. I get it. It works right now.
0 Kudos
Message 6 of 6
(3,822 Views)