An API, or application program interface, is a set of routines used as the building blocks for software applications. There are two methods of programming expansion I/O targets: CompactRIO Scan Mode or the LabVIEW FPGA Host Interface API.
You can use CompactRIO Scan Mode (also called the RIO Scan Interface or RSI) on the EtherCAT and Ethernet chassis. CompactRIO Scan Mode automatically detects your I/O modules and adds them to a LabVIEW project. You can then drag and drop the I/O variables onto your LabVIEW Real-Time and host VI block diagrams and instantly read and write scaled, calibrated I/O data without any FPGA programming or compiling.
Figure 2. Using CompactRIO Scan Mode
If you want to program the FPGA directly, use the LabVIEW FPGA Module. Once you have written your FPGA VI, it is compiled to a bitstream and deployed to the FPGA. To communicate with the FPGA from your host application, use the LabVIEW FPGA Host Interface API. This allows you to perform functions such as reading and writing to registers, and DMA transfers.
Note that with the EtherCAT chassis, you can use only user-defined I/O variables to talk between the controller’s real-time VI and the expansion chassis’ FPGA VI. (User-defined I/O variables are used to synchronize FPGA data with the NI Scan Engine.) This means that for the expansion chassis’ FPGA VI, you have no FPGA Host Interface, DMA transfer functions, or front panel debugging.
You can only use the LabVIEW FPGA Host Interface API to interface with the MXI-Express RIO.
There are also some limitations on the types of C Series modules that are compatible with each chassis based on the modules’ ability to support NI Scan Mode. Because MXI-Express RIO supports only LabVIEW FPGA, modules that rely on NI Scan Mode, such as the NI 986x CAN modules, are not compatible with MXI-Express RIO. For a complete list of C Series compatibility, see the NI C Series Compatibility Chart.