Logix 5000 PID CV Greater than Max

AMarks95

Member
Join Date
Jul 2018
Location
South Dakota
Posts
224
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:
CV High Limit = 100%
CV Low Limit = 0%


Scaling:
Process variable unscaled and engineering unit min/max are equal.
Unscaled max = 17
Unscaled min = 0
Engineering Unit max = 17
Engineering Unit min = 0

CV max (100%) = 95
CV min (0%) = 70


So, with this setup I would expect the CV to range from 70 to 95. I is limited to 70 on the low end, but why am I getting a value of 105 on the high end?

This CV is not being set anywhere else.
 
What's the value of the PIDTag.SO when this happens? Do you have anything entered for the TieBack values? Is anything setting the PIDTag.SWM bit?
 
Could you gather all the rungs referencing the PID Tag into a new "test" routine, then export this routine and post to the Forum?
Or post the complete .acd file.


After the export, delete the new routine created or don't save the project on exit, to revert back to the original.
 
SO is 100.
Tieback values are default at 0 and 4095.
Nothing is setting .SWM

Is the PID in a cyclic task with a period matching the update interval of the PID? Or in a continuous task with a timer preset equal to the PID interval?
 
...

This CV is not being set anywhere else.

Other than a bug in the PID routine or other Logix internal memory management fault (neither of which is impossible), there is no other common explanation that I know of.

I would check the External Access property of the tag assigned to the Control Variable to make sure it is not being externally written by an HMI or other device with memory access.

Depending on whether the PID is in a continuous or periodic task, you could add logic that attempts to "trap" an unexpected change to the CV tag. It should only change when PID instruction is scanned. For example, in a periodic task you could save a copy of the value after the PID scans, and then put an equality test of saved and current CV value before the PID instruction and latch a bit if it is different. That would imply something other than the PID instruction is changing it. Something similar is possible in a continuous task synchronized with the input conditions on the PID instruction.
 
Continuous task. Not sure what you're on about the timer.


The single most important aspect of the PID instruction is that its actual update time in operation matches its configured loop update time, at least to some tolerance (10-20% or so, depending on the process).

That probably does not matter for the focus of this thread (why PID's CV output exceeds CV limits when in Auto mode), but if there is a PID that is evaluated on every scan cycle of the continuous task, then it is likely, though not certain, that that PID is not being used correctly, even if it seems to be doing its job (minimizing error) acceptably.
 
I'm just at a loss here. My cv high limit is 100 %, cv low limit is 0 %, cv max (at 100%) is 95, cv min (at 0%) is 70.

The cv output never goes below 70, but it goes up to 105.
 
I'm just at a loss here. My cv high limit is 100 %, cv low limit is 0 %, cv max (at 100%) is 95, cv min (at 0%) is 70.

The cv output never goes below 70, but it goes up to 105.

Have you checked that the actual output is high? By means of a mA clamp on, or volt meter (depending on your module's configuration). Does the device being driven by the output have feedback? Sometimes actuated valves will, for example. It might be that the calculated value is 105 but the actual output never goes above 95 (these are %'s of CV OUT?).
 
I don't have a PLC with me to test this and have never used this particular instruction so went to have a look in the manual...

Although it seems like the CV limit values would limit the CV, they also have two output bits to tell you the CV went out of these limits.

.OLL
13
CV is below minimum output value (0=no; 1=yes)
.OLH
12
CV is above maximum output value (0=no; 1=yes)
Gut feeling for me is that the instruction doesn't actually clamp the CV output but instead gives an indication for you to decide whether to do it or not.
I may well be wrong because as you say your process gets clamped at the low end of the scale, but perhaps there's some other logic doing that at the lower end? Don't know. If I have some time tomorrow I'll play with it to see whether it does that or not.
 
It was just a bug with that instance of the instruction. I created a brand new PID instruction with the exact same parameters and now it's functioning as intended. The output scales 0 - 100 % = 70 - 95.
 
It was just a bug with that instance of the instruction. I created a brand new PID instruction with the exact same parameters and now it's functioning as intended. The output scales 0 - 100 % = 70 - 95.

I have had something weird happen before to me with regards to PID. Its been a few years so I don't remember exactly, but I remember weird unexplainable behavior. My fix was similar delete and recreate with exact same values fixing the issue.

o_O
 

Similar Topics

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,293
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
898
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,668
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,295
Good morning guys, I have a machine that fills bags of prepared food at a variable speed, and a machine that checks the weight of the bag. What...
Replies
23
Views
6,840
Back
Top Bottom