Example Code

Write .txt file to TDMS - One or Multiple Columns in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • LabVIEW

Code and Documents


This VI can be used to take a .txt file and convert the file to a TDMS file.


TDMS files are files that can be used to store data that we would like to analyze. Since this file format combines the benefits of several data storage options, we might want to convert a .txt file into TDMS to use some of the available tools to see and analyze data. For example, we can use the TDSM Viewer or we can use the TDMS file with NI DIAdem.


LabVIEW Base Development System (or compatible)


Steps to Implement or Execute Code
1. Select which .txt you would like to read from
2. Run this VI
3. Select a place to save your TDMS File
3. Use the TDMS Viewer to see the values in the TDMS file.

Additional Information or References

**This document has been updated to meet the current required format for the NI Code Exchange.**

Kyle A.
National Instruments
Senior Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.


how about labview 2011? certain function are different so this block diagram failed to convert

Active Participant
Active Participant

Made a LV 2011 version, thanks!

Kyle A.
National Instruments
Senior Applications Engineer