Error -65536 When Using CompactRIO in Hybrid Mode

Updated Feb 26, 2020

Reported In

Software

  • LabVIEW FPGA Module

Issue Details

I get the following error from an I/O Variable when I am running my host VI that uses both the Scan Engine and FPGA methods of communication with the C Series Modules in my chassis.

Error -65536 occurred at Shared Variable in XXXXXXX.vi.

Unable to communicate with the module. Reinsert the module and check connections. If the chassis is in FPGA Interface programming mode, make sure you have opened an FPGA reference to a bitfile or FPGA VI with Scan Interface support for the module you are trying to access using the Scan Interface.


Solution

  • When using CompactRIO in Hybrid Interface Mode, open a reference to the FPGA before reading or writing to Scan Engine I/O variables. 
  • Do not close your FPGA reference until you are done reading or writing your I/O variables.
  • You can also add a Wait after opening your reference to ensure your Scan Engine has properly initialized 

Additional Information

When using Scan Engine and FPGA modes at the same time the compiler has to combine the default RIO Scan Interface bitfile as well as the user FPGA code that was created into one bitfile. Doing this essentially means that the scan engine is running in your bitfile. 

This means that to use an I/O variable, you must ensure the FPGA code is running first. If you try to access an I/O variable before you have opened a reference to the FPGA VI or after you have closed a reference to the FPGA VI, then you will get this error.

Alternatively, if you are getting Error -65589 after correcting Error -65536, please make sure that the FIFOs are initializing completely before executing the Scan Engine calls. 



It is also possible to receive this error in initial calls to the IO variable or UDV after opening the FPGA reference.