TDMS Read

Reads data from a .tdms file.

© 2017 National Instruments. All rights reserved.

1378

Inputs/Outputs

datatype_icon

count

Maximum number of data elements to read for each channel.

Default value: -1 — Causes this node to read all available elements.

datatype_icon

offset

Number of data elements into the .tdms file at which this node begins to read.

Default value: 0

datatype_icon

tdms file

A reference to a .tdms file. Use the TDMS Open node to obtain the reference.

datatype_icon

group name in

Channel group on which to perform the operation.

Reading Behavior When group name in Is Not Wired

If you do not wire data to group name in, this node reads data from the current group in the file. The current group is either the first group in the file when you run this node for the first time or the nth group at the nth loop iteration when you run this node continuously for multiple loop iterations. The order that this node reads groups is the same order that the TDMS List Contents node returns groups. If this node attempts to run after reaching the last group, you receive an end of file error.

Note The TDMS List Contents node and the TDMS Get Properties node reset the current group to the first group in the file. Resetting the current group to the first group in the file impacts the group read by the next TDMS Read node when you do not wire group name in.
datatype_icon

channel name(s) in

Channel or channels to read data from.

channel name(s) in accepts a string or a 1D array of strings. The data type varies according to the data you wire to data type.

Determining the Data Type of channel name(s) in

The following table shows how the data type of channel name(s) in varies according to the data type of data.

data channel name(s) in Comments

Analog waveform

1D array of alphanumeric strings that do not contain null characters.

String

If you do not wire channel name(s) in and wire waveform data to data, channels use waveform names.

1D array of:
  • Signed or unsigned integers
  • Floating-point numbers
  • Timestamps
  • Booleans
String or 1D Array of Strings

If data layout is non-interleaved and you wire a 1D array of strings to channel name(s) in, this node uses the first element of the 1D array as the channel name.

If data layout is interleaved and you wire a string to channel name(s) in, this node uses this string as the channel name of the first element in the 1D array and uses Untitled, Untitled1, Untitled2... as the channel names of the rest of the elements.

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
1D Array of Strings

If you do not wire channel name(s) in and wire waveform data to data, channels use waveform names.

Reading Behavior When channel name(s) in Is Not Wired

If you do not wire data to channel name(s) in, this node reads data from all channels under the same group and returns the data from those channels in the same order as they exist in the .tdms file.

Reading Compressed Digital Data

If you load a complete file or group that contains compressed digital data, this node 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.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Default value: No error

datatype_icon

data type

The type of data you want the node to return.

This input accepts the following data types:

  • Analog waveform or a 1D array of analog waveforms
  • Digital waveform
  • Digital table
  • 1D or 2D array of:
    • Signed or unsigned integers
    • Timestamps
    • Booleans
    • Alphanumeric strings that do not contain null characters
    • 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
      • Extended-precision floating-point numbers
datatype_icon

return channels in file order

A Boolean specifying whether the node returns data channels in the same order as they exist in the .tdms file.

True Return data channels in the same order as they exist in the .tdms file.
False Return data channels in the same order as you specify in channel name(s) in.

Default value: False

datatype_icon

tdms file out

A reference to the .tdms file.

datatype_icon

group name out

Channel group on which you performed the operation.

If you do not specify a group name, this output returns Untitled.

datatype_icon

channel name(s) out

Channel or channels on which you performed the operation.

If you do not specify a channel name, this output returns Untitled.

datatype_icon

data

Data that the node read from the .tdms file.

If data has scaling information, the node automatically scales the data.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

datatype_icon

end of file?

A Boolean that indicates whether the node has reached the end of the file.

True The node has reached the end of the file.
False The .tdms file still contains data that the node has not parsed.