We cannot figure out exactly how to set up the PID using the Talons. We’ve been looking through the documentation for the PID in the talons. We do not understand how the PID knows what the encoder position is and what the ticks per revolution is set to. Is there somewhere we can pass that information to the talons or do they magically know?
Thanks!
Tyler Royer (FRC Team 3591)
EDIT: we are using mecanum drive and cant figure out how PID interfaces with mecanum in robot drive
First of all, to be clear, you are talking about the new CAN Talon SRXs?
Second, much of this is described in the Software reference manual available through VEXPro’s website.
To answer your question, it knows the encoder position because the encoder should be plugged straight into the talon and it can count encoder ticks. And the talon does not actually know the number of counts per revolution; instead it just works in units of encoder ticks. So you will have to convert between revolutions and encoder ticks yourself and give the CANTalon class goals in terms of encoder ticks (see section 21.8 of software reference manual).