TDMS Open
- Updated2023-02-17
- 4 minute(s) read
TDMS Open
Obtains a reference to a .tdms file so that you can read from or write to the file using other .tdms nodes.
You can also use this node to create a new file or replace an existing file and then obtain a reference to that file.
© 2017 National Instruments. All rights reserved.
Inputs/Outputs

create index file
A Boolean that determines whether to generate a .tdms_index file for a .tdms file. The .tdms_index file speeds up random access to the .tdms file.
| True | Generates a .tdms_index file for the .tdms file. |
| False | Generates only the .tdms file. |
Default value: True
Is the Index File Necessary?
The .tdms_index file is optional in TDMS applications. When you distribute a TDMS application or .tdms file to another computer, you do not need to include the corresponding .tdms_index file. For example, if you have limited disk space, you do not need to generate the .tdms_index file.
Behavior of Using Multiple TDMS Open Nodes to Open the Same File
To open the same reference to a .tdms file using multiple TDMS Open nodes, the software uses create index file of the first TDMS Open node to determine whether to generate the .tdms_index file or not. The software ignores create index file of all subsequent TDMS Open nodes.

file format version
File format version for the .tdms file.
| 1.0 |
The file format version is 1.0. |
| 2.0 |
The file format version is 2.0. |
Default value: 2.0

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

operation
Operation to perform on the .tdms file.
| open |
Opens a reference to a .tdms file. |
| open or create |
Opens a reference to an existing .tdms file or creates and references a new .tdms file if it does not exist. |
| create or replace |
Creates a new .tdms file or replaces an existing .tdms file and then opens a reference to that file. |
| create |
Creates a new .tdms file. |
| open (read-only) |
Opens a reference to a .tdms file with read-only access. |
Default value: open

byte order
Byte order, or endian format, of the data in the .tdms file. Byte order specifies whether to represent numeric values in memory from most significant byte to least significant byte or vice versa.
byte order is valid only if you use this node to create a new .tdms file. If you use this node to read an existing .tdms file, data is read in the byte order of that file and represents the data in the native byte order of the host computer. If you use this node to update an existing .tdms file, data is written in the byte order of the existing file even if you've specified a byte order.
| big-endian, network order |
The most-significant byte occupies the lowest memory address. |
| native, host order |
Uses the byte-ordering format of the host computer. |
| little-endian |
The least-significant byte occupies the lowest memory address. |
Default value: little-endian

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

disable buffering
A Boolean that specifies whether to open, create, or replace a .tdms file without system buffering.
| True | The node disables system buffering and enables buffering in the TDMS disk cache. |
| False | The node enables system buffering. |
Default value: True
When to Disable System Buffering
You may want to disable system 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.
To read the same set of data repeatedly from the computer, consider enabling system buffering.

tdms file out
A reference to the .tdms file.

error out
Error information.
The node produces this output according to standard error behavior.