08-17-2015 07:09 AM
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?
Solved! Go to Solution.
08-17-2015 07:57 AM
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.
08-17-2015 07:58 AM
@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