The IO Sample Method module method acquires a single sample from the module. The channel number, terminal mode, and voltage range are configurable at run time. To use this module method, select it in an FPGA I/O Method Node that is configured for the appropriate device and/or channel.
Note   Do not configure the VI to run an IO Sample method and an AI IO Node in parallel when both are targeted to the same connector. This will cause incorrect reading from the IO Sample method. The AI IO Node still gives the correct reading, but will not be able to meet the specified data rate. The same thing applies to having two IO Sample methods run in parallel when both are targeted to the same connector.
  • Voltage Range [i+1]—Contains the voltage range setting that gets loaded into the module conversion pipeline. This setting affects the data to be sampled one iteration into the future. Refer to Conversion Timing for more information.
  • Terminal Mode [i+1]—Contains the terminal mode setting that gets loaded into the module conversion pipeline. This setting affects the data to be sampled one iteration into the future. Refer to Conversion Timing topic for more information.
  • Channel Number [i+1]—Contains the channel number that gets loaded into the module conversion pipeline. This setting affects the data to be sampled one iteration into the future. Refer to Conversion Timing topic for more information.
  • Data [i]—Returns the data from the current sample.
  • error in—Describes 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 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.
    status Returns TRUE (X) if an error occurred before this VI or function ran.

    Returns FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

    code The error code number identifying an error. The default is 0.

    If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

    source Always contains an empty string. Strings are not supported in LabVIEW FPGA.
  • error out—Contains 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. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.
    status Returns TRUE (X) if an error occurred before this VI or function ran.

    Returns FALSE (checkmark) to indicate a warning or that no error has occurred.

    code The error code number identifying an error. The default is 0.

    The default is 0.

    If status is TRUE, code is a nonzero error code.

    If status is FALSE, code is 0 or a warning code.

    source Always contains an empty string. Strings are not supported in LabVIEW FPGA.
  • Using This Method

    The IO Sample method provides an efficient and flexible interface to the module. Use this method to acquire a single sample from any of the channels on the module, at any range and with any available input mode.

    When this method executes, the module performs a single conversion on the next channel present in the conversion pipeline on the module. The data from this conversion is returned via the Data [i] method output. While the conversion data is read from the module, the new configuration information specified by the three method inputs (Voltage Range [i+1], Terminal Mode [i+1], and Channel Number [i+1]) is loaded into the configuration pipeline on the module. The pipeline is one sample deep. The configuration information specified on one execution of the IO Sample method determines which channel will be sampled by the IO Sample method one iteration into the future. Refer to the Conversion Timing topic for more details.