The TDM Streaming palette includes both standard and advanced TDMS VIs and functions. The Advanced TDMS VIs and functions enable you to perform advanced file I/O operations, such as asynchronous reads and writes, on .tdms files.
Note��Use the standard TDMS VIs and functions when the features of the Advanced TDMS VIs and functions are not necessary. Incorrect use of the Advanced TDMS VIs and functions might result in a corrupt .tdms file. If you disable buffering when using the Advanced TDMS VIs and functions, the data size you read or write must be a multiple of the sector size of the hard disk.
Compared to the standard TDMS VIs and functions, the Advanced TDMS VIs and functions have the following advantages:
Writing meta data and raw data separately�The standard TDMS VIs and functions write meta data and raw data at the same time. The Advanced TDMS VIs and functions enable you to write meta data and raw data separately. You can use the TDMS Set Channel Information function to write the meta data into a .tdms file, and then use the TDMS Advanced Asynchronous Write function to write the raw data into the .tdms file.
Note��When you write data to a .tdms file, the data includes meta data and raw data. Refer to the following support document at ni.com for more information about meta data and raw data in a .tdms file.
(Windows) Reading and writing data asynchronously�The standard TDMS VIs and functions only enable you to read or write data synchronously, which might result in lower performance when the buffer size is small and you have a large size of data to read or write. The Advanced TDMS VIs and functions enable you to read or write data asynchronously. Use the TDMS Configure Asynchronous Reads or TDMS Configure Asynchronous Writes function to allocate buffers and initiate multiple asynchronous reads or writes in the background.
(Windows) Accessing external data directly to achieve optimal data-streaming performance�Unlike the standard TDMS VIs and functions, the Advanced TDMS VIs and functions enable you to interact with data that is owned by a component external to LabVIEW, such as the direct memory access (DMA) buffer of a device driver that controls a data-streaming device. You can asynchronously write data from the DMA buffer directly into .tdms files, or read data from .tdms files directly into the DMA buffer. Accessing the external data in the DMA buffer directly can reduce copies of large data sets and improve the data-streaming performance.
Overwriting existing data�Unlike the standard TDMS VIs and functions, the Advanced TDMS VIs and functions enable you to overwrite a subset of data in a .tdms file. Use the TDMS Set Next Write Position function to specify the offset at which to overwrite the existing data.
Reserving file size before writing data�Unlike the standard TDMS VIs and functions, the Advanced TDMS VIs and functions enable you to pre-allocate disk space for the data you want to write, which can prevent fragmentation on a file-system level. Use the TDMS Reserve File Size function to pre-allocate disk space before writing data to a .tdms file.