Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

TDMS Read Function

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: TDM Streaming VIs and Functions

Requires: Base Development System

Copyright: (c) 2013 National Instruments. All rights reserved.

Reads the specified .tdms file and returns data in a format specified by the data type input. If data has scaling information, this VI automatically scales the data. Use the count and offset inputs to read a specified subset of the data.

Examples

count specifies the maximum number of data elements to read from the .tdms file for each channel. The default is –1, all available elements.
offset specifies the number of data elements into the .tdms file at which the function begins analyzing the .tdms file. The default is 0.
tdms file specifies a reference number to the .tdms file on which to perform the operation. Use the TDMS Open function to open the refnum.
group name in specifies the channel group on which to perform the operation. If you do not wire data to this input, LabVIEW reads data from the first group when you run this function for the first time. If you run this function continuously for multiple cycles without wiring the group name in input, LabVIEW reads data from the nth group at the nth cycle.
channel name(s) in indicates the channel to perform the operation on. If you do not wire data to this input, LabVIEW reads data from all channels under the same group. If you wire waveform data to the data type input, LabVIEW uses waveform names. The data type that the channel name(s) in input accepts can be a string or a 1D array of strings. The data type varies according to the data you wire to the data type input.

String 1D Array of Strings
Analog waveform

1D array of:
  • Signed or unsigned integers
  • Floating-point numbers
  • Timestamps
  • Booleans
  • Alphanumeric strings that do not contain null characters
Digital waveform

Digital table

1D array of analog waveforms

2D array of:
  • Signed or unsigned integers
  • Floating-point numbers
  • Timestamps
  • Booleans
  • Alphanumeric strings that do not contain null characters


If you load a complete file or group that contains compressed digital data, LabVIEW automatically inserts the compression channel name in the channel name(s) in array. If you load a subset of a file or group that contains compressed digital data, you must enter the name of the compression channel as the first entry in the channel name(s) in array.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
data type is the type of data that you want data to contain. This input accepts the following data types:
  • Analog waveform or a 1D array of analog waveforms
  • Digital waveform
  • Digital table
  • Dynamic data
  • 1D or 2D array of:
    • Signed or unsigned integers
    • Floating-point numbers, including the following specific data types:
      • Single-precision and double-precision floating-point numbers
      • Complex single-precision and double-precision floating-point numbers
      • (Windows) Extended-precision floating-point numbers
    • Timestamps
    • Booleans
    • Alphanumeric strings that do not contain null characters
return channels in file order? specifies whether this function returns data channels in the same order as they exist in the .tdms file. If the value is FALSE, this function returns data channels in the same order as you specify in the channel name(s) in input. The default is FALSE.
tdms file out returns a TDMS file reference to the .tdms file on which you performed the operation.
group name out returns the name of the channel group on which you performed the operation.
channel name(s) out returns the channel name on which you performed the operation.
data contains the data read from the file in the specified data type. It can consist of any data type depending on which data type you specify in data type and how count is set.
error out contains error information. This output provides standard error out functionality.
end of file? indicates if the end of the file has been reached.

Examples

Refer to the following VIs for examples of using the TDMS Read function:

  • TDMS Read Events Data VI: labview\examples\File IO\TDMS\Standard Read and Write
  • Concurrent Access to TDMS File VI: labview\examples\File IO\TDMS

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit