Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Read Data (Windows)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

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 VI reads waveforms associated with the channel. You also can use this VI to return channel groups or channels that meet query conditions you specify.

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

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

Examples

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

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 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.
    • Free integer 1-6—Any integer that you want to associate with the channel. This property is available only when you select Channel as the Object type to read.
    • Free number 1-6—Any double-precision, floating-point number that you want to associate with the channel. This property is available only when you select Channel as the Object type to read.
    • Free text 1-3—Any text that you want to associate with the channel group or channel.
  • 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 refnum 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).
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 VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

Block Diagram Outputs

ParameterDescription
storage refnumReturns the refnum to the file the VI accessed. You can wire this refnum to another VI to complete another operation on the same file.
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 for channels.
error outContains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.

Examples

Refer to the following VIs for examples of using the Read Data VI:

  • Read TDM File VI: labview\examples\file\storage.llb
  • Read Event Data VI: labview\examples\file\storage.llb

Resources


 

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