LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you record data with a timestamp and retrieve it later?

Hi,
I am writing a program that needs to analyze data with a 30 second window. The program deals with differences between two values and i need to see whether the difference exceeds a given value during the 30 second window. Is there any way that I could have the computer remember exactly what the difference was 30 seconds ago and compare it to the current difference?
(i plot the difference in a graph if that helps)
thanks for your time
-roger
0 Kudos
Message 1 of 2
(2,577 Views)
If you plot the difference on a graph you must already have a buffer that holds all the data that is on the graph...and that's what you need - a buffer. For just 30 seconds of data I would use a functional global and have it act as a circular buffer (search for circular buffer here and you'll find examples).

You read the last 30 seconds of the buffer and check if any of the differences has exceeded the given value.

My guess is that your really using a chart, not a graph. The chart has it's own buffer, it typically holds the last 1024 values (the Chart History Length, you can set it by right-cicking on the chart control). In that case you could just create a property node linked to the chart and select the history data property...and then use the array sub
set function to get the last 30 values, but reading values using property nodes is not ideal...I would go for a circular buffer in this case as well.
Message 2 of 2
(2,577 Views)