TDMS Defragment
- Updated2023-02-17
- 2 minute(s) read
TDMS Defragment
Defragments data in a .tdms file.
Use this node to clean up your .tdms data when it becomes cluttered and to increase performance. Data becomes cluttered when you rewrite unnecessary metadata. See TDMS Segments and Metadata on the Details tab for more information.
© 2017 National Instruments. All rights reserved.
Inputs/Outputs

file path
Absolute path to the .tdms file on which to perform the operation.

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

error out
Error information.
The node produces this output according to standard error behavior.
TDMS Segments and Metadata
Every time a node appends data to a .tdms file, the file creates a new segment. A segment consists of the following three parts:
- Lead in—The segment's basic information, like the tag that identifies the files as .tdms and indicates the length information of the metadata and the raw data.
- Metadata—The names and properties of all objects in the segment. The metadata can also include index information for objects that include raw data, like channels.
- Raw data—All of the raw data associated with any of the objects in the segment.
When you set properties on TDMS nodes, you can omit meta information that is identical from one segment to the next, like channel names and properties. This is optional, but omitting redundant meta information significantly speeds up reading the file and reduces the binary footprint.
If you choose to write redundant information, you can later remove it using the TDMS Defragment node.