TDMS Flush
- Updated2023-02-17
- 3 minute(s) read
TDMS Flush
Forces the operating system to write any buffer data to the .tdms file.
When a node writes data to a .tdms file, the data waits in a buffer until the buffer fills up or until you close the reference to the file. After the buffer fills up or you close the reference, this node forces the operating system to write any data in the buffer to the .tdms file.
© 2017 National Instruments. All rights reserved.
Inputs/Outputs

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

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.

error out
Error information.
The node produces this output according to standard error behavior.
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.