Siemens SIMATIC S7 System Manual page 320

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Program instructions
7.9 PID
Modes
There is no built-in mode control for PID loops. The PID calculation is performed only when
power flows to the PID box. Therefore, "automatic" or "auto" mode exists when the PID
calculation is performed cyclically. "Manual" mode exists when the PID calculation is not
performed.
The PID instruction has a power-flow history bit, similar to a counter instruction. The
instruction uses this history bit to detect a 0-to-1 power-flow transition. When the power-flow
transition is detected, it will cause the instruction to perform a series of actions to provide a
bumpless change from manual control to auto control. In order for change to auto mode
control to be bumpless, the value of the output as set by the manual control must be
supplied as an input to the PID instruction (written to the loop table entry for M
switching to auto control. The PID instruction performs the following actions to values in the
loop table to ensure a bumpless change from manual to auto control when a 0-to-1 power-
flow transition is detected:
● Sets setpoint (SP
● Sets old process variable (PV
● Sets bias (MX) = output value (M
The default state of the PID history bits is "set" and that state is established at startup and on
every STOP-to-RUN mode transition of the controller. If power flows to the PID box the first
time that it is executed after entering RUN mode, then no power-flow transition is detected
and the bumpless mode change actions are not performed.
Alarm checking and special operations
The PID instruction is a simple but powerful instruction that performs the PID calculation. If
other processing is required such as alarm checking or special calculations on loop
variables, these must be implemented using the basic instructions supported by the CPU.
Error conditions
When it is time to compile, the CPU will generate a compile error (range error) and the
compilation will fail if the loop table start address or PID loop number operands specified in
the instruction are out of range.
Certain loop table input values are not range checked by the PID instruction. You must take
care to ensure that the process variable and setpoint (as well as the bias and previous
process variable if used as inputs) are real numbers between 0.0 and 1.0.
If any error is encountered while performing the mathematical operations of the PID
calculation, then SM1.1 (overflow or illegal value) is set and execution of the PID instruction
is terminated. (Update of the output values in the loop table could be incomplete, so you
should disregard these values and correct the input value causing the mathematical error
before the next execution of the loop's PID instruction.)
320
) = process variable (PV
n
) = process variable (PV
n-1
)
n
)
n
)
n
System Manual, V2.3, 07/2017, A5E03822230-AF
) before
n
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents