Error -2147137023 An Internal Fault Occurred When Using the 9881 CANopen Module

Updated May 25, 2022

Reported In

Hardware

  • cRIO-9039
  • NI-9881
  • cRIO-9035

Software

  • LabVIEW Real-Time Module

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 Create.vi:6970001
Possible reason(s):
An internal fault occurred in the NI-IndCom for CANopen driver. Contact National Instruments and provide the copErrorLog.log file. On VxWorks and Phar Lap ETS, this file is under C:\ni-rt\config. On NI Linux Real-Time, this file is under /var/local/natinst/nicanopen. On Windows7 or Windows Vista, this file is under C:\ProgramData\National Instruments\NI-IndCom for CANopen\. On Windows XP, this file is under C:\Documents and Settings\All Users\National Instruments\NI-IndCom for CANopen\.

Solution

This error can come 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 creating the CANOpen Interface and do not reset or close the FPGA reference until the CANOpen interface is closed. 
  • Also, monitor the CompactRIO CPU and memory usage , as a lack of these resources could cause a similar error.

After verifying the above, as per the error message, provide the copErrorLog.log through your normal NI support channel for further analysis.

Additional Information

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