![]() |
PID line follower vex
As im new in VEX...Can anybody tell me if i can implement PID control using easyc? Because it is the only software i got... If yes, can somebody send me the standard code for it...I need it for my project really much... I will appreciate some help expertsss....
|
Re: PID line follower vex
I recently found this as I was looking for how to do PID loops with lego. It explains how to make a PID controller and gives the pseudo code.
Hopefully you find it as helpful as I did. http://www.inpharmix.com/jps/PID_Con...ms_Robots.html |
Re: PID line follower vex
You can implement just about any sort of feedback loop in EasyC (PID is not the only form of feedback-loop control algorithm).
As the algorithm gets more complex, you will want to switch to EasyC Pro because the icons and flowcharts of ordinary EasyC become to bulky and hard to read/maintain. Up until you stumble over some way to confuse the EasyC compiler. the only limits are the speed of the computer you are using, and its storage capacity. You are far more likely to have trouble with either of those before EasyC will fail you. Go to the www.VexForum.com web pages and do a search there. There are discussions and sample code for implementing feedback loops to follow lines. Blake |
PID control for vex
Does anyone know where you can set a PID loop where the motor will not move unless the driver drives it?
|
Re: PID line follower vex
Normally you have a motor that drives some device (like an arm). There is some sensor (like a potentiometer) that tells the position of the arm. The PID code drives the motor until the sensor says it's in position. Then it stops moving the arm.
Based on that, I'm not sure what you are looking for. Can you be more descriptive in what you want? |
Re: PID line follower vex
I think what Jacob is asking for is a method to have the PID not run if the joystick value is 0. If there is no tolerance, the PID loop will try to tune a value of 0 on the drivetrain, which does take unnecessary processor power. One thing I would do is set a limit, maybe + or - 0.1 on the joystick. Once this value is exceeded, then the PID loop could start running.
|
| All times are GMT -5. The time now is 11:56. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi