LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

9862 FPGA VI

Hi, 

I am writing code for a control algorithm, and the code needs to send and receive values form another device using CANbus communication. I am using cRIO and the NI 9862 module. Since I want the loop to run as fast as possible, it is desirable to have the code on the FPGA, but the XNET functions are only available for the RT controller (as well as the host PC, off course), and not for the FPGA. Is there a way to send CAN data (in the form of frames, not signal) from within an FPGA VI? 

thanks

0 Kudos
Message 1 of 6
(3,177 Views)

The old modules using the NI-CAN driver like the 9853 had this functionality but I don't think it can be done with any XNET modules.

 

How fast do you actually need this to be running at?

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 6
(3,156 Views)

Hi Matt, and thank you for your reply.

potentially, the hardware that needs to be talked to can accept updates nearly as fast as 10 kHz. If I have to use XNET functions, I will have to keep them on the RT VI, which can at best run at 1 kHz (whic will require all other calculations being done on the FPGA  to free RT resources).  

So will I be able to use NI-CAN for the NI-9862, or does it only work with XNET? 

thanks

0 Kudos
Message 3 of 6
(3,152 Views)

NI-CAN and NI-XNET are two different drivers with two different sets of hardware. As far as I know. you cannot get an XNET device to use the NI-CAN driver. I guess the question is that the device can accept updates at 10kHz but does it actually need to be updated that quickly? I haven't done a ton with CAN but that seems really fast to me.

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 6
(3,149 Views)

The other device is a low-level PID controller, whereas the code on the RT and FPGA form the high-level control algorith. Ideally the input to the PID needs to be updated as fast as possible to get a smooth and stable control performance, but I geuss in this case I will have to put up with 1 kHz.

Thank you for your feedback.

0 Kudos
Message 5 of 6
(3,145 Views)

I have exactly same use case as this one, I have NI 9068 and NI 9862. 

the minimal rate writing to other device through CANBus is 1kHz. Is there a way to do it through FPGA?

thanks,

0 Kudos
Message 6 of 6
(2,740 Views)