LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use previous TDMS data to simulate incoming data offline

This is not a cRIO question, but a LabVIEW question.  I would like to not have to connect to my cRIO everytime I want to develop my real time code.  How can take a previously saved TDMS data and have Labview read the values from this file one line at a time so that the code runs just as if I were logging new data from the sensors?

 

Here's a lengthy example to better clarify the question: I'm using LabVIEW 2011

I'm using Scan Engine to read say, 10 channels on my cRIO every 100ms.  The values from each channel come into my processing loop as an interleaved 1D array where I can process the data and save it as a row in a TDMS file.  Then 100ms later I get a reading for row two in the TDMS file, then row three etc. 

 

Now say I just want to tweak a few things on my processing loop like add a new chart etc. and want to make sure it displays properly but do not want to reconnect to the cRIO.  Can I reference the saved TDMS file and get LabVIEW to send the same interleaved 1D array of 10 channels every 100ms so it simulates just the way the actual data would come in from the cRIO?  

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

Hi jezza,

 

You can use the TDMS VIs to read from the file, specifying an array of doubles so that we don't have to get the waveform components in order to get the Y values. We then just build an array on a for loop and set a delay of 100 mS. You can optimize this using a Producer Consumer Architecture if you are worried that the processing VIs are going to take more than 100 mS.

 

Read TDMS line by line.png

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
0 Kudos
Message 2 of 2
(2,112 Views)