PID control of 2 discrete outputs, PLC-5

miket0072003

Member
Join Date
Sep 2007
Location
nashville
Posts
1
I have been assigned a project where I need to use a PID in a PLC5/80E to control the temperature of a chemical in a tank. The chemical goes through a heat exchanger. We cycle hot and cold water valves going to the heat exchanger.
We currently use an Athena temp controller. This unit works great, and I especially like the PID autotune feature. unfortunately, we have had a couple of these controllers fail, costing us a lot of time and money.
This is why I have been asked to move the control to a PID in the PLC-5. I am not thrilled about this because I will lose my autotune feature and my PLC scan time is crucial and my memory allocation is almost maxed out.
I have found a few links on controlling one discrete device with a PID, but not 2. Does anyone out there have any info on this?

Thanks,
Mike
 
What you want is called time proportional control. There are examples at ab.com but they aren't "polished".

In a nutshell, the PID output will be scaled to represent a duty cycle for the discrete valves. Typically the output is scaled so that a 50% output means that the temp is perfect, >50% to 100% means you are calling for heat, and 0% to <50% means you are calling for cooling (or vice versa). I normally take the full scale output of the PID and subtract half the range before converting to a percentage or time value so that you end up with -100% to +100% of your engineering units.

You'll select a timebase for valve operation, and the PID output will determine what portion of that timebase the valve spends in the open position.

You may also want to program a minimum open and close time for each valve so that short cycling is avoided.

You end up with a pulse width modulation of the valve...you decide the overall frequency based on your process and the PID determines the pulse width.

If you search for all of Ron Beaufort PID posts, he can best go over all the intricacies of the PLC-5 PID block, which is significantly different from the SLC and Controllogix versions.

Be sure you base your design on information specific to the PLC-5.

Paul
 
I wouldn't even bother with at PID

error=SP-PV
s=τ*derror/dt+error
if s>+errorlimit then hot on
if s<-errorlimit then cold on

derror/dt is the error rate which is estimated by
error(n)-error(n-1)/Δt

The only thing you need to tune is τ or the time constant and the error limit.
The τ*derror/dt is a simple derivative term or anticipator. The 'anticipator' will cause the valves to turn off as the SP is being approached so overshoot is avoided. τ should be set to about the total desired rise time divided by 4.
 

Similar Topics

I'd appreciate hearing opinions and experiences of going from discrete controllers to PLC control of temperature. We use a lot of Watlow and...
Replies
12
Views
5,987
Gentlemen, I'm faced with controlling a valve that has 480 feed to it, but using 120Vac On..Off discrete signals to position it. It does have...
Replies
8
Views
3,760
People, I have used the PID function previously in AB applications, but this is the first for the ML1200 Series. I need help in interfacing the...
Replies
8
Views
5,257
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
604
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
951
Back
Top Bottom