LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get properties for every segment

Hi,

I am acquiring and log data continuously.  I begin acquiring and logging a specified length of data (for example, the length may be 100 miilisecs) when an analog trigger is received.  Also, I need to log some properties for every record. I call  'TDMS set properties'  and 'TDMS write' functions to append the record into a tdms file. 

Every time data is appended to a TDMS file, a new segment is created.

Every segment uses the same properties' name, but the property value is different.  

 

I can read the segments (or record) one by one correctly.  But 'TDMS Get Properties' only return the last property value of the root file. 

 

When I open the tdms_index using hex editor, I can see the property name and value, every segment stores different property value. 

 

I attached an image, which shows every segment has the property: recordno.  The recordno value is different. 

 

Is there a way to get the property value for every segment?

 

Thanks.

0 Kudos
Message 1 of 2
(2,016 Views)

Hi 90000,

 

If you defragment the TDMS file, those values will be lost. For properties, only the most recent value is defined.

 

You could perhaps avoid this issue by creating a new channel or group each time you measure data?

So then you'd (in the case of channels) want to name them with some sort of index or timestamp in the name, maybe, and store a reference time as a property too.

 

If you write a file parser for the values you see now, then those values will disappear if you defrag the file (for example, by opening in DIAdem) and then your code will break - so don't rely on those properties (before the most recent value).


GCentral
0 Kudos
Message 2 of 2
(1,500 Views)