Writing to C Series Channels
- Updated2025-04-03
- 2 minute(s) read
You can read from C series channels using the FPGA interface or Scan interface.
Write Data using the 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.
- Configure a project for the system.
- Make sure the output channel is added to the system.
- Right-click the FPGA target in the Project Explorer window and select New»VI to add a new FPGA VI to the system.
- Place an FPGA I/O Node on the block diagram of the FPGA VI.
-
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.
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.
-
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.
- 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.
- Right-click the new FPGA I/O Node and select Change to Read from the shortcut menu.
Write Data using the Scan Interface
Complete the following steps to write data to an output channel in a CompactRIO or Single-Board RIO system.
- Configure a project for the system.
- Make sure the I/O variable for the output channel appears under the module item in the Project Explorer window.
- 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.
- Place a Timed Loop on the block diagram of the VI.
- Configure the Timed Loop to use the Synchronize to Scan Engine timing source.
- Place the I/O variable for the channel in the Timed Structure.
- Right-click the input terminal of the I/O variable and select Create»Control.
- Right-click the error out terminal of the I/O variable and select Create»Indicator.
- Run the VI.
Related Information
- CompactRIO Embedded System
- Configuring a Project with Connected Hardware
Configure your project to discover installed hardware.
- Simultaneously Reading From or Writing to Multiple CompactRIO Channels (FPGA Interface)