View Single Post
  #2   Spotlight this post!  
Unread 27-01-2015, 19:30
James Kuszmaul James Kuszmaul is offline
NEFIRST CSA
FRC #0971 (Spartan Robotics)
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Worcester, MA
Posts: 61
James Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud of
Re: PID with encoders

Quote:
Originally Posted by hades948 View Post
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).
__________________
FRC971 (Student) 2011-2014
FRC190 (College Mentor-ish) 2014
WPILib Development 2014-present
Reply With Quote