kb:labview:tdms
Table of Contents
31 TDMS
Attributes
Misc | ||||
---|---|---|---|---|
Name | Level | Example | Required? | Description |
datetime | File | no | Start DateTime of the whole TDMS file | |
unit_string | Channel | no | String representation of the channel unit | |
NI_ChannelName | Channel | “temp_1” | no | the name that appears in the plot legend of a LabVIEW chart/graph |
Standard Waveform Property Names [1] | ||||
Name | Level | Example | Required? | Description |
wf_xname | Channel | Time | yes | Name of the x-axis quantity |
wf_xunit_string | Channel | s | yes | Unit of the x-axis quantity |
wf_start_offset | Channel | 0 | yes | Start offset value of the x-axis |
wf_increment | Channel | 0.001 | yes | Increment value of the x-axis |
wf_start_time | Channel | no | Start DateTime value of the time axis | |
wf_samples | Channel | 1000 | yes | Number of values of the x-axis |
XY Channel Relationships [2] | ||||
Name | Level | Example | Required? | Description |
wf_xcolumns | Group | “one” | no | the first channel in that group is the time channel |
xchannel | Group | “Time” | no | name of the time channel in that channel group |
Properties to Improve Loading Speed in NI DIAdem | ||||
Name | Level | Example | Required? | Description |
minimum | Channel | -3.14 | no | The minimum value of the channel |
maximum | Channel | 3.14 | no | The maximum value of the channel |
monotony | Channel | Not monotone | no | If the channel is monotone rising or falling |
novaluekey | Channel | No | no | If any NaN values are in the channel |
[1] Note that the property names are case-sensitive and must be in lowercase. The wf_xname and wf_xunit_string properties are not set by default in NI LabVIEW— you need to add those properties yourself to every waveform channel in the TDMS file.
[2] See “Non-Equidistant Data” below.
Non-Equidistant Data
Acquired data channels must have associated timing information. For constant sampling rates (equidistant samples), timing information is contained implicitly via t0 and dt. For non-equidistant samples (acquired in a non-deterministic way or without constant sampling rate), timing information must be provided explicitly.
The clearest and simplest approach is to always have only one explicit time channel inside each channel group and to always position the explicit time channel as the first channel in that channel group. This leads to two common cases: one explicit time channel plus one acquired data channel in each channel group (XY) or one explicit time channel plus multiple acquired data channels in each channel group (XYYY).
If you adopt this suggestion to have only one time channel in each channel group, then you should set thewf_xcolumns
property on the channel group level to have the value “one”, which will tell all NI software that the first channel in that group is the time channel. If for some reason your time channel is not first, you can set thexchannel
property on the channel group level and fill it with the name of the time channel in that channel group.
TDMS files offer a native datetime data type for both properties and data channels. When you save datetime information, make sure to always use the built-in datetime option. Writing a numeric value of elapsed seconds is not sufficient to record a datetime, because different applications that write and read TDMS files have different conventions for the starting datetime value and even the increment metric (seconds as opposed to days). For NI LabVIEW programs, you should always wire a brown datetime wire directly to the property value or channel data input.
(Source: http://www.ni.com/white-paper/14252/en/)
Other Resources
-
Presentation “GDevCon5: Leveraging the power of TDMS files” (Emmanuel Beraud)
-
Presentation “TDMS File Format Usage in LabVIEW”
-
Whitepaper “The NI TDMS File Format”
-
LabVIEW Help: „TDMS Set Properties Function“
-
Forum post „TDMS minimum property“
-
DIAdem Help: “Properties in DIAdem”
-
Whitepaper “Writing Data-Management-Ready TDMS Files”
kb/labview/tdms.txt · Last modified: 2025/01/23 10:40 by joerg.hampel