Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS-Specification

Hi all,

 

I have a problem with the specification of the .tdms file format. (https://www.ni.com/en/support/documentation/supplemental/07/tdms-file-format-internal-structure.html).

 

Here is a snippet of a example file i have. This file is validated, so it is specification conform. But some things i don't understand.



54 44 53 6D                                 // TDSm -Tag

-------------------------------------------------------------------------------------------------------

0A 00 00 00                                 // ToC-Mask (MetaData und RawData)

--------------------------------------------------------------------------------------------------------

68 12 00 00                                 // version Number (4712)

--------------------------------------------------------------------------------------------------------

58 00 00 00

00 00 00 00                                 // Next Segment Offset (88)

--------------------------------------------------------------------------------------------------------

3D 00 00 00

00 00 00 00                                // Raw Data Offset (61)

--------------------------------------------------------------------------------------------------------

01 00 00 00                                // Number of Objects (1)

--------------------------------------------------------------------------------------------------------

15 00 00 00                                // Pfadlänge (21)

--------------------------------------------------------------------------------------------------------

2F 27 54 69

6D 65 73 74

61 6D 70 27

2F 27 45 76

65 6E 74 73

27                                                //Pfad (/’Timestamp’/’Events’)

---------------------------------------------------------------------------------------------------------

1C 00 00 00                                // RawData Index (28)

---------------------------------------------------------------------------------------------------------

20 00 00 00                                // Datentyp (String)

---------------------------------------------------------------------------------------------------------

01 00 00 00                               // Array-Dimension (1)

---------------------------------------------------------------------------------------------------------

01 00 00 00 00 00 00 00           // Number of Values(1)

---------------------------------------------------------------------------------------------------------

1B 00 00 00 00 00 00 00          // Total Size Raw Data String (27)

---------------------------------------------------------------------------------------------------------

00 00 00 00                              // Number of Properties (0)

---------------------------------------------------------------------------------------------------------

17 00 00 00                              // Don’t know what this is. This value is exactly the length of

                                           the following String, but i can’t find a explaination why this value is given here.

---------------------------------------------------------------------------------------------------------

33 34 32 32                         // I think, this is the raw data value.

30 35 34 36                         // (3422054607;FALSE;BZsave)

30 37 3B 46                        // The datatype could be a timestamp ?

41 4C 53 45

3B 42 5A 73

61 76 65

---------------------------------------------------------------------------------------------------------

 

Now the next tdms-Segment. This follows directly the snippet above.

 

---------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------

 

54 44 53 6D                      // TDSm

---------------------------------------------------------------------------------------------------------

08 00 00 00                      // ToC-Mask (just RawData)

---------------------------------------------------------------------------------------------------------

68 12 00 00                      // Version (4712)

---------------------------------------------------------------------------------------------------------

1B 00 00 00                     // Length of the segment-Offset (27)

00 00 00 00

---------------------------------------------------------------------------------------------------------

00 00 00 00                     // Length of the rawData Offset (0)

00 00 00 00

---------------------------------------------------------------------------------------------------------

17 00 00 00                    // Just like above, i can’t explain why this tag is here.

                                      // Obviously this is the length of the value, which follows,

                                      // but there is no datatype? How can i know, how i should

                                      // read such segments without metadata and datatypes?

---------------------------------------------------------------------------------------------------------

33 34 32 32                    // Here is the value:

30 35 34 36                    // (3422054623;FALSE;ES AUS)

32 33 3B 46

41 4C 53 45

3B 45 53 20

41 55 53 54

---------------------------------------------------------------------------------------------------------

 

Can anybody help me with this ?

Thank you very much for your help!

 

0 Kudos
Message 1 of 2
(3,772 Views)

Hi brampolt!

 

I recommend you post this on the normal LabVIEW forum, as this page is specifically for industrial communications protocols and their drivers. You will probably get a more knowledgeable response on the LabVIEW board. If / when you do post there, please include why you want to decode the .TDMS file youself - there are libraries to parse the TDMS file format in Microsoft Excel, C / C++, The Mathworks Inc. MATLAB software, and of course, LabVIEW.

 

The insight I can lend is that the data is rawDataValues - which is normally unitless. For instance, you could set up a DAQmx stream to file node and it would stream the values coming off the ADC - which are not normalized, and may even need to be linearlized based on a standard algorithm and temperature factor. Therefore, "raw data" normally implies a unique data set that you must put through some algorithm in order to reach unit-ized values.

 

Hopefully this information was useful! Again, I recommend you post this to the LabVIEW board as you get more eyes on it.

Andrew T.
"His job is to shed light, and not to master" - Robert Hunter
0 Kudos
Message 2 of 2
(3,732 Views)