01-28-2016 10:32 AM
In order to further debug the issue I discovered the tool known as NI CAN BusMonitor. By having my sensor, the cRIO (with NI9881) and the USB-8472 connected all to the same CAN network (Breakout box) I was able to look closer at what kind of traffic was running on the network. As it appears, when the NI code is not running, but the simulator is turned on, I'm receiving data from the sensor (see figure, Arb.ID 0x714). This line keeps updating every second, though the data (0x00, indicating bootup/init) remains the same.
By running the code on the cRIO, the top line (see figure, Arb.ID 0x0) starts to update. However, at this point the bottom line stops updating (freezes). The data in the top line indicates that node 20 (0x14) should go to Pre-Operational state (0x80), which makes sense according to my code. Though this line keeps getting repeated as though it's waiting for a reply/confirmation from the node. Still, from what I've read, it doesn't appear like a reply is to be expected. Further down the program I'm setting the NMT message "Start Remote Node", which doesn't get noticed in the BusMonitor at all.
Another thing to point out is that I'm receiving the error code 3FF6200C (as seen on the right side of the figure). The error message reads "CAN transceiver warning, typically indicated by the NERR signal. A fault exists on the bus, but communication continues. Solution: Verify that cabling is correct.". According to this link the error could indicate a lack of proper termination. Though in that case it appears at least some data arrives, which is not the case here.
01-29-2016 12:34 PM - edited 01-29-2016 12:38 PM
I'm not exactly sure what kind of CAN network is required by your sensor but it seems to me we are mixing two different CAN nodes, high speed and low speed.
Since 8472(low-speed) is able to talk to your sensor I would assume sensor requires low speed CAN network.
9881 CANopen is built on top of high-speed CAN network and I know high speed and low speed nodes can’t mix. This might be the case indeed and error 3FF6200C could be hinting that.
http://digital.ni.com/public.nsf/allkb/84210794086E9C0886256C1C006BE6AE
http://digital.ni.com/public.nsf/allkb/B5D65DF99543205486256FA500670B09
When it comes to CANopen profile 9881 supports all common Application profiles including CIA 301 therefore I don’t think this might be the problem. In the cRIO canOPEN project there is a VI called CANopen Read Write CAN Frame. This VI allows you to read raw CAN frames of the network. Are you able to use this VI at least?
02-01-2016 03:36 AM
After more reading, this was the conclusion I landed at as well. Like I previously mentioned, I'm fairly new to the CANbus technology, and I was not aware of the physical difference between the high-speed and low-speed networks. It's correct as you say that my sensors utilize the low-speed/fault-tolerant according to the SIIS2 standard, and this appears to be incompatible with the high-speed NI9881 module. Sadly, it does not appear possible to use the low-speed modules with the new CANopen API from what I can see. And with the Linux RIOs it appears as though I have to program the CANbus on the FPGA in order to interface with for example NI9852.
Thus I'm looking into utilizing a third-party CANbus high-speed/low-speed converter (this one) in order to use NI9881. Would there possibly be some other NI hardware that exists to perform this conversion? Do NI have any plans to expand the CANopen API to work with the low-speed/fault-tolerant devices?
02-01-2016 04:33 PM
Simenfu,
Your research is correct. Current CANopen API does not support CANopen over low-speed CAN network.
CANopen protocol does define low-speed CAN as an option for the physical layer but only occasionally used, most of the CANopen devices utilize high-speed CAN. We will definitely make a note of your feedback for the future product improvements.
I have not used high-speed to low-speed CAN converter but from the theoretical prospective it should work. Essentially all you need to do is to change CAN network characteristics which perhaps might be accomplished with this convertor.
Lastly, there is a reference example for using NI-9853 as a CANopen device. This example is more of an open source example which was not tested or developed by NI R&D but perhaps it can help you achieve what you want. Of course you would have to modify it so it works with NI-9852 but modification shouldn’t be too drastic.
http://www.ni.com/example/31093/en/
I hope this helped
02-02-2016 02:51 AM
I appreciate your help in this matter, Miro_T! I will most likely try out the converter first, though if it should fail I will look into the example you mention.
It would definately be of great help to make the new CANopen API support the older modules, or at least a low-speed/fault-tolerant module as well. Although the low-speed mode is not used for most applications, it is still a standard in subsea technology (SIIS2, CiA443), and it would be of great benefit to have a new/updated API which is more supported and easier to program.
02-08-2016 07:53 AM
I have now received and tested the PEAK TJA1054 Converter in order to interface my low-speed/fault-tolerant sensors with the high-speed NI9881 module. The setup does indeed work, and I now have communication between the devices. Furthermore I would also like to mention that I'm able to skip the blank FPGA file with my setup (cRIO-9067 running NI-RIO 15.0 with LabVIEW 2014 SP1 f3 as development platform).
02-08-2016 01:30 PM
Glad to hear things work for you.
So to conclude, CAN low-speed and high-speed mismatch was the root cause of this problem. Hopefully this thread will help someone else in the future.
Thank you for your detailed posts.
02-20-2017 09:03 PM
How about your problem ? Have been solved ? I met the same problem .I want to control a slave by Canopen bus , but i don't know how to connect the hardware and how to configue . Can you help me , give me some detailed information ?
02-20-2017 09:24 PM
Hello,
Can you give a more detailed descriptions about your question?
What hardware are you using? Also NI9881 and cRIO-9067?
Thanks!