|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Generic PID control code
I was asked by Adamdb of team #1583 to post a code example of what we did to execute a PID loop. The two files, pid.c and pid.h are attached below.
in order to use a pid loop, you must do a couple of things. first, you create the data structure, for example: PHP Code:
PHP Code:
then finally, you can execute the loop by doing this PHP Code:
happy control-loop-ing. Edit: i added the default code plus the PID code for those of you who are having trouble getting started. Last edited by Uberbots : 26-02-2007 at 22:30. Reason: added default code + pid code |
|
#2
|
|||
|
|||
|
Re: Generic PID control code
I was going to post mine, but beside for some minor syntax differences, the drivers are identical.
Good work. PS. It looks like the uberbots' programmers have come a long way since I last talked to you before eliminations at UTC last year. |
|
#3
|
|||||
|
|||||
|
Re: Generic PID control code
Again, nearly identical PID code. I constructed mine from the PID without a PhD article as well.
|
|
#4
|
|||
|
|||
|
Re: Generic PID control code
I was about to make code from PID without a PhD, but then I saw this. It's always great to see teams post code for others to use.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Integral Window for PID Control | phrontist | Programming | 2 | 16-02-2008 17:32 |
| PID Control | Chris Bright | Programming | 9 | 26-03-2005 19:44 |
| (Experimental) PID Control System | jdong | Programming | 14 | 18-06-2004 15:55 |
| PID control loop/Encoder question | Zee | Programming | 18 | 30-01-2004 23:14 |
| PID Control Loops | ttedrow | Programming | 7 | 05-12-2002 12:03 |