RS Logix 5000 PID Block

nmontev

Lifetime Supporting Member
Join Date
Jan 2007
Location
Green Bay, WI
Posts
20
I have a L33ER Compact Logix Controller running RSLogix 5000 version 20 control logic. I am using a PID block to execute some control. I have instances where I would like to clamp the max output of the PID block to something other than 100%. I have other instances where I would like the minimum to be something other than 0%. I have been trying to write to the .MAXO and .MINO tags of the PID controller, but this is not working affecting the control variable. I would like to try and clamp the output of the PID block and not use a compare that handles this limit at the physical analog output. Does anyone have any suggestions?

Thank you for your time.
 
I just leave all of my PID's running with the normal output range of 0 to 100%. After that, I externally scale it as needed. To simply change the clamp value, multiply the output by another value. If you want 0 to 80%, multiply the output by 0.8. 0.2 for 0-20%.

Note that you will need different tuning for different scalers if you have a tight loop and wildly different scaling factors. I generally use loops like this for trim, and tune to the middle of the target range, then leave it alone.

If you need a -100 to +100% range, this works as well, just take the output, subtract 50, and multiply the result by 2. Make sure to initialize the PID .SO to 50 if you want to start from 0 trim.
 
I'm trying to do something similar as nmontev. However, I want to clamp the PID output (or, if possible, the control variable) and have the PID simply work within the new range. I tried writing new values to the MINCV and MAXCV, but the PID doesn't take the changes after its enabled. Also, when changing the range, I still want the PID to keep its previous accumulated output (so external scaling of the output doesn't work for me). If the output is outside the new range, the output should be clamped and continue from that point... like how it does when you switch SWM from manual back to auto. I know this is a tall order, but is there any way to do this? Your help will be greatly appreciated! 🤞🏻
 
I just leave all of my PID's running with the normal output range of 0 to 100%. After that, I externally scale it as needed. To simply change the clamp value, multiply the output by another value. If you want 0 to 80%, multiply the output by 0.8. 0.2 for 0-20%.

Note that you will need different tuning for different scalers if you have a tight loop and wildly different scaling factors. I generally use loops like this for trim, and tune to the middle of the target range, then leave it alone.

If you need a -100 to +100% range, this works as well, just take the output, subtract 50, and multiply the result by 2. Make sure to initialize the PID .SO to 50 if you want to start from 0 trim.

You are just "detuning" the PID response by scaling the output... This is not what the OP wanted, he wanted to linit the output to something less than 100%. The PID will always work best when the feedback it receives is consistent with the parameters programmed into it.

Admittedly you stated that different tuning parameters would be needed for different "scaling factors". This is just gonna be a PITA for an infinitely variable "output clamp".

I don't understand why writing limit values to .MAXO doesn't work ??
 
Looking through the documentation, I also cannot see why MaxO and MinO would not work. Could you use a PIDE instruction instead? You could use that and set the windup lo and hi limit flags to stop the output from increasing or decreasing based on your conditions.
 

Similar Topics

Hello all, I'm having issues with a PID and trying to tune it. I just do not understand why my CV goes to 105 with the settings I have. Config...
Replies
14
Views
1,575
Hi, Long time not in the forum, and not in the programming. I´m getting back. I was issued a conversion from RSLogix 500 to RSLogix 5000 (studio...
Replies
0
Views
1,289
So I have a PID loop on an 1756-L61 running V17 software just for background. Also the PID PV is a pressure transmitter and the CV is speed sent...
Replies
1
Views
894
Hi all, I'm working on a wastewater plant with oxidation ditch aerators. The aerators are on VFDs and the operators want the dissolved oxygen in...
Replies
45
Views
17,659
Hi All, I have a PID control application that I would like to get your opinions on. As I am reality new to PID loops I am struggling somewhat...
Replies
14
Views
4,287
Back
Top Bottom