LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot XY graph from while loop

I am trying to make a curve tracer with a DC power supply, DAQ, and Labview 7.1. Everything is ok, until I want to plot an x-y plot from a while loop. I can do this function fine using a for loop and cluster cells, but I need the while loop for the interruption function. When I change to the while loop, it had data formating issues, but I believe I have it to something that should work. It seems like my xy plots want to graph (the auto scale moves the axis respectively) but I do not get a line. I'm not sure if Labview is seing this as just one point and not an array, or if there is a labview bug. Attached is my code with a few different trials to make an xy plot. If anyone can be of help I would be very thankful.

-Jon
0 Kudos
Message 1 of 2
(3,714 Views)
If it works in a FOR loop, but nor in a while loop, most likely your output tunnels are not autoindexing (FOR: on by default, WHILE: off by default). Right-click on the output tunnels and select "enable indexing".

If you want to watch your graph update during the while loop, you could accumulate your x and y data in a shift register and graph it. (See attached modification).
0 Kudos
Message 2 of 2
(3,709 Views)