|
Page 1 of 1
|
[ 2 posts ] |
|
| Author |
Message |
|
chadgeorge
Novice
Joined: Fri Oct 24, 2008 8:58 am Posts: 87
|
 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.
Any ideas?
|
| Fri Oct 24, 2008 9:02 am |
|
 |
|
Jeff McBride
Professor
Joined: Fri Sep 19, 2008 1:22 am Posts: 200
|
 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.
_________________ Jeff McBride Benson Robotics Club
|
| Fri Oct 24, 2008 10:19 am |
|
|
|
Page 1 of 1
|
[ 2 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|