Closed prateekma closed 5 years ago
I just tested this, it works as expected. My guess is that your target position is not >0, which is why your mechanism does not move.
Confirm where in this procedure you are seeing something different, or provide an actual procedure we can reproduce. Other teams have this working so I suspect something is being missed in your setup.
Another thought is maybe your Iaccum has wound up, so the closed-loop still wants to drive negative (for a while) while you are requesting a positive target. Use Integral Zone, or zero your kI until you have root-caused what you are seeing. Or use self-test to confirm Iaccum value.
Huh, that's interesting. I will test this tonight and let you know what our results are. 👍
We tried all of these steps in order and it worked as intended! We believe it originally had something to do with the limit switches not being enabled correctly.
Thanks for all your help!
Although the
clearPositionOnLimitR
function works as intended (i.e. clearing the sensor position when the reverse limit switch is triggered), when a mechanism is resting on the reverse limit switch, any MotionMagic setpoint that is sent to the TalonSRX is disregarded and the mechanism does not move. Moving the mechanism just above the limit switch (so that it is no longer triggered) and then sending the MotionMagic setpoint works.This is inherently a problem when trying to work with an elevator mechanism that is at its zero because motion magic setpoints at this configuration are effectively useless.