View Single Post
  #2   Spotlight this post!  
Unread 30-04-2012, 00:23
Tanaythan's Avatar
Tanaythan Tanaythan is offline
Programmer
AKA: Tanay Nathan
FRC #3256 (Warriorborgs)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2010
Location: San Jose
Posts: 27
Tanaythan is an unknown quantity at this point
Re: Robodox Guide to velocity control using PID

I've been thinking of a different way to control the velocity of a spinner using PWM and the basic GetRate() function of an encoder. It starts of with a while loop and the shooter motor.
Code:
while(encoder->GetRate() <= setpoint) {jag->Set(i); i+= .001}
This way, it ramps up, but the only fear I have of this method is that I am unfamiliar with the way GetRate() works. If it gets back data per second, then we have a problem with this formula. If it works like the CANJaguar feature, there should be no problems with this method.

Note: We used CANJaguars this year and plugged the encoder into the Jaguar itself to use the Speed PID feature.
__________________
Tanay Nathan
Programmer
Team #3256 Warriorborgs
Reply With Quote