|
Re: CAN Talon Current Control
Possible problems, in no particular order: - You're commanding max speed on the drivetrain, and one side has more resistance so is bound to run slower at max speed.
- One side of your drivetrain is binding up heavily, so the steady-state velocity error of the two sides is different
- The slower side of the robot has a motor that's miswired or not mechanically coupled (missing the key on the shaft).
- Velocity control PID in Talon is poorly tuned or not at all.
- You're not actually in velocity control mode
- You don't have feedback, and your P term term in the PID is making it act like regular %voltage mode
- One of your wheel/motor encoders is slipping
Possible solutions to the above: - Pull up the diagnostics on the roboRIO and watch the Talon output value on both sides. Make sure you're not getting up to 100% output on either side.
- Spin each side by hand to make sure they're about the same resistance. Possibly also check current draw on the motors when they're running at full speed.
- Check to make sure all motors are drawing power and turning the right direction. Easiest is to switch back to the default %voltage mode, then unplug things till only one motor should be spinning on each side. Repeat until you've verified each drivetrain motor moves the robot in the correct direction.
- Look at the commanded velocity vs feedback velocity in the CAN diagnostics on the roboRIO. They should match closely. If not, slowly increase your P gain until they do,
- You need to use the Talons in CAN mode. You need to tell them to operate in velocity control because the default mode is %voltage. You should be able to determine this through the CAN diagnostics on the roboRIO.
- In CAN diagnostics, verify that you're actually seeing velocity feedback when the wheels are spinning.
- This is the hardest to check. Only real thing you can do is put a sharpie mark on the encoder shaft and the thing it's attached to and make sure those sharpie marks stay lined up. If you can't do that for some reason, testing this is going to be pretty tricky.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.
Lone Star Regional Troubleshooter
|