Hi so my team and I have been having an issue with CAN ID’s. We have multiple sparks that think they are assigned to the same CAN ID (for example, what should be 1,2,and 3 all read as 1), we have one spark that thinks it’s 2 numbers (for example, what should be 1 thinks it’s 1 and 2) How can we resolve these problems?
How do you know what the spark thinks? Can you provide screenshots showing what you’re seeing?
Connect with the USBC cable to the spark directly and renumber them.
While you are in there configure the current limits…
It’s pretty common to have these problems when initially setting CAN IDs on new (or repurposed) controllers. We’ve found that if all of the controllers are on and communicating over CAN, trying to reset one’s CAN ID often sets the CAN ID on others holding the same “old” ID. For example: two controllers are set to “1” and we try to set the first to “2”, afterward both are now “2”. This can happen even when connecting directly to USB-C to the one you’re trying to reset. The easiest solution is to power off the robot and reprogram them one by one, connecting USB-C to each in turn. (The SparkMax’s control circuitry will run from USB-C power.) If you can’t get to the USB port on some of them, you may be able to pull PDP fuses to power off the conflicting one, then reprogram the target one over CAN.
I’d be surprised if one controller is actually holding 2 CAN ID’s, though. My guess would be that there’s just general confusion on the bus due to conflicts.
A tip that has worked well for my team: set the CAN ID to the same value as the PDP/PDH circuit it is connected to. Makes tracing things easier. (Except you can’t use ID 0, so that one has to be something different; we usually pick another ID that has a 0 in it, like 20). And label the controllers with their CAN ID’s.
I’ve also noticed that sometimes when you re-ID a spark (e.g. 3 to 4) then the Rev client will remember that change and the spark will blink both for ID 3 and for ID 4 until you unplug and replug the device from the computer to refresh the Rev client, at which point it only blinks for the updated ID.
Finally, make sure to remember to Burn Flash when you change the IDs, otherwise they’ll get reset when you turn the robot off and on again.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.