Example Code

Convert TDMS File with DAQmx Raw data Using 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




Very simple utility to read in a TDMS file and the write out data to a new TDMS file (which does not use the DAQmxRaw Data type). This will convert DAQmxRaw data which is problematic for reading with other tools.(http://www.mathworks.com/matlabcentral/fileexchange/44206-converttdms-v10).



Open a TDMS file with DaqMxRaw data in it, write all of the data to a new file.  The DaqMxRaw datatype is used for high throughput data file writing.  Raw ADC Data is stored with scaling factors in the DAQmxRaw datatype.  The decoding information for this datatype is not provided by NI in the tdms documentation at: http://zone.ni.com/devzone/cda/tut/p/id/5696.  This VI demonstrates how a simple VI can be used to open a TDMS file which contains data in the DAQmxRaw data type and write it to another file (this operation converts the data in the file to the supported data types available to users in the TDMS documentation).



  • LabVIEW 2012 (or compatible)


Steps to Execute Code

  1. Run VI.
  2. Select File to be converted.
  3. Copy File name from above and change or append to name.
  4. Press OK to convert button.
  5. Close the VI window to stop the VI.


Additional Information or References VI Block Diagram

VI Snippet


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

**Updated to use an Event Structure instead of polling a control.




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


Would it be possible for National Instruments to update their documentation for the special daqmx tdms format so it would be in the public domain like the normal tdms format?


I wonder what the conversion utility does. I have tried to convert a 1 GB file and got 1.3 kB out.

Knight of NI Knight of NI
Knight of NI

I just updated the VI to use an Event Structure instead of polling.


Due note that this is geared to TDMS files that were made with the DAQmx Logging.  Any additional groups will likely be removed.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines