Using the NI 987x Modules in Hybrid Mode on CompactRIO

Updated Dec 13, 2022



  • NI-9871
  • NI-9870
  • CompactRIO Controller


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


  • NI-Serial

I am trying to use my NI 9870 or NI 9871 module on my CompactRIO (cRIO) that is in Hybrid Mode. When I expand the module in my project, I do not see the ports and I cannot modify the settings for the ports. How do I discover, configure, and communicate with the serial ports of my NI 987x modules in hybrid mode?

You have to install NI-Serial 9870 and 9871 Scan Engine Support on your Real-Time controller by using a custom software installation. This can be done in NI Measurement and Automation Explorer (MAX) by the following steps:

  1. Expand your Real-Time Target under Remote Systems, right-clicking Software, and selecting Add/Remove Software.
  2. Choose Custom Software Installation and click Next.
  3. In the Custom software installation window, select the NI-Serial 9870 and 9871 Scan Engine Support.
  4. Click Next to start the installation.
  5. After the NI-Serial 9870 and 9871 Scan Engine Support is installed, add your cRIO and modules to a LabVIEW project in Hybrid Mode . 
    1. Ensure you keep the 987x module under the Real-Time target. 
  6. If you do not already have a main FPGA VI, create a new FPGA VI, and run it interactively and ensure it deploys to the target. After the FPGA bitfile successfully deploys, you should now see the device ports in NI MAX. 

Additional Information

If you are planning to load and run the FPGA VI programmatically from the Real-Time VI using the Open FPGA VI Reference or Run Method, make sure that a considerable delay (at least 2 seconds) is left between the moment when the FPGA VI starts running and when the serial communication is opened with the NI VISA VIs. This will ensure that the needed intermediate layers are already up and running before trying to establish communication. Not doing this could lead to error -1073807343 when opening the VISA port.

If your Real-Time VI uses FPGA invoke method Run, you should place wait function after this method.