NI-DAQmx 9.0 or later installs a new VI, DAQmx Configure Logging VI, which allows users to configure writing data to a TDMS file within a single VI on the DAQ palette. Not only does this make it simple to use and integrate into existing data acquisition applications, but with under the hood optimizations, it is the fastest way to write data to disk.
Figure 1. The DAQmx Configure Logging (TDMS) VI allows users to set up data logging to TDMS before even starting the task.
To optimize file writing speeds, NI-DAQmx can stream data directly from the device buffer to the hard disk bypassing the Windows, LabVIEW, and TDMS buffers. The Voltage -Continuos Input.vi also improves performance and reduces the disk footprint by writing raw data to the TDMS file, including the scaling information separately for use when reading back the TDMS file. These optimizations result in writing speeds up to 1.2 GB/s. The example can be found by selecting Help>>Find Examples... that opens the NI Example Finder from there select Hardware Input and Output>>DAQmx>>Analog Input>>Voltage - Continuous Input.vi to open the example.
Figure 2. NI Example Finder.
Once the Data has been stored to the TDMS file, you use the TDMS File API and TDMS File Viewer in LabVIEW, DIAdem, TDMS Excel Add-on, or other TDMS supported interfaces for reading and viewing the acquired data. Learn more about TDMS writing and reading interfaces.