|Toggling PID control
|Page 1 of 1|
|Author:||chadgeorge [ Fri Oct 24, 2008 9:02 am ]|
|Post subject:||Toggling PID control|
Is it possible to turn on/off the PID control algorithms?
For example, it seems like the robot drives a little "better" in manual mode with PID off (sometimes the PID controller freaks out and jerks the robot around)
However, in autonomous, it is better to have the PID controller on.
|Author:||Jeff McBride [ Fri Oct 24, 2008 10:19 am ]|
|Post subject:||Re: Toggling PID control|
Lookup nMotorPIDSpeedCtrl in the Help file.
Also, if you do not have a shaft encoder installed on the motor port you always want to have PID control off. By default PID control is turned on. In earlier versions of RobotC (pre-1.45) it didn't seem to matter. We assumed that it "noticed" that the shaft encoder wasn't installed and just did the right thing. Something changed for 1.45 and our motors started behaving very oddly. We lost fine speed control. The motors were either going or stopped. I had several conversations with Dick Swan before we figured out why he could not reproduce the problem we were seeing. His robot had the shaft encoders installed, ours did not. In retrospect it is obvious that if you are asking for PID control and the driver isn't getting any response from the (nonexistant) shaft encoder, it will decide that the motor is not moving and needs more power.
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group