Example Code

TDMS Parser Based on Data Samples' Time Stamp Using LabVIEW

Code and Documents

Attachment

Overview
This VI takes a TDMS file with multiple data points and writes this data to multiple TDMS files.

 
Description
It sorts the TDMS file into smaller ones by looking at the time stamp between data points.  If the timestamp between data points is greater than the user specified tolerance, the program will consider the new data point to be the start of a separate log and end up placing it into a new TDMS file.

 
Requirements

  • LabVIEW 2013 (or later)

 

Steps to Implement or Execute Code

  1. Download the appropriate version of the VI TDMS Timestamp Parser along with the Test Data File.tdms and Test Data File.tdms_index files
  2. Select browse for the Original TDMS FIle input and select browse to the Test Data File.tdms file
  3. Select the output folder/file you wish for the new TDMS files to be placed in the input for TDMS File Output Location
  4. Leave the default value of .2 for Min Time Between Logs
  5. Run the program and inspect the new TDMS files
  6. Modify code to allow for parsing of your own TDMS file. Change Data Type constants and Group/Channel names to properly read your TMDS file

 

Additional Information or References

Front Panelpic1.png

 

VI Snippet of Block Diagram

BD.png

 

 

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

 

Applications Engineer
National Instruments

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

Comments
yura_beno
Member
Member
on

Is there an example that is doing the opposite, merging smaller TDMS files into a bigger one?