05-09-2021 06:51 PM
Hello everyone,
I'm new to VeriStand, but at first wanted to use the NI 9853 CAN module in the scan mode, but then I figured out it is not supported and I have to use the FPGA mode. Can anyone confirm that the module is actually compatible with NI VeriStand FPGA module, and that I would be able to read the CAN bus data in VeriStand. Can anyone guide me on where to start looking for some example in that manner?
Thanks in advance
05-11-2021 03:01 AM
NI VeriStand only natively provides support CAN for NI-XNET driver.
NI 985x is programmed using NI-RIO driver thus it is not natively supported under VeriStand. See NI 9853 and 9852 with CompactRIO FAQ. It is possible to create your own custom device but I would recommend to use NI-986x which is programmed using NI-XNET driver. See Do I Need to Compile a Blank Bitfile for NI-XNET in VeriStand.
DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
09-16-2022 02:33 AM
I realize this is an old thread but I'm facing the same challenge.
I need to get a CAN module working on a cRIO-9039 chassis on very short notice and all I have available on-site is a NI-9853 module.
I'm aware of the XNET capability of the 986x modules but unfortunately ordering one would delay the project to much, so I'll have to make do with what I've got.
As I understand it, I'll need to add some code in the FPGA bitfile to read/write CAN frames from the bus and send/recieve them to/from the controller. Then, I'll need a custom device that converts the CAN frames to/from Veristend channels, using a DBC file. Right?
Is there any Example code/documentation/guidance available that could help me get started and hopefully bring this to a successfull result?
09-16-2022 09:03 AM
This does sound like a pain. I have used one of those C Series modules, with an R series FPGA card, and an expansion chassis, to read CAN frames. There was an example in the Help >> Find Examples that showed how to do it. I don't remember the details but it created a DMA buffer both to and from the FPGA card that CAN frames were put on as an array of bytes. Then the host needed to convert those back into raw frames. If you need to then convert those to signals, you can use XNet. I created some example code on how this can be done here.
It all sounds possible, but I'm less familiar with the VeriStand side so I don't know what limitations you'll run into.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-16-2022 09:05 AM
Hi Pianne,
I would recommend you to refer to the shipping examples at Example Finder >> Hardware Input and Output >> CompactRIO >> Module Specific IO >> CAN >> 985x with NI-XNET
You can also refer to Protection-and-Counter-Addon as a starting point for the custom device.
DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense