PDP CAN receive timeout

We’ve been having this problem all year. Last year, I wrote a program to stream sensor readings to the DS for debugging purposes. This year, it didn’t work. Most of the sensors still work, but this year the amperage readings on the PDP cause all kinds of CAN timeout errors.

The line of code that doesn’t work:

for (int i = 0; i < 16; i++) 
    table.putNumber("pwr_c_" + i,pdp.getCurrent(i)); // current draw for all 16 channels

The error looks something like “CTRE CAN Receive Timeout”.

I’ve tried this with two different Rios and two different PDBs, with no luck. The weird part is, the problem only affects the current readings. Voltage and temperature readings for the PDB are working fine.

A couple of things to try when troubleshooting:

  1. with the robot powered off, measure the resistance between the yellow and green wires. It should be 60 ohms if you have the correct number of terminating resisters which are two 120 ohm resisters. The roborio has one of the terminating resister and you should have one other. The PDP has a terminating resister jumper used to set or remove the PDP terminating resister. Our team forgot to take out the terminating resister from the PDP this year, and we have a third CAN sensor which had a terminating resister as well, so we weren’t getting CAN traffic.
  2. On the driver station, there is a little icon on the lower left which looks like a lightning bolt. Click that and you can see information on the CAN bus traffic like utilization and message errors.

We had this problem recently. It turned out that someone had changed the number of the PDP while updating it. Make sure that you PDP is numbered 0.