Specifications

SIMATIC Instructions
9-91
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Variables and Ranges
The process variable and setpoint are inputs to the PID calculation. Therefore the
loop table fields for these variables are read but not altered by the PID instruction.
The output value is generated by the PID calculation, so the output value field in
the loop table is updated at the completion of each PID calculation. The output
value is clamped between 0.0 and 1.0. The output value field can be used as an
input by the user to specify an initial output value when making the transition from
manual control to PID instruction (auto) control of the output (see discussion in the
Modes section below).
If integral control is being used, then the bias value is updated by the PID
calculation and the updated value is used as an input in the next PID calculation.
When the calculated output value goes out of range (output would be less than 0.0
or greater than 1.0), the bias is adjusted according to the following formulas:
MX = 1.0 - (MP
n
+ MD
n
) when the calculated output, M
n
> 1.0
or
MX = - (MP
n
+ MD
n
) when the calculated output, M
n
< 0.0
where:
MX is the value of the adjusted bias
MP
n
is the value of the proportional term of the loop output at sample time n
MD
n
is the value of the differential term of the loop output at sample time n
M
n
is the value of the loop output at sample time n
By adjusting the bias as described, an improvement in system responsiveness is
achieved once the calculated output comes back into the proper range. The
calculated bias is also clamped between 0.0 and 1.0 and then is written to the bias
field of the loop table at the completion of each PID calculation. The value stored in
the loop table is used in the next PID calculation.
The bias value in the loop table can be modified by the user prior to execution of
the PID instruction in order to address bias value problems in certain application
situations. Care must be taken when manually adjusting the bias, and any bias
value written into the loop table must be a real number between 0.0 and 1.0.
A comparison value of the process variable is maintained in the loop table for use
in the derivative action part of the PID calculation. You should not modify this
value.