AB PLC5 PID questions

NetNathan

Lifetime Supporting Member
Join Date
Nov 2011
Location
Corona, CA
Posts
2,191
I am working on a PLC5 that is doing temp control.
However the temp control is working more like ON/OFF and not Proportional control.
I am not on site and only have logic printout.
As I look at these rungs.... If a timer is required for the PID rung, doesn't that sort of make it on/off since the timer is controlling the PID block?

See attached images...

PID Logic2.gif PID Logic1.gif
 
from just a limited look all of the PID controls are in manual mode
and all the outputs are set at 100% so when the rung is true the output is set to 100%
I would have to look up their statement PLC5 PID is the only PLC that requires a timer for the PDI
I was always told to leave all PID controls run continuously so they can do bounciness transition from manual to auto mode
 
have these ever been tuned? or is this a new installation?


how much does the PV change if the CV is moved 1%? 3%? 10%? 30%? How long does it take to get near a new steady state?
 
Whoooa !

I foresee many interactions on this thread.

OP posted "If a timer is required for the PID rung, doesn't that sort of make it on/off since the timer is controlling the PID block?"

No it does not. The PID instruction performs calculations based on what has changed on the PV (Process Variable) since the last calculation was performed. It therefore has to be "driven" or executed on a reasonably stable timebase for those calculations to be valid.

In 99% of cases it is perfectly OK to use a timer in the code to enable the PID calculations, but most people use periodic tasks (Logix5000) or STI routines (Logix5, Logix500) to ensure the PID instructions get the most accurate timebased execution.

The time between "iterations" of the PID calculations will be wholly dependant on the speed of response required. I have worked on applications where a very fast response is required, and conversely where a very slow response is not just "acceptable", but is a must. Consider the chlorination of a swimming pool, for example, where the PV could be delayed by several hours.

The output of the PID instruction will be a value derived from the change in PV, and the P, I, and D values. The PID only modulates the OP value, it is never truly ON/OFF, unless the P,I,D parameters make it so. You would not use a PID instruction to control a digital OF/OFF device, that could be done much more simply with a comparison instruction.
 
I foresee many interactions on this thread.
Yes, but I am sitting back and eating pop corn with this one. I am tired of asking the same old questions and not getting good answers.

If I have the right information I can analyze the data and compute gains within a few minutes. I think drbitboy can now too, so if this thread drags on it is the OP's fault.

I think Norm had a problem like this MANY years ago. It is possible to tune the oven when nothing is going in it but as soon as items that absorb heat are going through the oven there needs to be feed forwards proportional to flow of heat absorbing items going through the oven.

BTW, a gain of 60 means nothing to me if I don't know the units.
An integral gain of 2.5 seconds seems to be very short for a temperature system.
 
It’s clear that we don’t have enough information to analyze the operation of the code
In this case as I said before the PID controls are all set to manual that means that the output will be the value set from another source in this case 100% so every time the timer times out the PID rings go true and the PID control outputs the manually set value (100%)
That output is most likely placed in another data table word or analog output word.
At some point later in the program that word is over wrote most likely with 0.
The end result would be as the OP said it will operate like and ON / OFF controller
I have to question that there is a recommendation to use a timer to turn on and off the PID controls. Going back to the PLC2 days when the PID control was a card mounted in the rack and you accessed it through the data table and block transfer even in those days you always left the rung before the PID s always true unless you were not using the PID control at all.
The PID will update with every scan of the ladder program that the rung is true
In this case the PID is in manual it will always place 100% in the output word on every true scan
In short the PID is not doing anything except placing 100 in the output word you could do that with a simple move statement
As for the Logix processors yes it is recommended that toy put all the PID controls in 100ms periodic task
If you don’t then because the scan time in a Logix processor is less than 1ms closer to .1 ms so in just a few seconds the output of the PID control will ramp up to the full scale or down to 0 depending on the calculations because the hardware and process is never going to be able react fast enough so you need to slow down the PID control.
The final output could be to an analog output card to control a phase angle controller or I could be passed to a PWM control to control a solid state contactor it could also be used to control the On / Off time of a contactor
I really don’t think this control ever worked correctly and you are going to have to make a lot of changes
to make it work correctly . I hope you a copy of Logix 5 to get online with it
Good Luck
 
I would have to look up their statement PLC5 PID is the only PLC that requires a timer for the STI

This is what I believe to be true for a PLC5 and have always done otherwise the PID is execute on every scan. I believe the ControlLogix platform is similar and uses a timer as well. The PID update time parameter has to be set to match the timer as well.
 
This is what I believe to be true for a PLC5 and have always done otherwise the PID is execute on every scan. I believe the ControlLogix platform is similar and uses a timer as well. The PID update time parameter has to be set to match the timer as well.

No, STI execution is NOT user-code driven on any PLC5, SLC, or MicroLogix controller.

It is initiated to be scanned by the system, by reference to the hardware clock, and it Interrupts the normal scan of the user code.

A PID instruction's "Update" parameter (UPD) has to be set to match the period between executions of the instruction. That is how the PID can know the periodic update time, which it needs to calculate the output power (OP) from the change in Process Variable (PV) over the defined time period.

Scanning and executing PID instructions every normal scan will lead to huge inaccuracies of the OP being calculated, due to variance of scan times.
 
Scanning and executing PID instructions every normal scan will lead to huge inaccuracies of the OP being calculated, due to variance of scan times.

According to my brother, this mistake happens fairly frequently. The problem in the current case would be that the actual update time (say 1-10ms) would be off by over an order of magnitude from the configured update time (500ms), which would magnify the integral term i.e. the incrementing part* of the dependent formula:
xxx.png
would be calculated, and then added to the output, 50-500 times more frequently than assumed by the formula. The funny part is that the chosen solution to this problem is often implemented as ridiculously low Ki or high Ti parameters in the tuning, which roughly compensates for the actual vs. modeled timing disparity in the formula, and comes close enough to working that the initial mistake is neither detected or corrected.

* [Kt Ek Δt] or [1/Ti Ek Δt]
 
Setting the update interval in the PID data block is often overlooked also, and possibly because it is a parameter that you cannot readily "see".

With .UPD not set (i.e. left at 0.0), a Major Fault is declared on PLC5 systems, shutting the processor down.

On Logix5000 it generates a Minor Fault only, and the instruction will continue to calculate OP.

One thing I have always done in Logix5000 is to put PID instructions in a Periodic Task. You can then use a GSV to read that task rate, and poke it into the .UPD parameters of your PID loops. In this way, if ever anyone changhed the periodic task rate setting, the PIDs would automatically be updated with the new .UPD setting. Keeping that parameter "in tune" with the actual update interval will mean that you never have to adjust PID terms once the loops are tuned and working.

Don't forget that STI routines (PLC5/SLC) and Periodic Tasks (Logix5000) will interrupt and effectively suspend the continuous logic, and PID calculations are relatively time-consuming. So if you have multiple PIDs in one processor it is worth "scheduling" them, i.e. execute say 3 or 4 only on each pass of the periodic task or STI, and spread the load over multiple scans. A simple scan counter is all that is needed to effect a scheduler. Make allowance for this in the calculation of the .UPD parameter. Some of the brewery jobs I have worked on had 20-30 loops in one controller !
 
No, STI execution is NOT user-code driven on any PLC5, SLC, or MicroLogix controller.

It is initiated to be scanned by the system, by reference to the hardware clock, and it Interrupts the normal scan of the user code.

A PID instruction's "Update" parameter (UPD) has to be set to match the period between executions of the instruction. That is how the PID can know the periodic update time, which it needs to calculate the output power (OP) from the change in Process Variable (PV) over the defined time period.

Scanning and executing PID instructions every normal scan will lead to huge inaccuracies of the OP being calculated, due to variance of scan times.

Yes, I agree. I thought I was quoting rung 9 description.
 
Thanks for all the information.
I will have to wait till I am on site to get actually PID control data.
I will try to get some recorded control data from the customer in the meantime.
The customer tells me it is acting like on/off and it could just be bad PID settings that are causing it react that way.
 
Spend some time reading about how the PID does scaling (and descaling) before you get there. It should be simple, but I find the descriptions in the manual lack clarity; maybe I have just not reached the section where the clouds will part.
 
Spend some time reading about how the PID does scaling (and descaling) before you get there. It should be simple, but I find the descriptions in the manual lack clarity; maybe I have just not reached the section where the clouds will part.

Yes... PID is so cryptic in plcs that even the manufacture cannot explain well.
I despise all the settings required to make a PID work in most plcs, when most temp controller instruments seem to do fine with only setting Proportional band, Derivative (Rate), Integral (Reset).
 

Similar Topics

Has anyone had an issue with a PID control after the processor has been upgraded form a L40E to a L80E. It does not seem to be controlling...
Replies
48
Views
5,895
Has anyone ever converted a the PID instruction from a PLC5 to a CLX platform? The issue I am facing concerns the difference between a PID...
Replies
10
Views
3,439
I'm working on a project to convert an old PLC5 processor to an L63. Below is sample logic of one of the several PID controls from the...
Replies
9
Views
5,026
Hey fellas, I'm in the midst of doing my first translation from 5 to 5000 that also includes PID instructions. I'm just looking for any helpful...
Replies
10
Views
5,361
Hello I am troubleshooting a PID. My set output percentage from my SCADA is 60%. However when my PID is in manual my CV is stuck at 20%??? I can...
Replies
8
Views
3,077
Back
Top Bottom