Error -2147137023 When Using the 9881 CANopen Module

Updated Sep 8, 2021

Reported In


  • cRIO-9039
  • NI-9881

Issue Details

I am using the NI-9981 CANOpen module inside a CompactRIO. After successfully compiling an FPGA VI with the 9881 in the project and running the RT code, I receive the following error:
Error -2147137023 occurred at CANopen Emergency 


This error comes from the FPGA registers required for the NI 9881 to function being closed while running the CANOpen API. To avoid this error, you must open your reference and leave it open until the end of your code.

Ensure that the FPGA bitfile is running before we create the CANOpen Interface and do not reset or close the FPGA until the CANOpen interface is closed. 

Additional Information

The FPGA bitfile is required to be open to open low-level access registers, despite not having user access when running the 9881 CANOpen API in hybrid mode.