Writing to 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 write data to an output channel in a CompactRIO, Ethernet RIO, MXIe-RIO, or Single-Board RIO system.

  1. Configure a project for the system.
  2. Make sure the output 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 from the shortcut menu, where Module represents a C Series module and Module/Channel is the channel to which you want to write. 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 write to CompactRIO digital output 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 FPGA Module»CompactRIO Reference and Procedures»Digital Output Modules»NI 9xxx.

Confirming the State of Digital Output Channels

For digital channels, you also can read the digital output channel. Complete the following steps to read from the digital output channels.

  1. Place another FPGA I/O Node function on the block diagram. This FPGA I/O Node must execute after the FPGA I/O Node you added above.
  2. Click the element section of the FPGA I/O Node and select Module»Module/Channel or Onboard I/O»Port»Port/DIO from the shortcut menu, where Module represents a C Series module and Module/Channel is the channel you want to read.
  3. Right-click the new FPGA I/O Node and select Change to Read from the shortcut menu.

Scan Interface

Complete the following steps to write data to an output 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 output 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 from the shortcut menu 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 input terminal of the I/O variable and select Create»Control.
  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