LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading TDMS Channel 'Length' property

Solved!
Go to solution

Hi

Wonder if anyone could point me to the right direction please. I could not seem to be reading 'Length' property of TDMS channels using 'TDMS Get Properties' vi. Could I read this easily. In worst case I might end up writing a property 'Channel Length' at vi closing time after dividing Total Time by Sampling Rate and reading it back! I hope there is a much nice way to achieve this?

 

ATE and Labview Consultant
https://www.easybodge.com
0 Kudos
Message 1 of 3
(4,944 Views)

You want to read the NI_ChannelLength property for the channel.  Since you are using the TDMS Streaming function of DAQmx, then all channels will have the same length, so you just have to read one of the channels.


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
(4,923 Views)
Solution
Accepted by topic author k-waris

@k-waris wrote:

Hi

Wonder if anyone could point me to the right direction please. I could not seem to be reading 'Length' property of TDMS channels using 'TDMS Get Properties' vi. Could I read this easily. In worst case I might end up writing a property 'Channel Length' at vi closing time after dividing Total Time by Sampling Rate and reading it back! I hope there is a much nice way to achieve this?

 


Seeing your code would be helpfull. Did you wire a numeric constant to the data type input? When left unwired it looks for a string and since this is a numeric value it returns nothing.

 

Also make sure you have the correct property name, for the file EXAMPLE.tdms (an example file that ships with Diadem) in Diadem you see property name Length displayed but when you use TDMS Get Properties you can see that the name of this property is in reality NIChannelLength.

 

Ben64

Message 3 of 3
(4,921 Views)