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.


icon

Inputs/Outputs

  • ci64.png count (-1: all)

    count specifies the maximum number of data elements to read from the .tdms file for each channel. The default is –1, all available elements.

  • ci64.png offset (0)

    offset specifies the number of data elements into the .tdms file at which the function begins reading the .tdms file. The default is 0.

  • cgnrn.png tdms file

    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.

  • cstr.png group name in

    group name in specifies the channel group on which to perform the operation.

    If you do not wire data to this input, the following behavior occurs:

    • LabVIEW reads data from the current group in the file. The current group is either the first group in the file when you run this function for the first time or the nth group at the nth cycle when you run this function continuously for multiple cycles.
    • The order that the TDMS Read function reads groups is the same order that the TDMS List Contents function returns groups.
    • After LabVIEW reaches the last group, if the TDMS Read function attempts to run, LabVIEW returns an end of file error.
    Note The TDMS List Contents function and the TDMS Get Properties function will 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 function when you do not wire the group name in input.
  • c1dstr.png channel name(s) in

    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.

    String1D 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.

  • cerrcodeclst.png error in (no error)

    error in describes error conditions that occur before this node runs. This input provides standard error in functionality.

  • c1dmsdt.png data type

    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
  • cbool.png return channels in file order? (F)

    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 TRUE or if you do not specify the channel name(s) in input, 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.

  • ignrn.png tdms file out

    tdms file out returns a TDMS file reference to the .tdms file on which you performed the operation.

  • istr.png group name out

    group name out returns the name of the channel group on which you performed the operation.

  • i1dstr.png channel name(s) out

    channel name(s) out returns the channel name on which you performed the operation.

  • i1dmsdt.png data

    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.

  • ierrcodeclst.png error out

    error out contains error information. This output provides standard error out functionality.

  • ibool.png end of file?

    end of file? indicates if the end of the file has been reached.

  • Examples

    Refer to the following example files included with LabVIEW.

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