View Single Post
  #4   Spotlight this post!  
Unread 19-02-2013, 01:08
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is offline
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 842
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
Re: PID Positional Control (Java)

Quote:
Originally Posted by F22Rapture View Post
Does the setpoint have to be a distance, or can we set the setpoint to a certain number of counts?
"Distance" is just a descriptor. You can use whatever you want. If you want a certain number of counts just set your "distance per count" to 1.

Basically, distance per count allows you to put units into your PID instead of relying just on counts. You could translate counts into inches, feet, etc.

Edit: Please note this is using WPILib Java. If you're not using WPILib, the lines of code mentioned above won't work out of the box.
__________________