Académique Documents
Professionnel Documents
Culture Documents
Derivative Instruction
[Main Page] [Topic Index] [Command Index]
PID Menu:
Entering Parameters
PID Instruction Flags
Entering Parameters
During Programming you must enter locations for the Control Block, Process
Variable, and Control Variable once the PID instruction is entered into the
ladder logic.
Control Block
This file is the heart of the programming because it stores the data
required to operate the PID function. The file length is fixed at 23
words and it should be entered as an integer file. For example, an entry
of N10:0 will occupy elements N10:0 through N10:22. It is a good idea
to use a unique data file to hold your PID control blocks. This is to
avoid re-using the PID control addresses later in the program. N10:0 is
a good example of this. Here is an example of the Control Block layout.
Process Variable PV
This is the address that stores the input variable. This address can be the
location of the analog input word where the value of the input address
is stored. You can enter this value as a integer as long as you pre-scale
the input value to the range of 0-16383.
Control Variable CV
This variable stores the output of the PID instruction. Like the Process
Variable, the CV's range is from 0 to 16383. 16383 is noted as the
100% or "on" position. This value is normally an integer, so you can
scale the PID output range to fit your PID application. See the page
on PID and Analog I/O Scaling for more information on this subject.
The figure below shows a PID instruction with common addresses for
these parameters entered.
The Setpoint is the control point of the process variable. This value can
easily be changed in the ladder logic. While using PID control you will
probably be adjusting this value often. Write the value in the 3rd word
in the control block (for example if your control block is N10:0 store
the setpoint in N10:2). Without scaling, the range of this value is from
0-16383. Otherwise the range is min scaled (word 8) to max scaled
(word 7).
Control Block Diagram
Gain Kc (word 3)
This is the Proportional gain. It ranges from .1 to 25.5 on the SLC 5/00
and 5/01's and 0-32767 for the SLC 5/03's and 5/04's. A rule of thumb
is to set the gain to one half the value needed to cause the system to
oscillate when the Reset and Rate terms are set to zero.
Reset Ti (word 4)
This is the Integral gain. The range for this gain ranges from .1 to 25.5
minutes per repeat. However as in the proportional gain, the SLC 5/03's
and 5/04's range from 0-32767 minutes/repeat. A rule of thumb is to set
the reset time equal to the natural period found in gain K c.
Rate Td
This is the Derivative term. The range for this value is from .01 to 2.55
minutes. For the SLC 5/03's and 5/04's the range is from 0-32767. It is
recommended that this value be set to 1/8 of the integral time.
Maximum Scaled Smax (word 7)
This parameter recognizes the setpoint value when it is in engineering
units. The control input must be 16383 (or 32768 for the 5/03 and
5/04). The valid range is -16383 to +16383. The SLC 5/03's and 5/04's
range is from -32768 to +32767.
Minimum Scaled Smin (word 8)
This parameter is exactly like the Smax except the control input must
be zero.
Note: Smin-Smax, scaling allows you to enter the setpoint in
engineering units. The deadband, error, and process variable will be
displayed as enginerring units. The process variable must still be
within it's range from 0-16383.SLC 5/03 and SLC 5/04 specific: Scaled
errors larger or smaller than its range of -32768 to +32767 will be
Deadband DB (word 9)
This parameter is always a positive value. The deadband's value ranges
from above the setpoint value to below the setpoint value in which you
enter. The deadband value is entered at the zero crossing point of the
process variable (PV) and the setpoint (SP). This implies that the
deadband is only effective once the PV enters the deadband and has
passed through the setpoint (SP). The range of the deadband if it is
scaled max (Smax) is 0, and if there is no scaling the range is from 0 to
16383.
Loop Update (word 13)
This is the time interval between PID calculations. The value is in 0.01
second intervals. A rule of thumb is to set the loop update time five to
tens tims faster than the natural period of the load (this is determined by
setting the reset and rate parameters to zero and then adjusting the gain
until the output begins to oscillate). When in the STI mode, this value
must equal the STI time interval value S:30. The valid range for this
parameter is 1 to 2.55 seconds. For the SLC 5/03 and 5/04 the range is
from 0.01 seconds to 10.24 seconds.
Scaled Process PV (word 14)
This parameter is for display only. This is the scaled value of
the Process Variable (the analog input). Without scaling the range of
this parameter is 0 to 16383. Otherwise, the range is Minimum Scaled
(word 8) to Maximum Scaled (word 7).
Control Block Diagram
Scaled Error (word 15)
This parameter is also for display only. This is the scaled error,which is
selested by the control mode parameter. The range is scaled maximum
to scaled maximum, or 16383 to -16383 when no scaling exists.
Note: SLC 5/03 and SLC 5/04 specific: Scaled errors larger than
The right column of the display above shows various flags associated with PID
instruction. This section will describe the flags.
Timed Mode Bit (word 0, bit 0)
This function specifies the PID mode. It is only effective when the TIMED
Mode (TM) is in effect. This bit is not cleared and is not effective when the STI
mode is engaged. This bit can easily be edited within your ladder logic program.
Auto/Manual Bit (word 0, bit 01)
This flag specifies automatic operation when it is cleared and manual operation
when it is set. This bit can also be set or cleared by the instructions in your
ladder logic program. For more information about the Auto/Manual bit see
the Auto/Manual Parameter earlier in this page.
Control Mode Bit CM (word 0, bit 02)
This bit is cleared if the control is E=SP-PV. It is set if the control is E=PV-SP.
This bit can be set or cleared in you ladder logic program. To see more
information on CM see the Control Mode Parameter description.
Note:It is a good idea to refer to the Control Block Diagram to see how these
flags and the following flags fit into your program.
Output Limiting Enabled Bit OL (word 0, bit 03)
This flag is set when you choose to limit the Control Variable Parameter using
function key [F4]. This bit can be set or cleared in your ladder logic program.
SLC 5/03 and SLC 5/04 specific - Reset and Gain Range Enhancement Bit RG
(word 0, bit 4)
When this bit is set, it causes the Reset Minute/Repeat Value and the gain
multiplier to be enhanced by a factor of 10, (reset multiplier of .01
andgain multiplier of .01).
Example with bit 4 set: With a reset value of 1 the integral value is 0.01
minutes/repeat(0.6 seconds/repeat). This value will be applied to the PID
algorithm. A gain value of 1 means that the error will be multipied by 0.01 and
applied to the PID algorithm. When bit 4 is clear the characteristics are the same
except a reset or gain value of 1 indicates the integral value is 0.1 minutes/repeat
and the error is multiplied by 0.1.
This flag is the same as the upper limit except the bit is set when the calculated
control output CV exceeds the lower CV limit.
Setpoint Out of Range SP (word 0, bit 11)
The Setpoint Out of Range bit is set when the Setpoint exceeds the maximum
scaled value or is less than the minimum scaled value.
Process Var Out of Range PV (word 0, bit 12)
This bit is set when the unscaled Process Variable exceeds 16383 or is less than
zero.
PID Done DN (word 0, bit 13)
This is set on scans when the PID algorithm is computed. It is computed at
the Loop Update rate.
PID Enabled EN (word 0, bit 15)
This bit is set when the rung which contains the PID instructions is enabled.