Our team is switching to Talon SRX controllers for the upcoming season. This summer we were able to get the CAN bus working to drive 4 motors using tank drive (one master and one follower on each side). We were starting to play around with PID position control to drive the robot forward a set distance in autonomous using quad encoder readings, but after a while the CAN bus stopped working. After checking the wiring, now only one controller is recognized in the RoboRio CAN interface, not the other 3. However, the one that is recognized blinks red when the robot is first turned on, then blinks orange after a few seconds. The other three blink orange right away when the robot is turned on. Then when the robot is enabled and we drive it, only one controller works. When the robot is enabled, the working controller is solid orange, but the other three still blink orange. I am new to the use of SRX controllers and am looking for some advice for how to fix or troubleshoot this issue.
Have you updated your firmware?
Also, you probably don’t want to use PID position control to drive a set distance - that method gets clobbered by wheel slippage. Look into using velocity control to drive at a low speed, or motion profiling. Both will likely work better.
Check the CAN wiring between the working Talon and the rest.
Make sure you’r terminated (PDB last in the daisy chain with the jumper installed).
If a Talon is blinking yellow, you aren’t talking to it.
We had a similar issue earlier - for us, it was that all of the SRXes wanted to use the same CAN ID. In the roboRIO web interface, try changing the ID of one of the recognized ones and see if that fixes the problem.
Sent from my Nexus 6P using Tapatalk
sounds to me like a wiring issue.
Assuming that you got tank drive working, that you already set your CAN ID’s on the web interface, and that the firmware is up to date.
just a single bad solder connection, or if green/yellow got swapped can shut down the CAN BUS.
I would start with the connection immediately following or before the one working srx.
If you first tune PID loops for distance, then enables Talon SRX’s Motion Magic, that will accomplish exactly what you are describing without needing additional software.
Not quite. Motion magic works best with a feedforward gain (a feature not available in a pure position loop) and the behavior (and thus tuning) of the loop with the feedforward gain is rather different than without.
Moreover, what looks like “good tuning” for a pure position loop may not be good tuning for a motion magic loop, even if they both are running a position servo - the perturbations when you’re actually following an achievable profile are going to be much smaller than the step function profiles you’d likely be using if you’re taking the naive approach of “servo to desired position,” and this matters.
If you only desire to drive in straight lines and stationary turns, motion magic is a simple solution for MP that will do what you want - but it should still be approached like ordinary MP for the purposes of tuning.
All Talon SRX’s come new with an address of 000.
Here is a link to a Chief Delphi message thread, for setup. https://www.chiefdelphi.com/forums/showthread.php?t=132007
And, the referenced link. http://wpilib.screenstepslive.com/s/4485/m/24166/l/216217-updating-and-configuring-pneumatics-control-module-and-power-distribution-panel
Your primary issue (only one device recognized) sounds like a loss of CAN control of the other three.
- Did you program a different CAN address for each of your controllers Edit: See Tom’s post above for details
? - Is your CAN network properly connected (check for loose wires)?
These two issues do not cover everything, but they are the two most common problems with “losing devices” on the CAN bus I have seen.
When attempting to drive to a position: Yes, motion magic is the most robust solution. However, if you set your motor controller percentage to something that easily moves your robot but is not near 100% (we’ve used 33% - 50% with 100-120 lb robots, gearing in the 10:1 area, and four CIMS), simple driving to a number of counts will often get you there. The problem we’ve encountered in that case is unequal motors and/or drag which caused the robot to wind up left or right of where we intended, though it usually wound up the right distance downfield and turned in the correct direction.