View Single Post
  #21   Spotlight this post!  
Unread 16-02-2015, 14:13
mshafer1 mshafer1 is offline
Programming Mentor
AKA: Matthew Shafer
FRC #3937 (Breakaway)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2008
Location: Arkansas
Posts: 56
mshafer1 is an unknown quantity at this point
Re: Use a button to make a motor move a certain number of rotations

Quote:
Originally Posted by RoboBucs View Post
How do they have no way of understanding encoders if the encoders are built in?
They do not correspond to each other, the drive expects values from -1 to 1 on each axis corresponding to a joystick, you could use a pid loop (use the target encoder value as the setpoint and the current reading as the processing variable (pid.vi) which would give you a fine control (if you do this, also set the range on the pid from -1 to 1).
Other option is to implement a proportional gain yourself. Take the current encoder value, subtract the current reading and multiply it by a constant (you'll have to play with the constant to get it where the robot gets close without oscillating)
Reply With Quote