Read Data Express VI

Owning Palette: Storage/DataPlugin VIs

Requires: Base Development System (Windows)

Returns an array of refnums that represent channel groups or channels in the file. If you select Channel as the Object type to read in the configuration dialog box, this Express VI can return the channel data formatted as dynamic data or arrays of specific data types. You also can use this Express VI to return channel groups or channels that meet query conditions you specify.

Use the Set Properties Express VI to define properties and the Get Properties Express VI to return properties for the channel groups or channels this Express VI returns.

You also can use the Read From Measurement File Express VI to read data from a .tdm, .tdms, or .lvm file.

Example

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs
 Add to the block diagram  Find on the palette

Dialog Box Options

ParameterDescription
Read SettingsContains the following options:
  • Object type to read—Specifies the type of object to return. Contains the following options:
    • Channel group—Returns channel groups in the file.
    • Channel—Returns channels in the channel group or file.
QueryContains the following options:
  • Property to compare—Specifies the property to compare when performing the query. If you select a property from this list, a corresponding input and the Comparison input appear on the block diagram. This Express VI compares the value you wire to the property to the channels or channel groups the storage refnum identifies and returns channels or channel groups that meet the comparison condition.
    • query all data—Returns all data.
    • Name—Name of the channel group or channel.
    • Description—Description of the channel group or channel.
    • Unit—Name of a unit. This property is available only when you select Channel as the Data type.
    • Data type—Data type of the channel. This property is available only when you select Channel as the Object type to read.
    • Minimum—Minimum value of the channel. This property is available only when you select Channel as the Object type to read.
    • Maximum—Maximum value of the channel. This property is available only when you select Channel as the Object type to read.
  • Include only channels from the wired channel group—Specifies whether to query all channels in the file or only channels in the channel group. In order to place a checkmark in this checkbox, the incoming refnum must be a channel group.
Measured data channelsContains the following option:
  • Show terminals—Displays a terminal for Signal on the block diagram.
  • Output data channel as—Specifies the data type of the output. This option is available only if you select Channel as the Object type to read and you place a checkmark in the Show terminals checkbox. Contains the following options:
    • Dynamic data type—Returns the output signals formatted as dynamic data.
    • Array of waveforms—Returns the output signals formatted as a 1D array of waveforms.
    • Array of strings—Returns the output signals formatted as a 2D array of strings.
    • Array of doubles—Returns the output signals formatted as a 2D array of double-precision, floating-point numbers.
    • Array of singles—Returns the output signals formatted as a 2D array of single-precision, floating-point numbers.
    • Array of I32—Returns the output signals formatted as a 2D array of 32-bit signed integers.
    • Array of I16—Returns the output signals formatted as a 2D array of 16-bit signed integers.
    • Array of U8—Returns the output signals formatted as a 2D array of 8-bit unsigned integers.
    • Array of time stamps—Returns the output signals formatted as a 2D array of time stamp values.

Block Diagram Inputs

ParameterDescription
storage refnumSpecifies the reference number for the data object you want to access. After you wire a file refnum to this input, the label changes from storage refnum to storage refnum (file). After you wire a channel group refnum to this input, the label changes from storage refnum to storage refnum (channel group). After you wire a channel refnum to this input, the label changes from storage refnum to storage refnum (channel).
ComparisonSpecifies the condition to use when comparing the value you wire to the property to the value of the same property in the channel or channel group. This input appears only if you select a property from the Property to compare list in the configuration dialog box.
error inDescribes error conditions that occur before this node runs.
indexSpecifies where this Express VI starts reading values from a channel. This input appears only if you select Channel as the Object type and if you place a checkmark in the Show terminals for data channel check box in the configuration dialog box.
countSpecifies the number of values for this Express VI to read from a channel. This input appears only if you select Channel as the Object type and if you place a checkmark in the Show terminals for data channel check box in the configuration dialog box.

Block Diagram Outputs

ParameterDescription
storage refnumReturns a reference number for the data object this Express VI accesses. You can wire this refnum to another VI to complete another operation on the same object.
storage refnumsReturns an array of refnums that represent the channel groups or channels in the file. If you select a property from the configuration dialog box and wire a value to compare to the Comparison input, this refnum returns the channel groups or channels that meet the query condition. If you do not specify a value to compare, this refnum returns all channel groups or channels.
SignalReturns a signal formatted according to the data type you specified in the configuration dialog box. This output appears only if you select Channel as the Object type and if you place a checkmark in the Show terminals for data channel check box in the configuration dialog box.
error outContains error information. This output provides standard error out functionality.

Example

Refer to the TDM Event Data.lvproj in the labview\examples\File IO\DataPlugins\TDM\TDM Event Data directory for an example of using the Read Data Express VI.

 Open example  Find related examples