Comment
Author: Admin | 2025-04-27
Primer on Closed-loopTalon SRX and Victor SPX supports a variety of closed-loop modes including position closed-loop, velocity closed-loop, Motion Profiling, and Motion Magic. Talon SRX additionally supports current closed-loop.NoteAll closed-loop modes update every 1ms (1000Hz) unless configured otherwise.TipWhile tuning the closed-loop, use the Tuner configuration tab to quickly change the gains “on the fly”. Once the PID is stable, set the gain values in code so that Talons can be swapped/replaced easily.Regardless of which closed-loop control mode is used, the following statements apply:Current limit and voltage compensation selections are honored (just like in open-loop PercentOutput mode)“Ramping” can be configured using configClosedloopRamp (routine or VI)All other open-loop features are honored during closed loop (neutral mode, peaks, nominal outputs, etc.).Closed Loop controller will pull closed-loop gain/setting information from a selected slot. There are four slots to choose from (for gain-scheduling).PIDF controller takes in target and sensor position measurements in “raw” sensor units. This means a CTRE Mag Encoder will count 4096 units per rotation.PIDF controller takes in target and sensor velocity measurements in “raw” sensor units per 100ms.PIDF controller calculates the motor output such that, 1023 is interpreted as “full”. This means a closed loop error of 341 (sensor units) X kP of 3.0 will produce full motor output (1023).WarningAlthough the velocity kF config of the Talon-SRX/Victor-SPX assumes 1023 is full output, do not confuse this with the arbitrary feed-forward parameter of the Set routine/VI, which accepts a value within [-1,+1]Below are descriptions for the various control modes.Closed-Loop Control ModesPosition Closed-Loop Control
Add Comment