View unanswered posts | View active topics It is currently Wed Jul 08, 2020 1:00 am

Reply to topic  [ 2 posts ] 
Toggling PID control 
Author Message

Joined: Fri Oct 24, 2008 8:58 am
Posts: 87
Post 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

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Post 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
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

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

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.