Owning Palette: File I/O VIs and Functions
Requires: Base Development System. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.
Use the TDM Streaming VIs and functions to read and write waveforms and waveform properties to binary measurement files (.tdms).
Some functions on this palette do not work with real-time operating systems. |
The VIs and functions on this palette can return TDM streaming error codes.
Palette Object | Description |
---|---|
TDMS Close | Closes the .tdms file you opened with the TDMS Open function. |
TDMS Defragment | Defragments the .tdms file data specified in the file path input. Use this function to clean up your .tdms data when it becomes cluttered, and increase performance. |
TDMS File Viewer | Opens the .tdms file specified in the file in input and presents the file data in the TDMS File Viewer dialog box. |
TDMS Flush | Writes all buffers of the .tdms file data to the file identified by the tdms file input.
Data written to a .tdms file often resides in a buffer until the buffer fills up or until you close the file. This function forces the operating system to write any buffer data to the .tdms file. |
TDMS Get Properties | Returns the properties of the specified .tdms file, channel group, or channel. If you wire the group name and channel name inputs with values, the function searches for properties at the channel level. Wiring only the group name input with a value searches for properties at the channel group level. If both group name and channel name inputs contain no values, the function searches for properties at the root level of the .tdms file. If you wire the channel name input with a value, you must also wire a value to the group name input. |
TDMS List Contents | Provides a list of group and channel names contained within the .tdms file specified in the .tdms file input. |
TDMS Open | Opens a .tdms file for reading or writing. You also can use this function to create a new file or replace an existing file. Use the TDMS Close function to close the reference to the file. |
TDMS Read | Reads the specified .tdms file and returns data in a format specified by the data type input. If data has scaling information, this VI automatically scales the data. Use the count and offset inputs to read a specified subset of the data. |
TDMS Set Properties | Sets the properties of the specified .tdms file, channel group, or channel. If you wire the group name and channel name inputs with values, the function writes the properties at the channel level. Wiring only the group name input with a value writes the properties at the channel group level. If both group name and channel name inputs contain no values, the properties become file-specific. If you wire the channel name input with a value, you must also wire a value to the group name input.
You must close the reference to the .tdms file or flush data to the .tdms file for changes to take effect. |
TDMS Write | Streams data to the specified .tdms file. The data subset to write is determined by the values you identify in the group name in and channel name(s) in inputs. |
Subpalette | Description |
---|---|
Advanced TDMS VIs and Functions | Use the Advanced TDMS VIs and functions to perform advanced file I/O operations, such as asynchronous reads and writes, on .tdms files. You can use these VIs and functions to read data from an existing .tdms file, write data to a new .tdms file, or replace subsets of data in an existing .tdms file. You also can use these VIs and functions to convert the file format version of a .tdms file or to create scaling information for unscaled data. |
The following functions on this palette do not work with real-time operating systems, such as Phar Lap ETS, VxWorks, and NI Linux Real-Time: