LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Slice

Hi, my name is Marci,

 

I would like to slice my TDMS file, that has 2 channels, one Time, one Vibration signal, into five TDMS files. My problem is that I can't read out both Time and Vibration channels with Read TDMS.VI, because they are not the same data type, furthermore I can not wire a Time Stamp Constant to the Read TDMS.VI if I would like to read them out one by one. So this way my new sliced TDMS files only contain the Vibration signal samples, but not the time, altough the signal is a waveform so it should contain the time too. I tried to get the signal's waveform component (Y, t0) and somehow write it in a TDMS, but that also didn't work.
I would like to ask for some help in this regard.I will attach the VI that i made, and some pictures for better understanding. I cannot attach the original TDMS file, because it is way too big. 
Thanks in advance!
I use LabVIEW 2021 and DIAdem 2021.

0 Kudos
Message 1 of 2
(437 Views)

It sounds like you are pretty new to TDMS files and the general ways to read and write them.  You might want to look into the examples in LabVIEW.  Go to Help >> Find Examples then search for TDMS.  I'll still try to answer your questions.

 


@Marci_2023 wrote:

Hi, my name is Marci,

 

I would like to slice my TDMS file, that has 2 channels, one Time, one Vibration signal, into five TDMS files. My problem is that I can't read out both Time and Vibration channels with Read TDMS.VI, because they are not the same data type,


You can do this by having two separate read functions, one for the Time, one for the others.

 


@Marci_2023 wrote:

furthermore I can not wire a Time Stamp Constant to the Read TDMS.VI if I would like to read them out one by one.


The datatype will be an array of timestamps, not a scalar

 


@Marci_2023 wrote:

So this way my new sliced TDMS files only contain the Vibration signal samples, but not the time, altough the signal is a waveform so it should contain the time too. I tried to get the signal's waveform component (Y, t0) and somehow write it in a TDMS, 


If the datatype that was written was a waveform, then you can also choose to set the datatype to a waveform and read the channel.  It should then bring in the dt and t0 data.  If you want to read multiple channels have an array of them, and have the data type be an array of waveforms.

 

Attached is two VIs, one that shows how to write and read data back, and one that just reads your waveform from the TDMS file you provided.

Download All
0 Kudos
Message 2 of 2
(409 Views)