Hello,
I’m wondering if it’s possible to use bang-bang control onboard the Talon FX. If not, we could do it RoboRIO side too, but I’m just interested in the 1kHz loop time instead of 50Hz.
This is for a single wheeled flywheel shooter driven by two falcons. I’m interested in at least trying Bang-Bang (which is where the motor goes at full throttle when it’s below the velocity setpoint and coasts when it’s above) because aside from not having to tune a PID, full throttle would get the flywheel back up to the desired speed after shooting a ball faster than an something proportional to the error, which would end up being less than full throttle.
We’re using LabVIEW, but this should apply to other C++ and Java because it’s CTRE’s libraries I’m dealing with. What I tried was setting a super high P value with the Config PIDF method so that any error would produce a full output, and then using the Config Peak Output to be between 0 and 1. Then I used the Set: Velocity method with my desired velocity.
The flywheel oscillated around my setpoint, applying full negative throttle when it exceeded the setpoint. That indicates to me that the Peak Output does not apply in closed loop modes. Is there a way of constraining the output range that works in Velocity Closed loop control? Is there another way of achieving this?