Use Scan Engine and FPGA Simultaneously on a CompactRIO (Hybrid Mode)

Updated Oct 5, 2018

Reported In


  • LabVIEW FPGA Module
  • LabVIEW Professional
  • LabVIEW Real-Time Module


  • NI-RIO

Issue Details

I want to use some of my C Series modules in Scan Interface and some in LabVIEW FPGA Interface. There is no explicit option to do this in the chassis properties. How can I set up my project to do this?


Using the Scan Interface and LabVIEW FPGA Interface at the same time on a CompactRIO target is known as Hybrid Mode. This will allow you to use some of the modules with the Scan Interface using I/O variables while other modules are programmed using FPGA. Be aware that some C Series modules are not compatible with the Scan Interface, so using Hybrid Mode may help reduce the amount of programming for the final application. 

Note: A given module can only be used in either Scan Interface mode or FPGA mode, but not both.
  • Using hybrid mode means there will be some C Series modules under the RT Target and some C Series modules under the FPGA Target in the LabVIEW Project.

To set up your CompactRIO in Hybrid Mode, use the following steps:
1. Create a new LabVIEW project and right-click the top-level project item in the Project Explorer window. Select New»Targets and Devices to display the Add Targets and Devices dialog box.
2. If you have hardware installed, ensure Existing target or device is selected, expand Real-Time CompactRIO, and select your CompactRIO controller. Click OK.
3. If you do not have hardware installed, check New target or device, expand Real-Time CompactRIO, and select your CompactRIO controller. Click OK. If you do not have an integrated controller and chassis, right-click on the target and select New»Targets and Devices. Select New target or device, expand CompactRIO Chassis, and select your chassis. Click OK.

4. If the Select Programming Mode dialog box appears, select Scan Interface. Click Continue
5. If the Discover C Series Modules? dialog box appears, click Discover. This will add the C Series modules to your project under the chassis.
6. Add a FPGA target to your chassis by right-clicking on the chassis and selecting New»FPGA Target.
7. If you see the Deploy CompactRIO Chassis Settings? dialog box, choose Deploy Later. You will put the chassis in LabVIEW FPGA Interface mode after setting up the project. 
8. Drag any modules that you want to interface with using the LabVIEW FPGA Interface mode under the FPGA target. The module I/O will also appear in a folder underneath the FPGA Target and disappear from the chassis.   
9. If you have any modules that are not compatible with the Scan Interface, add them to the FPGA Target by right-clicking on the FPGA Target and selecting New»C Series Modules. Add an existing module or manually add the module to your project.
10. If you are connected to the target, right-click the chassis in the project and select Deploy. If you are not connected to the target, ensure that you deploy the chassis in LabVIEW FPGA Interface mode once you connect to the hardware and before you run your application. 
11. Create a new VI under the FPGA Target by right-clicking on the FPGA Target and selecting New»VI. Implement your FPGA code using the FPGA I/O nodes for the modules that are being used in the LabVIEW FPGA Interface mode.

12. Compile the VI. This will add the RIO Scan Interface logic into your FPGA code and allow the application to simultaneously use the Scan Engine and FPGA.

Additional Information

  • Using Hybrid Mode will have two effects on the final application:
  1. The compile time will significantly increase because the compiler has to compile the default RIO Scan Interface logic with your custom FPGA code into one bitfile, please refer to Why Does It Take So Long to Compile an FPGA VI for a CompactRIO in Hybrid Mode?
  2. The number of DMA FIFOs that can be used by your FPGA code will be reduced since the Scan Interface uses two DMA FIFOs. To verify the number of DMA FIFOs available on your target, please refer to  How Many DMA Channels Are on My FPGA Target?
  • If you receive the following error when trying to run your application, ensure the chassis is in LabVIEW FPGA Interface mode.

Error -61141: LabVIEW FPGA: The operation could not be performed because the FPGA is busy. Stop all activities on the FPGA before requesting this operation. If the target is in Scan Interface programming mode, put it in FPGA Interface programming mode.
1. Right-click the chassis in the project and select Properties.
2. Ensure LabVIEW FPGA Interface is selected. Click OK.
3. Right-click the chassis and select Deploy.
  • Note: The cRIO-904x controllers also support DAQmx programming. To add a C Series module to the project in Real-Time CPU mode (for NI-DAQmx programming), right-click on Real-Time Resources and select New » C Series Modules. This is the same process used for adding modules to the project for other programming modes, as described above. 


Not Helpful