![]() |
CAN Talon Does Not Move in Speed Mode
1 Attachment(s)
We have a CAN Talon SRX wired to an encoder. When in PercentVBus mode, the motor moves and we can see our encoder values changing. When changed to kSpeed mode, the motor does not move. We have checked the System Configuration webpage on the roboRIO, and have even run a Self-Test while this is running. The Self-Test shows an error and an applied throttle, but the motor does not move. We have tried values in the range of 20 to 200.
Here is a snapshot of one Self-Test: Attachment 18391 We followed the code given in the Software Reference: Code:
elevatorMotor = new CANTalon(RobotMap::Elevator::elevatorMotorID);Code:
elevatorMotor->Set(speed); |
Re: CAN Talon Does Not Move in Speed Mode
Section 17.5 of the TALON SRX Software Reference Manual lists the throttle range as -1023 to +1023. A throttle of -19 is very, very small--less than 2%. You might need to increase the P value.
Note that the speed value is in encoder counts per 100 milliseconds. You will need to convert from RPM (or whatever speed units you use) based on the number of encoder counts per revolution. Note also that the encoder is always read in 4x mode, so a 250 cycle per revolution encoder is actually 1000 counts per revolution. |
Re: CAN Talon Does Not Move in Speed Mode
Thanks for the quick reply. We have increased the P value and will give it a try as soon as the fabrication team gets done with the robot.
|
Re: CAN Talon Does Not Move in Speed Mode
Yep, that was our problem. I'm not used to working with numbers in the thousands, and we were a bit worried about setting the value too high. Now we know better.
Thanks for your time. |
Re: CAN Talon Does Not Move in Speed Mode
Glad you guys are up and running.
Just a guess : AppliedThrottle at -19 and ClosedLoopErr is -200, so I'm guessing Pgain was 0.1. :) |
Re: CAN Talon Does Not Move in Speed Mode
Good guess. Changing P to 1 and speed to 400 seems to work much better.
|
| All times are GMT -5. The time now is 10:09 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi