Reading from C Series Channels

NI CompactRIO Device Drivers Help

Edition Date: December 2017

Part Number: 373197L-01

»View Product Info
Download Help (Windows Only)

You can read from C series channels using the FPGA interface or Scan interface.

FPGA Interface

Complete the following steps to read data from an input channel in a CompactRIO, Ethernet RIO, MXIe-RIO, or Single-Board RIO system.

  1. Configure a project for the system.
  2. Make sure the input channel is added to the system.
  3. Right-click the FPGA target in the Project Explorer window and select New»VI to add a new FPGA VI to the system.
  4. Place an FPGA I/O Node on the block diagram of the FPGA VI.
  5. Click the element section of the FPGA I/O Node and select Module»Module/Channel or Onboard I/O»Port»Port/DIO, where Module represents a C Series module and Module/Channel is the channel from which you want to read. If you configure an FPGA I/O Node for multiple channels, the I/O Node accesses the channels simultaneously or sequentially depending on the type of module and other factors.
Note  LabVIEW can read CompactRIO digital input lines as ports for some I/O modules. Refer to the reference topic for the module you are using for more information. You can find the reference topic for the module by navigating on the Contents tab to NI CompactRIO Device Drivers»Devices»C Series Modules»Digital Input Modules»NI 9xxx.

Scan Interface

Complete the following steps to read data from an input channel in a CompactRIO or Single-Board RIO system.

  1. Configure a project for the system.
  2. Make sure the I/O variable for the input channel appears under the module item in the Project Explorer window.
  3. Right-click the RT target item for the controller or device in the Project Explorer window and select New»VI to add a new LabVIEW Real-Time VI to the target.
  4. Place a Timed Loop on the block diagram of the VI.
  5. Configure the Timed Loop to use the Synchronize to Scan Engine timing source.
  6. Place the I/O variable for the channel in the Timed Structure.
  7. Right-click the output terminal of the I/O variable and select Create»Indicator.
  8. Right-click the error out terminal of the I/O variable and select Create»Indicator.
  9. Run the VI.

Related Topics

FPGA Interface

Configuring a Project with Connected Hardware

Creating FPGA I/O Items

FPGA I/O Node

Simultaneously Reading From or Writing to Multiple CompactRIO Channels

Scan Interface

Configuring a Project with Connected Hardware

Using I/O Variables

Timed Loop

Synchronizing to the Scan Engine

WAS THIS ARTICLE HELPFUL?

Not Helpful