Catching CAN bus errors in code


Our team has recently finished assembling and wiring our robot. However, while the code department (including me) have been testing the mechanisms, wires were getting unplugged every so often, and we kept thinking it was a software issue until we paused the riolog and noticed that one of our sparkmaxes was not responding to CAN commands. My question: is there an API that we can use to catch CAN errors in code and output them to, say shuffleboard, or are we stuck with having to sift through the riolog for errors that aren’t the normal timeout warnings?

Extra information: we are using Sparkmax and TalonFX motor controllers and their respective libraries. If the API I am looking for is library specific, I would appreciate information on either.


FRC Driver Station Powered by NI LabVIEW — FIRST Robotics Competition documentation You could check the DS for can utilization for a break in the can loop.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.