LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

plot data acquired in a loop in real time

Hello,

I am acquiring data, and doing some basic processing inside a loop. I would like to plot this data in a real-time way every time the loop executes i.e. data on y, loop iteration on x, and have the plot show data from previous loop iterations too  (not just the current one). I'm trying this using shift registers and arrays to clusters, but what shows up on my plot is a single point that updates every loop iteration. I can get what I want, superficially, by just putting the data on a waveform graph, but that updates with time and not loop count. I have also tried plotting the data array directly, but I haven't had success with that either.

 

I've attached my vi, and the relevant part to this question is at the bottom of the case structure.

 

Thank you!

0 Kudos
Message 1 of 3
(3,371 Views)

I must admit I'm not entirely sure what exactly you are after, but it seems you are pretty close. Rather then increment a shift register just use the iteration counter from the loop. I think the following snippet should clarify things.

 

Loop Plot.png

 

But for future reference, it makes life easier to diagnose if you can strip down your VI to the area that is experiencing issues and provide example data.

0 Kudos
Message 2 of 3
(3,352 Views)

Just use a Chart instead of a graph.  Charts has a history built in.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(3,348 Views)