You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old April 6th, 2021, 07:30 PM   #1
NetNathan
Lifetime Supporting Member
United States

NetNathan is offline
 
Join Date: Nov 2011
Location: Corona, CA
Posts: 1,882
AB PLC5 PID questions

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...
Attached Images
File Type: gif PID Logic2.gif (85.0 KB, 26 views)
File Type: gif PID Logic1.gif (39.4 KB, 24 views)
__________________
****Control Freak****
Net is where I be and Nathan is me.
  Reply With Quote
Old April 6th, 2021, 08:02 PM   #2
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 1,586
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
  Reply With Quote
Old April 6th, 2021, 08:12 PM   #3
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,662
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?
  Reply With Quote
Old April 6th, 2021, 10:47 PM   #4
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 5,275
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.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
Everything works with smoke. Let it out, and it stops working.

Nil Carborundem Illegitimi



  Reply With Quote
Old April 7th, 2021, 12:06 AM   #5
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: United Welfare States of America
Posts: 7,414
Quote:
Originally Posted by daba View Post
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.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old April 7th, 2021, 02:32 AM   #6
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 1,586
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
  Reply With Quote
Old April 7th, 2021, 02:38 AM   #7
DaveW
Member
United States

DaveW is offline
 
Join Date: Apr 2005
Location: SoCal
Posts: 373
Quote:
Originally Posted by GaryS View Post
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.
  Reply With Quote
Old April 7th, 2021, 06:46 AM   #8
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,662
What @daba said cf. https://literature.rockwellautomatio...C741%2Cnull%5D
  Reply With Quote
Old April 7th, 2021, 06:52 AM   #9
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 5,275
Quote:
Originally Posted by DaveW View Post
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.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
Everything works with smoke. Let it out, and it stops working.

Nil Carborundem Illegitimi



  Reply With Quote
Old April 7th, 2021, 07:37 AM   #10
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,662
Quote:
Originally Posted by daba View Post
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]
  Reply With Quote
Old April 7th, 2021, 09:55 AM   #11
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 5,275
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 !
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
Everything works with smoke. Let it out, and it stops working.

Nil Carborundem Illegitimi



  Reply With Quote
Old April 7th, 2021, 12:27 PM   #12
DaveW
Member
United States

DaveW is offline
 
Join Date: Apr 2005
Location: SoCal
Posts: 373
Quote:
Originally Posted by daba View Post
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.
  Reply With Quote
Old April 7th, 2021, 12:40 PM   #13
NetNathan
Lifetime Supporting Member
United States

NetNathan is offline
 
Join Date: Nov 2011
Location: Corona, CA
Posts: 1,882
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.
__________________
****Control Freak****
Net is where I be and Nathan is me.
  Reply With Quote
Old April 7th, 2021, 01:03 PM   #14
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,662
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.
  Reply With Quote
Old April 7th, 2021, 02:19 PM   #15
NetNathan
Lifetime Supporting Member
United States

NetNathan is offline
 
Join Date: Nov 2011
Location: Corona, CA
Posts: 1,882
Quote:
Originally Posted by drbitboy View Post
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).
__________________
****Control Freak****
Net is where I be and Nathan is me.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
PID control (PLC5) jeffblichmann LIVE PLC Questions And Answers 4 October 9th, 2012 01:36 PM
RSlogix PLC5 PID help! DeweyfromOhio LIVE PLC Questions And Answers 13 July 9th, 2012 07:50 PM
PLC5 PID triggering curiosity - confirm my thougths please wildswing LIVE PLC Questions And Answers 2 November 22nd, 2011 11:48 AM
ControlLogix general + PID "best practices" wildswing LIVE PLC Questions And Answers 6 October 10th, 2011 11:37 AM
PID output scaling PLC5 russrmartin LIVE PLC Questions And Answers 2 January 30th, 2004 05:45 PM


All times are GMT -4. The time now is 10:34 AM.


.