View Single Post
  #3   Spotlight this post!  
Unread 02-04-2016, 08:43 AM
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: Talon SRX Velocity Control

Start with the provided reference material at http://www.ctr-electronics.com/talon...ical_resources

When you tune it, start with the F parameter then P. If you really need the last 0.1% you could add a small I term.

The new SRX code has a parameters for "peak/nominal closed-loop output". I have not used this before, but it would have solved an issue I had years ago with the older Jaguars. When driving a flywheel, there is significant inertia and if the loop overshoots, the control loop will try to slow the wheel down, potentially by trying to turn it backwards. Reversing the motor while the flywheel blew half the H-bridge driver inside the speed controller.

So, I will amend my recommendation. The F term is the Forward (open-loop) parameter.

1) set P,I,D,F to zero
2) command 800 speed (assuming full range +/- 1023)
3) find a value for F which gets you to the target RPM
4) query what the voltage for that RPM is (Vnom)
5) ConfigPeakOutputVoltage(+12, +Vnom/2)
6) find a value for P that maintains the RPM over changes in load
7) if required, tune I for more accurate nominal values

Especially if you use the I term, you may also want to play with the new ConfNominalOutputVoltage command to create a "good enough" voltage band around your desired RPM. This could help if you have minor oscillations near your target RPM.
Reply With Quote