SLC PID Setpoint behaviour

elfrider

Member
Join Date
Nov 2015
Location
Midlands
Posts
30
Hi all,
Came across some examples today of PID instructions in an SLC 5/04 with the Setpoint (SMax) & Setpoint (SMin) both set to zero.
In addition the PV and SP were both scaled 0-1000 (in logic before the PID).
My understanding of these two parameters is they simply apply a scaling factor to the PV, so that you can specify a SP in a meaningful engineering unit. If that's the case, does it therefore apply no scaling when both are zero? If the PID instruction is expecting values in the range 0-16383, is leaving these at zero the same as manually setting a Smax of 16383?
Therefore, with my PV & SP only ever reaching a max of 1000, has the PID control been stuck operating in the bottom sixteenth of the range (which would explain a lot actually)?
I've since altered the PV & SP to be scaled 0-16383 pre-PID, and set the SMax to 16383 to avoid any unexpected behaviour, it just got me wondering that's all...
 
The SC flag determines whether Smin and Smax are used for set point scaling:

Code:
SC Scale Setpoint Flag 

(word 0, bit 5)
 Cleared when setpoint scaling values are specified.

Since the SLC is using integers for the PID computation, it is in your interest to keep the PV at the resolution of your analog input, or pre-scale to 0 - 16383. Then you would use the Smin and Smax values to enter the set point in engineering units in the PID setup dialog, and these would convert it to the 0 - 16383 scale when calculating error.

If the set point is coming from logic, it would just go directly into word #2 of the integer block, with a 0 - 16383 range if no SP scaling.

I think your observation is correct that scaling everything down to 0 - 1000 is detrimental. Though it has been a long time since I used the SLC integer-based PID.
 
Last edited:
Never noticed that flag before - just checked it and the PID's with zero's set (left as default) for the SMax & SMin do have that bit set ON, which therefore must tell the instruction to use the 0-16383 range (no scaling).

That would explain the extremely sluggish response before, despite setting the gain value very high. The PID was expecting a value 0-16383, but the PV/SP (and therefore the error) would only ever reach up to 1000, which in the 0-16383 range is fairly insignificant.

I guess I could have just specified an SMax of 1000 and I would have achieved the same outcome...
 

Similar Topics

Hi everyone, yet another PID problem. I'm hoping I understand enough of the process I'm controlling that my request for help is reasonable. If a...
Replies
113
Views
27,630
How can I test some PID code I have written for a SLC-500 in RSLogix500, without having an actual processor to test on. I have used Emulate500 to...
Replies
3
Views
1,814
Hello, I have a PID block in my program controlling pump speed in order to get a correct Differential pressure. The way I have it set up is the...
Replies
3
Views
1,238
I have a PID in a SLC 500 that does not function as it should. Have deleted it remade it and still have a problem also moved it up and down in the...
Replies
13
Views
2,716
Hello. im try migrate my program from SLC to Rslogix 5000, but i have some detail about PID convertion. The parameters for PID are not all same...
Replies
1
Views
2,121
Back
Top Bottom