LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to get the total samples from a TDMS file?

Solved!
Go to solution

I'm looking at the TDMS Get Properties Function documenation and I see that there's a property: wf_samples which "Represents the number of samples in the first data chunk". Is there a way to get the number of samples in, say, the second data chunk? My goal is to get the number of samples in all the data chunks for one channel.

0 Kudos
Message 1 of 6
(2,605 Views)

@nanocyte wrote:

I'm looking at the TDMS Get Properties Function documenation and I see that there's a property: wf_samples which "Represents the number of samples in the first data chunk". Is there a way to get the number of samples in, say, the second data chunk? My goal is to get the number of samples in all the data chunks for one channel.


Hope First page of TDMS File contains overview of the data present in the file, so by querying from there we can get the necessary output

Just have a try!

Pazhanivel Thiruvenkadam,
CertifiedLabVIEWArchitect|| CertifiedTestStandDeveloper,
Currently able to Access LV2015&LV2017
0 Kudos
Message 2 of 6
(2,544 Views)
Solution
Accepted by nanocyte

To retrieve the total number of samples I use the "NI_ChannelLength" properties to be connected to the TDMS Get properties function.

The outbut I64 gives you the total number of samples of the selected channel.

see attached if useful

 

marco

0 Kudos
Message 3 of 6
(2,540 Views)

Alwin_Capsys_0-1619028770652.png

But there is no such "NI_channel_length" option in my TDMS Get properties. What should I do? 

0 Kudos
Message 4 of 6
(993 Views)

I don't understand exactly what you mean by "no option". You appear to be showing us the inputs and output from the context help. Did you see the image that Marco posted? You need to create a string constant that goes into the "property name" input. You can then type in "NI_ChannelLength" into the constant.

0 Kudos
Message 5 of 6
(987 Views)

OK. Thank you for the valuable information. Actually I am new to LabVIEW and I didn't get it first time while looking in to the picture.

0 Kudos
Message 6 of 6
(969 Views)