Reads data from a text-based measurement file (.lvm) or binary measurement file (.tdm or .tdms).


icon

Dialog Box Options

Option Description
Filename

Displays the full path to the file from which you want to read data. The Express VI reads data from the file that this parameter specifies only if the Filename input is unwired. If you wire the Filename input, the VI reads data from the file that this input specifies instead.

File Format Contains the following options:
  • Text (LVM)

    Sets the file format to text-based measurement file (.lvm) and the file extension in File Name to .lvm.

    To enable this VI to read data from generic text files, place a checkmark in the Read generic text files checkbox.

  • Binary (TDMS)

    Sets the file format to binary measurement file (.tdms) and the file extension in File Name to .tdms.

    If you select this option, the Time Stamps and Generic Text File sections are not available.

  • Binary with XML Header (TDM)

    (Windows) Sets the file format to binary measurement file (.tdm) and the file extension in File Name to .tdm.

    If you select this option, the Time Stamps and Generic Text File sections are not available.

    When you select this file format, you enable the Lock file for faster access checkbox. Selecting this checkbox makes reading and writing significantly faster (at the expense of the ability to multitask certain activities). It is recommended that you use this option in most cases.
    Note When this option is enabled, no two Express VIs can access the same file at the same time when one of them is writing a "series of files."
Action Contains the following option:
  • Ask user to choose file

    Displays a dialog box that prompts users to select a file.

Segment Size Contains the following options:
  • Retrieve segments of original size

    Retrieves segments of the signal from the file in the original size.

  • Retrieve segments of specified size

    Retrieves segments of the signal using the size you specify in Samples.

    • Samples

      Specifies the number of samples you want to include in the segment size read from the file. The default is 100. This option is available only when you select the Retrieve segments of specified size option.

Time Stamps Contains the following options:
  • Relative to start of measurement

    Displays the timestamp in terms of seconds starting from zero. For example, 100 in relative time equals 1 minute and 40 seconds.

  • Absolute (date and time)

    Displays the timestamp in terms of time elapsed since 12:00 a.m., Friday, January 1, 1904, Universal Time [01-01-1904 00:00:00].

Note These options are available only when you select the Text (LVM) option from the File Format section.
Generic Text File Contains the following options:
  • Start row of numeric data

    Indicates the first row of numeric data. The Express VI begins reading data from this row. The default is 1.

  • First row is channel names

    Specifies that the channel names are in the first row of the data file.

  • First column is time channel

    Specifies that the time data for each channel are in the first column of the data file.

  • Read File Now

    Imports the data from the file you specify in File Name into the Sample data table.

  • Sample data

    Displays the data from the file you specify in File Name when you click the Read File Now button.

Note These options are available only when you select the Text (LVM) option from the File Format section.
Delimiter Contains the following options:
  • Tab

    Uses tabs to delimit fields in the text file.

  • Comma

    Uses a comma as the decimal separator.

Note These options are available only when you select the Text (LVM) option from the File Format section.
Decimal Point Contains the following options:
  • . (dot)

    Uses a period as the decimal separator.

  • , (comma)

    Uses a comma as the decimal separator.

Note These options are available only when you select the Text (LVM) option from the File Format section.

Inputs/Outputs

  • cbool.png Enable

    Enables or disables the Express VI. The default is ON or TRUE.

  • cerrcodeclst.png error in (no error)

    Describes error conditions that occur before this node runs.

  • cpath.png Filename

    Specifies the name of the file from which you want to read data.

  • cbool.png Reset

    Resets the file position such that the next read starts at the beginning of the file.

  • iexpdynwdt.png Signals

    Contains the output signal or signals.

  • ipath.png Filename Out

    Returns the name of the file.

  • istr.png Comment

    Returns the appended comment of each data set in the .lvm or .tdm file.

  • ierrcodeclst.png error out

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

  • istr.png Description

    Returns the description in the header of the .lvm or .tdm file.

  • ibool.png EOF?

    Returns TRUE when the Express VI reaches the end of the file.

  • You also can use this VI to read Multisim data if you have Multisim 9.0 or later installed. Use the Write To Measurement File Express VI to write data to a measurement file. You also can use the Storage/DataPlugin VIs to read from and write to .tdm files.

    Note The behavior of this VI changes depending upon the target. If the current target does not or might not have a host computer connected, the configuration dialog box displays warnings next to options that are invalid without a host. If you configure this VI to prompt for input and run the VI on a target with no user interface, such as the Real-Time Module with no host computer connected, this VI returns an error.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\File IO\TDMS\Express Read and Write\TDMS Express Read Data (Time Domain).vi