S5-100U Integrated Blocks and Their Functions
Initialization and Call Up of the PID Controller in a STEP 5 Program
Several different PID controllers can be implemented by calling up OB251 repeatedly. A data block
must be initialized prior to each OB251 call up. These DBs serve as data interface between the
controllers and the user.
Note
Important controller data are stored in the high-order byte of control word DW11 (DL11).
Therefore make sure that only T DR 11/SU D11.0 to D11.7 or RU D 11.0 to D11.7
operations are used to modify user-specific bits in the control word.
Selecting the Sampling Interval
In order to be able to use the known analog method of consideration for digital control loops, do not
select a sampling interval that is too large.
Experience has shown that a TA sampling interval of approximately 1/10 of the time constant
T
RK, dom
* produces a control result comparable to the equivalent analog result. Dominant system
time constant T
RK, dom
determines the step response of the closed control loop.
TA = 1/10
•
T
RK, dom
In order to ensure the constancy of the sampling interval, OB251 must always be called up in the
service routine for time interrupts (OB13).
Figure 9-8. Principle of Interval Sampling
x
d
t
x
x = Control variable
t = Time
T
A
= Sampling interval
T
RK,dom
= Dominant system
time constant of
the closed control
loop
w = Reference
variable / Setpoint
x
d
= Control deviation
w
a
a
a
a
T
A
T
RK,dom
* T
RK, dom
= dominant system time constant of the closed control loop
EWA 4NEB 812 6120-02
9-21