TDMS Set Properties
- Updated2023-02-17
- 9 minute(s) read
TDMS Set Properties
Sets the properties of a .tdms file, group, or channel. You must close the reference to the .tdms file or use the TDMS Flush node to flush data to the .tdms file for changes to take effect.
© 2017 National Instruments. All rights reserved.
Inputs/Outputs

property values
Property values of the .tdms file, group, or channel.
This input accepts the following data types:
- Signed and unsigned integer
- Single-precision or double-precision floating-point number
- Complex single-precision or double-precision floating-point number
- Extended-precision floating-point number
- Alphanumeric string that does not contain null characters
- Timestamp
- Boolean
- Variant that contains any of the data types specified above

property names
Property names of the .tdms file, group, or channel.

tdms file
A reference to a .tdms file. Use the TDMS Open node to obtain the reference.

group name
Channel group on which to perform the operation.

channel name
Channel on which to perform the operation.
If you wire a value to channel name, you must also wire a value to group name.

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

tdms file out
A reference to the .tdms file.

group name out
Channel group on which you performed the operation.
If you do not specify a group name, this output returns Untitled.

channel name out
Channel on which you performed the operation.
If you do not specify a channel name, this output returns Untitled.

error out
Error information.
The node produces this output according to standard error behavior.
Searching for Properties at the File, Group, or Channel Level
The following table shows the inputs you must wire to search for properties at the file, group, or channel level.
| Search level | Inputs to Wire | Comments |
|---|---|---|
| File or root level | None | Leave group name and channel name empty to search at the file or root level. |
| Group level | group name | |
| Channel level | group name and channel name | If channel name contains a value, group name must also contain a value. |
Setting Multiple Properties
To set multiple properties using the same node, you can wire a 1D array of an acceptable data type to property values. Each value in the array corresponds to a single property. However, a single property cannot hold an array of values.
Properties in a .tdms File
Every TDMS object can have an unlimited number of properties. Each TDMS property consists of a combination of a name (always a string), a data type, and a value. Typical data types for properties include numeric types such as integers or floating-point numbers, time stamps, or strings. TDMS properties do not support arrays. TDMS properties help you organize and document data and later perform searches on that data by adding meta information specific to your data set.
The following table lists all properties you might find in a .tdms file.
| Property Name | Data Type | Access | Available in File Format Versions | Description |
|---|---|---|---|---|
| name | String | Read/write | 2.0 | Specifies the object name, such as the root name, group name, or channel name, in a .tdms file. |
| NI_ArrayColumn | 32-bit signed integer | Read only | 1.0 and 2.0 | Indicates the index of a column in a 2D array. This property appears in a .tdms file only if you write a 2D array of data to the file. |
| NI_ChannelLength | 64-bit unsigned integer | Read only | 1.0 and 2.0 | Represents the number of values in a channel of a .tdms file. |
| NI_DataType | 16-bit unsigned integer | Read only | 1.0 and 2.0 | Represents the data type of a channel. The value is an integer that corresponds to a type code. |
| NI_DigitalCompression | Boolean | Read only | 1.0 and 2.0 | Indicates whether a digital table is compressed or not. A value of 1 indicates that the digital table is compressed. If the digital table is not compressed, this property does not appear. |
| NI_DigitalLine | 32-bit signed integer | Read only | 1.0 and 2.0 | Indicates the index of a row in a digital table. |
| NI_DigitalNumberOfLines | 32-bit signed integer | Read only | 1.0 and 2.0 | Indicates the number of rows in a digital table. |
| NI_Number_Of_Scales | 32-bit unsigned integer | Read/write | 2.0 | Specifies the number of scales to use when you read data from a .tdms file. For example, if a .tdms file has five scales and you set the value of NI_Number_Of_Scales to 4, only the first four scales are applied to the data when you read the .tdms file. |
| NI_Scale[n]_config, where n represents the order of the scale and config represents the configuration of the scale. | N/A | Read/write | 2.0 | Specifies the scaling information for the data in a .tdms file. You can create more than one scale in a .tdms file. |
| NI_Scaling_Status | String | Read/write | 2.0 | Specifies whether to scale data when reading the data from a .tdms file. If the value is unscaled and the .tdms file contains one or more scales, the node scales the data. If the value is scaled, the node does not scale the data. |
| unit_string | String | Read/write | 1.0 and 2.0 | Specifies the unit of the channel data in a .tdms file. |
| wf_increment | Double | Read/write | 1.0 and 2.0 | Represents the increment between two consecutive samples on the x-axis. |
| wf_samples | 32-bit signed integer | Read/write | 1.0 and 2.0 | Represents the number of samples in the first data chunk of the waveform you write to a .tdms file. The value must be greater than zero. |
| wf_start_offset | Double | Read only | 1.0 and 2.0 | Represents the first value on the x-axis used by frequency-domain data and histogram results. |
| wf_start_time | Timestamp | Read only | 1.0 and 2.0 | Represents the time at which the waveform was acquired or generated. This property can be zero if the time information is relative or the waveform is not in the time domain. |
| wf_time_pref | String | Read only | 1.0 and 2.0 | Indicates whether to interpret the x-axis data in absolute time or relative time. |
| wf_xname | String | Read only | 1.0 and 2.0 | Indicates the name of the x-axis of the waveform. |
| wf_xunit_string | String | Read only | 1.0 and 2.0 | Indicates the unit text of the x-axis. |
If the data type of a property is not valid, this node treats the property as a customized property and the property will not function as described in the table.
Additional Properties that Affect .tdms Data and Performance
The following table lists all properties that do not exist in a .tdms file, but which you can use to perform certain actions.
| Property Name | Data Type | Access | Available in File Format Versions | Description |
|---|---|---|---|---|
| NI_DiskCacheSize | 32-bit unsigned integer | Read/write | 2.0 |
|
| NI_DiskGapSize | 32-bit unsigned integer | Read/write | 2.0 |
|
| NI_MinimumBufferSize | 32-bit unsigned integer | Read/write | 1.0 and 2.0 |
|
| NI_UpdateChannelName | String | Write only | 1.0 and 2.0 |
|
| NI_UpdateGroupName |
File Buffering with TDMS Files
When a TDMS node writes data to a .tdms file, the data waits in a buffer until the buffer fills up or until you close the file. Buffering holds more data values in memory and allows you to wait and flush data to disk once, rather than continuously writing data. This both improves performance and causes the .tdms file to have fewer segments and be less fragmented. Files with fewer segments are more compact and take less time to open.
Buffering can occur at the channel layer, in the operating system (OS) file system, or in the TDMS disk cache. The layer at which buffering occurs depends on the property you set using the node. For example, the NI_MinimumBufferSize property determines the number of data samples to buffer at the channel layer. The disable buffering input of TDMS nodes determines whether to disable system buffering, which occurs in the OS. When the disable buffering input is True, this product disables system buffering and buffering occurs in the TDMS disk cache. The NI_DiskCacheSize property determines the amount of cache size in the TDMS disk cache to allocate for data. This property is valid only if the disable buffering input is True.
To write all buffers directly to the TDMS file, use the TDMS Flush node.
When to Disable Buffering
You may want to disable buffering to speed up data transfers in the following situations:
- When you want to read or write a large sample size.
- When you want to read or write a large amount of data from different samples.
- When you use a Redundant Array of Independent Disks (RAID) to increase processing speed. A RAID is a set of hard disks acting as a single disk that the OS can simultaneously access, taking less time to read or write data. If you access a RAID with buffering enabled, this product can take more time to copy data to the OS than the OS takes to actually write the data to the disk.