turning off a pid loop

jimbom

Member
Join Date
Jul 2002
Location
Buffalo, NY
Posts
19
gentlemen,
I have been programming plcs for 15 years but almost exclusively discrete i/o. Recently, I took on a project with both analog and discrtet i/o. The system is comprised of a slc5/05 processor with digital and analog modules. I control a hydraulic cylinder with a linear transducer for feedback with a proportional valve. PV is 4-20ma and CV is -+10v. I have the PID loop working properly with target sp set by a button on an HMI. It extends when hit the + button and retracts when you hit the - button. The problem is that in auto mode the operator controls the cylinder but on occassion the operator will take the system out of auto mode and put it into manual mode. At this time he will move the cylinder manually with a selector switch. Since the PID loop is still functioning it will try to move the cylinder back to its last setpoint position. Is there any way to turn off the PID function at this time? Disable the output channel? or in manual move the linear transducer value into the setpoint value? Any input (pun) would be greatly appreciated.
Thanks
Jim
 
gentlemen,
I have been programming plcs for 15 years but almost exclusively discrete i/o. Recently, I took on a project with both analog and discrtet i/o. The system is comprised of a slc5/05 processor with digital and analog modules. I control a hydraulic cylinder with a linear transducer for feedback with a proportional valve. PV is 4-20ma and CV is -+10v. I have the PID loop working properly with target sp set by a button on an HMI. It extends when hit the + button and retracts when you hit the - button. The problem is that in auto mode the operator controls the cylinder but on occassion the operator will take the system out of auto mode and put it into manual mode. At this time he will move the cylinder manually with a selector switch. Since the PID loop is still functioning it will try to move the cylinder back to its last setpoint position. Is there any way to turn off the PID function at this time? Disable the output channel? or in manual move the linear transducer value into the setpoint value? Any input (pun) would be greatly appreciated.
Thanks
Jim

In the control block of your PID, bit 1 is the Auto/manual bit. Example if N7:40 is control block, N7:40/1 if set puts the PID into manual mode.

Use logic to set this bit when in manual mode.
 
In the control block of your PID, bit 1 is the Auto/manual bit. Example if N7:40 is control block, N7:40/1 if set puts the PID into manual mode.

Use logic to set this bit when in manual mode.

Interesting have encountered the problem of overriding an automatic control when troubleshooting.

I like the idea of turning off (auto manual bit) to shutdown the PID. Then using a manual auto hard wire switch to move cylinder and do maintenance troubleshooting setting limit switches etc.

The only problem I see is when allowing PID to turn on and there is a great difference in actual position and position dictated by PID output - guess one would have to make sure all tools and people are clear when switching modes.

would like to hear other thought on "switch back to auto" problem.

Dan Bentler
 
The auto/manual bit can be set or cleared by instructions in your ladder
program. When off (0), it specifies automatic operation. When on (1), it
specifies manual operation. In automatic operation, the instruction controls
the control variable (CV). In manual operation, the user/control program
controls the CV. During tuning, set this bit to manual. (from the manual). In this case an operator is standing at the unit and bumps a selector switch to position the cylinder. It sounds like the program would still try to move the proportional valve regardless.

Jim
 
I havent done alot of PID work, but could you not put an instruction of front of the PID instruction (eg, auto/manual input)
 
can you post the .RSS program file? ... you'll have to ZIP it first - but if you're allowed to post it we'd probably be able to offer more detailed help ...
 
Jim,

Looking at your "New Capaton Pump" RSLogix program, on Ladder 7, Rungs 0, are you sure that you have your PID block set up correctly? (See RSLogix Help file below.)

I can not find any place where you are porting your Manual-Mode Setpoint to Output O:10.2. That is done outside the PID block. So when the PID bit N18:0/1 bit is set to 1 (PID Manual Mode), your program needs to move the Manual Valve Output Setpoint to O:10.2. You need to add a rung (similar to Rung 003), except move the Manual Setpoint to O:10.2. With PID Manaul Mode ON, N11:10 (or whatever your Manual Setpoint is) should be moved to O:10.2, the CV Output. You need to make sure that N11:10 is scaled to be the same range as the Auto-Mode range of O:10.2.

If you successfullly implement the above, your PID block will work as you expect.
PID Control Block layout
Rockwell Software 2000

Control Block Layout:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word 0 EN DN PV SP LL UL DB DA TF SC RG OL CM AM TM
Word 1 PID Sub Error Code (MSB)
Word 2 Setpoint SP
Word 3 Gain Kc
Word 4 Reset Ti
Word 5 Rate Td
Word 6 Feed Forward Bias
Word 7 Setpoint Maximum (Smax)
Word 8 Setpoint Minimum (Smin)
Word 9 Deadband
Word 10 INTERNAL USE - DO NOT CHANGE!!
Word 11 Output Max
Word 12 Output Min
Word 13 Loop Update
Word 14 Scaled Process Variable
Word 15 Scaled Error SE
Word 16 Output CV% (0-100%)
Word 17 MSW Integral Sum 5/03/Micro 1500 MSW Integral Sum
Word 18 LSW Integral Sum 5/03/Micro 1500 LSW Integral Sum
Word 19 Altered Derivative Term (Low word)
Word 20 Altered Derivative Term (High word)
Word 21 Time of Last Update
Word 22 Setpoint Old Value

Warning! Do not alter the state of any PID control block value unless you fully understand its function and related effect on your process. Unexpected operation could result with possible equipment damage and/or personal injury.
Rockwell Software 2000
 
Last edited:
So when I put the system in manual mode I should also put the PID loop in manaul mode and move some setpoint value into the actual output? If the cylinder is moved from this setpoint will it try to move back? When the system is put into auto mode the customer wants the cylinder to go to fully extended position (feathered) nad the target value should go to zero and then an operator will adjust from there.
 
The old-fashioned instruments had a Manual mode that moved the Setpoint to the Output. The RSLogix PID block tries to simulate that but only goes part of the way. In Manual Mode, you still have to insert a rung that moves the setpoint to the CV output. If the PID is in Manual, it will not change the CV output from what you put into it.

It sounds like that when your system is in Manual Mode, your PID block needs to switch to PID Auto mode, and when your system is in Auto mode, the PID block needs to switch to PID Manual mode.

In PID Auto mode, the CV output is controlled based on the PID settings, the Process Varaiable, and the Setpoint. In PID Manual mode, the PID is disabled and the Setpoint is copied manually (by an inserted rung) to the CV Output.
 

Similar Topics

I have a strange problem. We have 6 cart, all setup, wired exactly the same. On two of those the QBAD_I_xx does not turn off. The safety card is...
Replies
1
Views
1,545
Having an random problem with this PLC. The inputs and output turning off then suddenly turning back on. Still have 24 VDC on the inputs and 120...
Replies
3
Views
2,145
The following is the way I call a bunch of routines from the top level routine. It works fine, however I discovered that I can not restart the...
Replies
11
Views
2,602
Our Automation Direct HMI's one push button is activating on and off on its own without anyone touching the HMI button. I power cycled the HMI...
Replies
7
Views
4,095
I am using some graphics from the standard FT View Library. I don wan to use the built in animations. For example, I am using some valves and a...
Replies
2
Views
2,127
Back
Top Bottom