LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuously Updating Graph

Hi,
 I would like to have my graph continuously updating, in between data point acquisitions. I tried appending the single data points into an array and write it to the graph after every data point, but the graph overwrite the old data... How can this be done?
 
Also, I would like to plot error bars on my graph for every data point. Every data point comes with a mean and an error in the form of a 1D array. Is there an error bar function? Or should i simply plot two extra points, one below and one above, for every data point i have?
 
Thanks
aleks.
0 Kudos
Message 1 of 4
(3,062 Views)
When you say "continuously updating" are you referring to something like a strip chart, which scrolls the graph as new data is written, or are you talking about a chart that you write new data to? For the strip chart method you need to use the "Waveform Chart" control. In your VI you're using a "Waveform Graph" control, so you need to use a shift register to remember the last data and append your new value(s) to that data, and write this new appended information to the graph. I did not see anywhere in your VI where you are doing that. It seems as if that's the basic reason for your problem.

As for error bars, take a look at this example as well as this post.
0 Kudos
Message 2 of 4
(3,027 Views)
Hi,
Im not sure how to implement the shift registers... it keeps adding new dimensions to my existing array instead of appending to it in the existing dimensions.
 
Here is how my program works for now.:
1- User gets prompted. When enter is pressed, NI-5122 takes a stream of data
2- SubVI does error analysis and spits out a MEAN and an ERROR. I only want to plot the mean.
3- I have the graph configured with a set MULTIPLIER and OFFSET,
4- The WHILE loop reiterates and the process starts again.
 
 so all I need to add is one data point to add to the graph  for every while loop iteration
( but my graph keeps overwriting the old data)
 
Any thoughts?
Thanks
aleks.
 
PS: in the program i attached, the graph in question is the lower one.  
0 Kudos
Message 3 of 4
(2,999 Views)

Ok, I got it to work.... forget about what i just wrote.

 

0 Kudos
Message 4 of 4
(2,992 Views)