LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how plot data after it's been removed from buffer

I was wondering if anyone knew a way to pull old data for a plot after it's been removed from the buffer.  Basically, I have a waveform graph and a FIFO buffered 1D array that is being continuously updated and fed to the graph... lets say it has allocated space to store 60 datapoints, once it's full the older datapoints are removed as the new ones come in... now my question is, if this thing is plotting at 1 sample per second, there is 1 minute worth of data in my buffer at any time... is there a way that I can have a graph in my VI dedicated to pulling data thats older than 1 minute onto my graph... this would be like a way to archive my data onto the hard drive once it leaves the buffer and have a graph that can pull that data depending on what time I want to look at it.... 

 

maybe have a control that asks for a time period.... I type: 2:01pm and then it find and pulls the corresponding data.... anyone know how I might go about somethig like this?

 

Thank you!

0 Kudos
Message 1 of 2
(2,310 Views)

What's your upper limit on run time, and number of elements? The most memory efficient method would probably be to write the data to a binary file, pair timstamps with data points (or just a time stamp at the beginning and extrapolate data point times based on offset, if you're continuously recording data), and write a .vi to retreive the data based on the time you enter to review. For 1 data point per second, this shouldn't be too tough to impliment.

 

If I had to impliment this functionality, I'd be using a lossy queue as my FIFO, with the "overflow element" output of the lossy enqueue vi written to the binary file. To replace the plotting of the real-time data array as a waveform, simply wire the new queue element to a strip chart and set the history length to whatever you want it to be. Though, if you go with the strip chart method the buffering of the data is handled by LabVIEW, and you wouldn't really need the queue/array at all unless you're doing some data analysis.
0 Kudos
Message 2 of 2
(2,297 Views)