Quick Start Guide To Using PID in Logix5000
Quick Start Guide To Using PID in Logix5000
It is assumed that the reader has three important skills: a good working
knowledge of PID, a good working knowledge of the Logix 5000 platform,
and a good working knowledge of the process and system to which the
PID block is to be applied.
Note carefully that the methods used here are not universally applicable
nor are they the only means of arriving at a PID solution to your control
application. If you are not already familiar with PID control, we strongly
recommend you read one of our Getting Started Guides to PID Control,
and if you are not familiar with PLC programming, we strongly recommend
you read our Getting Started Guide to Programmable Logic Controllers.
Step number one in the solution of any control problem is to first assure
that the process can be controlled well. If, for example, you have an
industrial oven which is heated by a gas burner, can you disconnect the
mechanical linkage between the servo motor and the throttle and then
adequately control the temperature by physically moving the throttle? If
you can’t, then maybe you have a problem that the most finely tuned PID
loop can never control! Assuming that you can control your process
manually, continue on…
1. Insert the PID block from the “Special” menu. Be sure to assign its tag
the Data Type “PID”. Enter a tag for the Process Variable, keeping in mind
the possibility of internal scaling (discussed in Step 11). Leave Tieback at
zero for now (it will be discussed in Step 13). Enter a tag for the Control
Variable. In most cases leave “PID Master Loop”, “Inhold Bit”, and “Inhold
Value” at zero unless you really plan to use them.
Page 2 of 9
2. There are two approaches to manipulating the data within the PID
block. The simpler approach is to set control bits and write data directly in
the block using RSLogix 5000. You can perform PID on a process using as
little as a tag for the PID instruction and a tag for the CV, then manually
keying in a value for the setpoint, and finally entering parameters in the
PID block’s setup screen. The second approach is more sophisticated,
where the various commands and data registers are written to from the
ladder logic. All of these data locations are listed in tables at the end of
this document. The vast majority of PID applications will use both
approaches to some degree. The most common strategy is to write to the
setpoint using data that is coming in from a touchscreen, while a more
complex strategy might allow adjustment of PID parameters from a
touchscreen as well.
3. Open the PID block’s setup screen and select the Configuration tab.
The first selection to be made is titled “PID Equation”. When setting up the
PID block, you are given the option of using either dependent or
independent gains. There is no operational difference between the two:
both methods work equally well in any situation. The only consequence
of this choice is that the units of Reset and Rate (the “I” and “D” of PID) will
have different meanings. We recommend you use dependent gains for
three reasons: it is more commonly used, it is the ISA Standard, and it is
what was used in the Logix 500 platform. If you should choose to use
independent gains, be aware that Integral (Reset) operates as “Repeats
per Second” instead of “Minutes per Repeat” (also known as time
constant in minutes) and that Derivative (Rate) operates in seconds rather
than in minutes. The following information assumes, however, that you will
configure your PID block for dependent gains.
5. In most cases the choice for “Derivative Of” will be PV. If your process
can tolerate significant overshooting and you are looking for very fast
response, choose Error.
7. Leave the “CV High Limit” on 100 and the “CV Low Limit” on 0 unless
you have a good reason to limit your output.
11. Next, select the Scaling tab. There are three fields (PV, CV, and
Tieback) and one checkbox (PID Initialized) on this tab. There are
actually two significant issues associated with the PV field: scaling of data
(if necessary), and the defining of the control range (absolutely critical to
the tuning of your PID loop). When you enter min and max values for “PV
Engineering Units”, you are defining the control range. This is the value
upon which the percent PB (reciprocal of Gain, or Kp) is based. For
example, if you chose a Kp value of 30, then set “Engineering Units Min” =
0 and “Engineering Units Max” = 500, you will have a PB of 3.3% or 16.5
engineering units. If you do not wish to use the scaling function, then your
Unscaled Max and Min values will be the same as your Engineering Unit
Max and Min values.
12. The “Control Variable (CV)” field allows for min and max values of the
controlling variable. When the PID block calls for maximum or 100%
output, the value for “Max (at 100%)” is the bit value that will be written to
the output. For example, if you are controlling a gas burner that is
operated by a 0 to 10 VDC signal and that signal comes from an analog
output that is controlled by a bit range of 0 to 32767, you would enter 0 for
the Min value and 32767 for the Max value. If, for example, you entered a
value of 10000 for the Max value, the gas burner in this example would
only open up less than half way when there is a call for 100% output.
13. The “Tieback” field has significance only when you put the PID block
in Manual Mode. If you expect to occasionally use Manual control,
“Tieback Max” and “Tieback Min” are used in the same way that the
“Control Variable (CV)” field is used. These values are simply used in
place of the “Control Variable (CV)” values when the PID is block is in
Manual Mode. See also Step 15 for a complete discussion of Manual
mode.
14. “PID Initialized” should always be checked. The only time it is ever
unchecked is in the event of changing scaling parameters while on the fly
(remaining in run mode).
Page 5 of 9
15. Next, select the Tuning tab. Note that the “Manual Modes” field has
two selections, Manual and Software Manual. If both are selected,
Manual overrides Software Manual. The only difference between the two
is that Manual mode uses the Tieback values established on the Scaling
tab, while Software Manual uses the “Set Output” value which you enter
here on the Tuning tab. Note that when running in Auto mode (regular PID
control) the “Set Output” window displays the current CV value expressed
as a percentage.
16. A setpoint value can be set here at “Setpoint (SP)”, provided that your
logic is not writing a value to .SP
17. In most cases, leave “Output Bias” at zero. This feature is used in feed
forward schemes where Integral action is turned off.
18. The “Tuning Constants” field is where you set the primary PID
parameters, unless, of course, your logic writes to .KP, .KI, and .KD. This
approach would apply if, for example, you want the end user to be able
to access the P, I, and D values from perhaps a touchscreen instead of
from within Logix 5000. As is the RSLogix standard, the Proportioning
percent is established using its reciprocal, Gain (Kp), the Integral or Reset
term is established as time constant in minutes per repeat, and the
Derivative or Rate term is established as time constant in minutes. As
mentioned previously in Step 3, however, the Integral and Derivative terms
are established differently if you elect to use independent gains.
20. In the event you wish to control a device that is either on or off (as
opposed to modulated or throttled from low to high), you will need some
additional ladder logic to convert your PID block’s analog output value to
a time-proportioning discrete signal. We have developed an Add-On
routine that gives the user control over cycle time and minimum on and
off times. See TPR.L5X in our Free Downloads section.
21. For help with tuning your loop, we suggest reading our Simplified
Guide to PID Temperature Control or our Simplified Guide to PID Process
Control. Additionally, read our Quick Start Guide to Tuning the PID Block in
Logix 5000, a free download.
Page 7 of 9