PID control question!!!!

sparkytex

Lifetime Supporting Member
Join Date
Jun 2013
Location
Port Hardy B.C.
Posts
354
Hello everyone. I was asked to make an adjustment to one of our existing PLC programs this morning. I'm using a AB PLC5 with RSLogix 5. There's a PID controller for Level in our acid plant "atmopsheric tank". Theres a 4-20 mA valve (control variable) in line with our Acid plant "Pressure tank" which is where the acid is being pumped. Theres a level indication (process variable) on the Atmos. tank itself. In line with the valve is an acid pump and motor. What they requested was an interlock be added so that when the acid pump shuts off, the valve in line with the tank gets closed. there asking this because the check valve on the line isnt working and backpressure was building up and shutting the motor off under O/L in certain conditions. The valve is fail to close, and the scale in the PID is min0=0 and max0=100 (0-100). How should I go about writing a zero or 4 mA to the valve when the pump shuts off. Output module is a 1771 NOC High resolution I/O module. Analog output address is N27:396, and PID file is PD23:4. Also there is an running feedback from the pump to the PLC I:010/15 which I could utilize. Not super familiar with PID's and how they work, but I do need to learn how to program them on rslogix5 and rslogix 5000 asap!!

thanks,
 
not sure about the plc 5 however i would insert a rung and examine the run status if not running move 0 to the output (new rung) and if running enable the pid(existing rung)
 
So I could use the running feedback input as an XIO instruction followed by a MOV instruction with the source as 0 and the Destination as N27:396? or would I use the PD23:4.SO as the destination? so when ever the motor is off the rung would be true and it would move a 0 into The PID controller output.
 
Last edited:
See picture below for a working example of software manual mode. Your mileage will vary on what triggers the manual mode and what values you write the output. The PID instruction is still being scanned.

manualmode.png
 
Last edited:
Ok, so in my case the input of the running feedback XIO - I:010/15 from the motor would control "PD23:4.SWM" OTE going into manual on the PID. On the second rung wouldn't I only just need a XIC addressed to "PD23:4.SWM" followed by a MOV with the source as 0 and the destination as "PD23:4.S0"? chapter 14 there is pretty darn confusing and well over my head. I'm definitely a visual learner which makes learning how to program a PID from the book near impossible. I understand what PID's to a certain extent, but lack the hands on knowledge to execute one on my own.
 
On the second rung wouldn't I only just need a XIC

Yes, in the example I show the output value is coming from a SCADA system and is variable. So checking for a valid number is warranted.

Also when going back to auto you will have to reset the set-pont as the PV tracking will change it ( the set-point) when in manual.
 
well looking further into the program the PD23:4.SWM is already in use on ladder 9 rung 12. the control for the manual in PID is an XIC instruction from our wonderware HMI. there are two other move instructions in parallel with the OTE PD23:4.SWM on rung 12. The one MOV source is 100 and the dest. is PD23:4.MAXO, The other MOV's source is 0 and the dest. is PD23:4.MINO. On rung 13 theres an XIC labelled PD23:4.SWM in series with another XIC labelled PD23:4.PVT, the output of rung 13 is a MOV instruction with the source as PD23:4.PV and dest. as PD23:4.SP. I wish i could do up a nice ladder logic for you but unfortunately i dont know how to do that on here! My question is can i use another OTE labelled PD23:4.SWM or will i be doing the famous double coil syndrome? Should I just use the XIO I:010/15 to iniate a move thats source is 0 and dest. is PD23:4.SO?
 
Hello everyone. I was asked to make an adjustment to one of our existing PLC programs this morning. I'm using a AB PLC5 with RSLogix 5. There's a PID controller for Level in our acid plant "atmopsheric tank". Theres a 4-20 mA valve (control variable) in line with our Acid plant "Pressure tank" which is where the acid is being pumped. Theres a level indication (process variable) on the Atmos. tank itself. In line with the valve is an acid pump and motor. What they requested was an interlock be added so that when the acid pump shuts off, the valve in line with the tank gets closed. there asking this because the check valve on the line isnt working and backpressure was building up and shutting the motor off under O/L in certain conditions. The valve is fail to close, and the scale in the PID is min0=0 and max0=100 (0-100). How should I go about writing a zero or 4 mA to the valve when the pump shuts off. Output module is a 1771 NOC High resolution I/O module. Analog output address is N27:396, and PID file is PD23:4. Also there is an running feedback from the pump to the PLC I:010/15 which I could utilize. Not super familiar with PID's and how they work, but I do need to learn how to program them on rslogix5 and rslogix 5000 asap!!

thanks,

There is likely a MOV instruction between the PID output and the Analog Output command. If not.....I would add one, buffer the output, and condition the MOV to unconditionally move a 0 to the Analog Output if the interlock is off.

Essentially...

MOV PID output to buffer.
Interlock OK....MOV Buffer to Analog Output.
Interlock not OK....MOV 0 to Analog Output.

Would also disable the PID instruction if the interlock is off to prevent loop windup.

Typically anything that is interlock related you want as close to the output you are controlling as possible and as simple as possible.
 
Last edited:
There is likely a MOV instruction between the PID output and the Analog Output command. If not.....I would add one, buffer the output, and condition the MOV to unconditionally move a 0 to the Analog Output if the interlock is off.

Essentially...

MOV PID output to buffer.
Interlock OK....MOV Buffer to Analog Output.
Interlock not OK....MOV 0 to Analog Output.

Would also disable the PID instruction if the interlock is off to prevent loop windup.

Typically anything that is interlock related you want as close to the output you are controlling as possible and as simple as possible.

what do you mean by Mov PID output to buffer? not sure what is meant by the term "buffer" thanks!!
 
Basically an unused integer.


ahh makes sense. So in my case the interlock is a running feedback from a pump ( I:010/15 ) I can use that in the place of B3:0 so that when the pump isn't running the the PID would be disabled and the valve will be forced a value of zero through the Mov instruction. BCE123, are you saying that if you disable a PID it will go to a value of zero any ways?
 

Similar Topics

Been working with PLCs for a couple of decades, but almost 100% DirectLogic. Have a customer who wanted me to make a couple of simple changes to a...
Replies
3
Views
1,122
New to the EcoStruxure programming software (I'm an AutomationDirect guy) and I've been banging my head against the wall trying to figure out how...
Replies
2
Views
1,022
Hi all, I have a PID loop in an AB ControlLogix processor and what I'd like to do is make sure that it doesn't all the CV to fall below a certain...
Replies
3
Views
1,466
Good morning, I have a question and I don't really know what you would call this.... I have 2 tanks which I need to control the level or froth...
Replies
14
Views
7,774
Dear All, I’m configuring a PID control using Modicon PL7. I have never worked with the Schneider Electric equipment before. Does anybody have...
Replies
0
Views
3,193
Back
Top Bottom