![]() |
Talon SRX PID Not Running
We're trying to use the built-in Talon SRX PID loop to control our Elevator motor. We have a quadrature encoder that is correctly reading the position of the Elevator and we can verify that the ticks are increasing as the Elevator moves up. I think that I have done what is necessary in code, but the Talon isn't doing anything during closed loop control.
These are the results of a self-test after (as far as I know) enabling the PID control mode of the Talon. Code:
The self test completed successfully.Code:
elevatorTalon.changeControlMode(CANTalon.ControlMode.Position); |
Re: Talon SRX PID Not Running
Nothing strikes me as obviously wrong with your code.
However, I do have to ask: How exactly did you arrive at that P gain value? Per section 17.13 of the Talon SRX Software Reference Manual, the P gain is in units of throttle / sensor, where throttle is 0 - 1024 and sensor units are encoder ticks (same units as the 1300 you are seeing). This means that your code should cause the talon to apply a throttle of 1300 * 0.00091054 = 1.18 throttle (out of 1024), and it is not implausible that such a low throttle could get rounded to zero. Have you tried a larger P value, tried including an I or D gain, or tried increasing the error? Edit: Just as a reminder, if you haven't already, be sure to read the Talon Software Reference Manual. It is quite comprehensive and can generally answer any questions you may have. |
Re: Talon SRX PID Not Running
Quote:
|
| All times are GMT -5. The time now is 01:46. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi