So my team has used CAN for 3+ years, but we’ve never used a 2CAN before. We recently decided to try one out and got a 2CAN 2.0, however when we installed it (hardware, firmware update, and plug-in) and tested CAN functionality with our unmodified code, we got a fast red strobe on the status light and the web dashboard indicated there was no CAN traffic.
We’re pretty sure this isn’t a wiring issue since we just added the 2CAN into our 2013 robot, which worked with the serial adapter.
2CAN 2.0 (fw ver_2.28)(Plug-in was the default plug-in already on the cRIO)
Remember when switching from serial based CAN to the 2CAN, you have to go into the Imaging Tool and select the 2CAN plugin and select “Apply” (you do not need to reformat the controller). This will load the correct plugin to let the controller talk to the 2CAN.
I believe that the Imaging Tool loads with the 2CAN plugin by default, be sure to click apply just to make sure and power cycle the entire robot. I’d also make sure you have a termination resistor at the end of the chain.
So I re imaged the cRio with the 2CAN plugin selected. However, after the cRio was rebooted and power cycled, the 2CAN still had a red strobe and indicated it could not detect CAN traffic.
Interestingly enough, when I accessed the web dashboard and changed the CAN bandwith to the lowest setting (125kb/s) the 2CAN status light turned green and the web dash indicated that CAN communication was good and error free. However, the web-dash didn’t indicate any data for any of the CAN nodes (ie temp, load, etc were all 0) and additionally when I tried to run our code, the cRio was returning CAN timeout and device not detected errors.
At this point I’m thoroughly confused, especially since after all this I reverted to the serial adapter configuration, and it worked perfectly. Does anyone have any insight as to what’s going on?
Yeah definitely leave the bitrate at 1Mbps. That’s what used in FIRST, the other bitrates are for non-FIRST uses and definitely won’t work. Also the RED led state will stay RED until 2CAN sees some CAN traffic regardless of the firmware level/ plugin, or presence of the cRIO. It does sound like a cabling issue which is strange since you mentioned you just swapped out connecting the RJ11 from a Jag to the RJ11 of the 2CAN.
Can you try this simple setup after setting the bitrate back to 1Mbps : take a powered 2CAN and a single powered jag and connect their RJ11s together. 2CAN will automatically poll for the Jag and will switch to orange LED if everything is well.
One difference between the 2CAN and serial gateway is the 2CAN has an internal 120 ohm termination - that way you only need to add 120ohm at the end. With serial gateway you have to terminate both ends. So you might want to remove one of the termination resistors.