Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Write Single Data point Multiple Channels to TDMS using LabVIEW

1. Overview:

This VI stores the values in a 1D Array as single elements in multple columns in a TDMS File 

 

2. Description: 

When writing to a TDMS file, the TDMS VIs automatically log data grouped in channels according to the rows of a 2-D array. If attempting to write a 1-D array of data representing multiple channels, a conversion is required. This VI takes a 1-D array, builds a single row 2-D array and then transposes it, getting a multiple rows 1 column 2D Array. Then, this array is written in the TDMS file with each element of the original array corresponds to a single data-point in a new channel.

 

3. Requirements

  • LabVIEW 2012 (or compatible)

4. Steps to Implement or Execute Code

  1. Run the VI
  2. Select a file name and location
  3. In the file viewer, see that there are the same channel number than elements in the original array and that the elements in each channel correspond to the element in the original array.

 5. Additional Information or References 

VI Snippet

 

 snippet.png

 

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

PBear
NI RF
Comments
Member Maclean
Member

Wouldn't this be more memory efficient if you put the 1D array into a single input build array and a transpose 2D array instead of indexing the loop outputs.

Maclean G.
Applications Engineering
National Instruments
PBear
NI Employee

Feel free to improve upon it!

PBear
NI RF
Member RSecrest
Member

An example like this should be in the  LabVIEW Help Examples.

Member NASA_Goddard
Member

This works great but I am having trouble writing this TDMS file out to a spreadsheet.   What is the trick ?