LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-9862 module not working properly with hybrid mode

Hi,

 

I have cRio 9035. And I'm using NI 9862 C module to read CAN messages from car CAN bus. Also, I have other C modules to read/write analog signals. So, I need to have FPGA code for that purpose. 

 

However, NI 9862 module only works in scan mode. As a workaround, I'm using hybrid mode, in which I added the CAN module under "Real-Time Scan Resources" in LabView project (snapshot attached). That worked fine, and I manged to create nxSession (using XNET drivers) from cpp code. However, the CAN module seems to be not responding and I'm unable to see any CAN messages coming thru it. 

 

I tried to deploy cRio into scan mode, and I was able to see CAN messages correctly. But using this mode will block me from accessing other modules thru FPGA code.

 

Any suggestions?

 

Thanks

Mohammed

0 Kudos
Message 1 of 3
(2,167 Views)

Hi,

 

What do you mean by creating nxSession (using XNET drivers) from cpp code? Are you using the NI-XNET API for LabVIEW Real-Time? I do not see a LabVIEW Real-Time VI added under your cRIO-9035 in the image you attached.

 

Did you follow the steps described in this Knowledge Base article to configure your cRIO in Hybrid Mode?

 

Regards,

 

Gustave

 

0 Kudos
Message 2 of 3
(2,135 Views)

Hi,

 

We have a VI (carControl) under FPGA target that does the interfacing between analog modules and variables used in RT c++ code. There is no logic related to the CAN module in that VI.

 

The CAN module is initialized and used thru RT c++ code. Here's the code snippet for initializing an XNET session with the CAN module:

 

#include <nixnet.h>

 

nxStatus_t l_Status  = nxCreateSession(l_pSelectedDatabase, l_pSelectedCluster,
l_pSelectedFrameList, l_pSelectedInterface, nxMode_FrameInStream,
&m_SessionRef);

 

Am I missing anything in LV part?

 

Thanks

Mohammed 

0 Kudos
Message 3 of 3
(2,120 Views)