From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Playback

I am trying to play back a TDMS file, simulating as-if some software was running and want it to chuck out the recorded values at the same timebase as if an experiment was running. This is so that I can write some algorithms to process pre-measured data 'on-the-fly' without having to actually collect any data so that I can do some code debugging.

 

The TDMS sample rate I use is 5000 samples/s and the file is time-stamped - how do I then extract data from the TDMS file using this timebase?

If I just read the file, then the whole dataset is loaded at once and displayed, and  I have tried using the "collector" express VI but this only displays the last 5000 samples from the signal file.

 

Any suggestions, or am I missing a trick? 

<code snippet attached>

0 Kudos
Message 1 of 3
(2,455 Views)

1. Read the data as a waveform

2. You can read the file in chunks.  There is a nice input for number of samples to read.  And if you are reading inside the loop (open is before and close is after the loop), then it will just continue to read from the next sample to be read.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,421 Views)

I have tried that but it appears like it only reads one chunk of data before crashing due to the end of the file being reached. 

 

 

0 Kudos
Message 3 of 3
(2,409 Views)