|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Talon SRX in PID Speed mode won't stop!
Hi!
We have a Talon SRX (to a CIM motor, with a quadrature encoder) - it's attached via a pullup / breakout board to the encoder. On our test robot board (no robot, just control system), it seems to behave as expected: using control mode kSpeed - ... (pseudo-code): if (button1) { talon.Set(1000.0); //turn it on. } if (button2) { talon.Set(0.0); //turn it off. } - the talon starts and stops when commanded. On our real bot, though, it won't stop once started. (we also tried putting it in voltage mode; in that case ![]() (pseudo-code): if (button1) { talon.Set(1.0); //turn it on. } if (button2) { talon.Set(0.0); //turn it off. } Which works fine. Stumped! Martin Haeberli (de-)mentor, FRC 3045 Gear Gremlins (formerly SWAT) |
|
#2
|
||||
|
||||
|
Re: Talon SRX in PID Speed mode won't stop!
Quote:
Code:
talon.reverseOutput(true); Code:
talon.reverseSensor(true); |
|
#3
|
|||||
|
|||||
|
Re: Talon SRX in PID Speed mode won't stop!
Check the web dashboard first. See if there's anything different between the two Talons' configurations, and verify that the encoder is working.
My guess is that the encoder is not working. |
|
#4
|
||||
|
||||
|
Re: Talon SRX in PID Speed mode won't stop!
Usually in a PID situation when a motor does not stop is due to the feedback signal is missing, or the feedback signal is reversed.
|
|
#5
|
|||
|
|||
|
Re: Talon SRX in PID Speed mode won't stop!
Thanks for all the suggestions.
It appears (and we'll have to double check) that the PID does control to the target speed and direction. That is Set(1000) makes it go 1000 RPM in one direction; Set(-1000) at the start would go the opposite direction; but in this set of circumstances, Set(0) doesn't stop it. What does work, which is a horrible hack, is to switch to Voltage mode, Set(0), then set back to PID mode. Thanks, Martin Haeberli (de-)mentor, FRC 3045 Gear Gremlins (formerly "SWAT") |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|