LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

howa can i go back in time to display data

Is there any way to display data that was acquired in the past in Labview? I have multichannel Daqmx acquiring data. I want to display data that was acquired in the past choosing the time interval. for example if i labview ran the program for 2 min and i want to daipaly data that was acquired in the first min again. Can i do that in  the Labview? Thanks
0 Kudos
Message 1 of 13
(3,478 Views)
If you are logging your data to a file as it is collected you can display whatever chunk of data whenever you want. What are you doing with the data as it is collected?  Are you storing it in an array, in a queue, in a file...   The answer to how you are storing data will dictate the answer to how you can display data from the past.
Message 2 of 13
(3,476 Views)
You could use a waveform chart (not graph) and use its history. Then you can just scroll backwards in time.
Message 3 of 13
(3,471 Views)
I am just displaying it in the front panel now. If I want to store data to a file or array how can i retrive data form the file of array using the time interval? How can i use wavefrom chart to diplay history? Can you explain lilttle more? Thanks
0 Kudos
Message 4 of 13
(3,466 Views)
If you log your data to file, simply save each row of data with a timestamp.  All you have to do is read the file, parse the string for the timestamp, pull out the data corresponding to the desired timestamps, convert it back from a string data type to a double and build your plot using this data.  Depending on how long you will be collecting data for, how far back in time you need to go to see the data you want, the waveform chart with history would be much simpler.  However I believe the waveform chart will lose its history if the program is stopped (perhaps smercurio_fc can confirm or deny this for both of us), so you wont be able to recall data that was taken prior to a program restart.
Message 5 of 13
(3,463 Views)

jmcbee wrote:
However I believe the waveform chart will lose its history if the program is stopped (perhaps smercurio_fc can confirm or deny this for both of us), so you wont be able to recall data that was taken prior to a program restart.

Depends on what you do. If you don't fiddle with scales then you shouldn't lose the previous data on restart. You can see this in the example "Charts" that ships with LabVIEW, vs "Real-Time Chart".

Message 6 of 13
(3,452 Views)

Hi

 

I tried to save data using write to file express vi. I am sampling 100s/s. After i'm done writing to file i checked the data see if i am getting the right time values Vs voltage. but time values sometimes represents negative valus. Could you tell me how to write to file with correct time stamp? And writing to queue may  be a bettter idea? is that right? Thanks

0 Kudos
Message 7 of 13
(3,401 Views)

Hello Suni,

 

I put a little example program together that shows one way to do what I think you want to do.  You can find it attached labeled Producer Consumer Save Data Example.vi I did not plot the data but it shows how to take data, save it to file, and pull it out of the file based on a user supplied time window.  Feel free to write back with questions, comments, improvements...

 

Enjoy

Download All
Message 8 of 13
(3,385 Views)
The above are in LV 8.6.  Attached here are  in LV 8.0
Download All
Message 9 of 13
(3,382 Views)

If i choose waveform chart and increase the buffer to store data points can i use cursors to to move x axis and go back in time to dispaly old data? I tried to write data folating point data to a file using producer and consumer vi. I coould do it. Thanks

0 Kudos
Message 10 of 13
(3,341 Views)