Also Microchip's AN531 app note on their website has some PID code in it. Good luck Justin Grimm reaper@southwest.com.au ---------- > From: Mark Lezama > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: PID question. > Date: Saturday, 7 March 1998 22:39 > > Yes, you are right. but I have and interface with a host computer, and the > parameters need to be change from a long distance. Is there any way to do this > with OP-amps? at lest in digital comuniation. > > Mark Lezama > > Calvin escribis: > > > Comment: > > > > PID controls are inherently analog. This does not mean they cannot be > > implemented digitally, but it is generally a lot easier to do it with one or > > two op-amps. > > > > Just a thoght > > > > Calvin > > > > -----Original Message----- > > From: Justin Grimm > > To: PICLIST@MITVMA.MIT.EDU > > Date: Viernes 6 de Marzo de 1998 11:45 AM > > Subject: Re: PID question. > > > > >Funny you should ask, Im working on the same project at the moment. > > >The only problem Im having is the maths routines, they seem to be getting > > >up to > > >64 bit. > > >The actual calculation is- > > >dMV=G[dE + E*T1*I + D* (dE/T2)] > > >where- > > >dMV = change in Manipulated Variable > > >G = Gain (100/Proportional Band) > > >E = Error (SetPoint - ProcessVariable) for reverse action, > > > Error (ProcessVariable - Setpoint) for direct action > > >dE = ErrorThisScan - ErrorLastScan > > >T2 = Time between scans (in minutes) > > >T1 = Time since error occured (in minutes) > > >I = Integral time (R/M) > > >D = Derivative time (minutes) > > > > > >There are other things to consider as well, integral windup, bumpless > > >transfer > > >from manual to auto, etc > > > > > >Anyone knowing any alterations to this equation or anything else > > >that might make writing this code easier are most welcome to reply > > > > > > > > > > > >Justin Grimm reaper@southwest.com.au > > > > > > > > >---------- > > >> From: Mark Lezama > > >> To: PICLIST@MITVMA.MIT.EDU > > >> Subject: PID question. > > >> Date: Friday, 6 March 1998 21:09 > > >> > > >> I have working with RTU designe base in PIC16c74. I have to control a > > >> valve with a 4-20 ma signal, but I want to implement a digital PID > > >> controller, anyone here have a PID code or can explain me how I have to > > >> implement. > > >> > > >> Thanks in advance! > > >> > > >> Mark Lezama > > >