Example Code

Read and Write TDMS Files with Different Data Types

Code and Documents

Attachment

Download All

Overview

This VI will read a TDMS file with channels of different data types and write the values to a new file location you specify.

 

Description

This VI was originally developed as a tool to resave corrupt TDMS files. You must specify the data type in order to properly read the stored values. This VI reads the NI_DataType property of the specified channel and selects the correct data type so that data in any format (string, numeric, or timestamp) can be written to a new file.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

1. Select the file you would like to resave.

2. Select the file you would like to replace or the location you would like the new file to be created.

3. Run the VI.

 

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

 

 

 

 



Kurt P
Automated Test Software R&D

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