1 2 3 4 5 A Modular PID Control Simatic: Manual
1 2 3 4 5 A Modular PID Control Simatic: Manual
1 2 3 4 5 A Modular PID Control Simatic: Manual
Product Overview –
Modular PID Control 1
C79000-G7076-C121-01
Safety Guidelines This manual contains notices which you should observe to ensure your own personal safety, as well as to
protect the product and connected equipment. These notices are highlighted in the manual by a warning
triangle and are marked as follows according to the level of danger:
Danger
! indicates that death, severe personal injury or substantial property damage will result if proper precautions are
not taken.
Warning
! indicates that death, severe personal injury or substantial property damage can result if proper precautions are
not taken.
Caution
! indicates that minor personal injury or property damage can result if proper precautions are not taken.
Note
draws your attention to particularly important information on the product, handling the product, or to a particular
part of the documentation.
Qualified Personnel The device/system may only be set up and operated in conjunction with this manual.
Only qualified personnel should be allowed to install and work on this equipment. Qualified persons are
defined as persons who are authorized to commission, to ground, and to tag circuits, equipment, and sys-
tems in accordance with established safety practices and standards.
Warning
! This device and its components may only be used for the applications described in the catalog or the technical
description, and only in connection with devices or components from other manufacturers which have been
approved or recommended by Siemens.
This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, and
operated and maintained as recommended.
Purpose This manual will help you when selecting, configuring, and assigning
parameters to a controller block for your control task.
The manual introduces you to the functions of the controller block and
explains how to use the Startup and Test tool.
Overview of the
Product
Modular
PID
Control
Contents of the
Manual
Ch. 1 Provides you with an overview of Modular PID Control.
Conventions in the To make it easier for you to find information in the manual, certain
Text conventions have been used:
S First glance through the titles in the left margin to get an idea of the
content of a section.
S Sections dealing with a specific topic either answer a question about the
functions of the tool or provide information about necessary or
recommended courses of action.
S References to further information dealing with a topic are indicated by
(see Chapter or Section x.y). References to other documentation are
indicated by a number in slashes /.../. Based on these numbers, you can
refer to the References in the Appendix if you require the full title of the
documentation.
Further Support If you have any questions not answered in either the manual or the online
help, please contact your Siemens SIMATIC distributor or sales office.
You will find the addresses in the Appendix “SIEMENS Worldwide” in the
manual “S7-300 Programmable Controller, Hardware and Installation”.
If you have questions or comments about the manual itself, please fill in the
Remarks Form at the end of the manual and return it to the address shown on
the form. We would also be grateful if you would also take the time to give
your personal opinion of the manual.
Siemens also offers a number of training courses to introduce you to the
SIMATIC S7 automation system. Please contact your regional training center
or the main training center in:
D-90327 Nuremberg,
Germany, Tel. (+49) 911 985 3154.
3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
3.1 Using Modular PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
3.2 Example 1: Fixed Setpoint Controller with Switching Output for
Integrating Actuators with Process Simulation . . . . . . . . . . . . . . . . . . . . . . . . 3-5
3.2.1 PIDCTR_S: Fixed Setpoint Controller with Switching Output for
Integrating Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
3.2.2 PROC_S: Process for Step Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
3.3 Example 2: Fixed Setpoint Controller with Continuous Output with
Process Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
3.3.1 PIDCTR_C: Fixed Setpoint Controller with Continuous Output for
Integrating Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
3.3.2 PROC_C: Process for Continuous Controller . . . . . . . . . . . . . . . . . . . . . . . . 3-11
3.4 Example 3: Fixed Setpoint Controller with Switching Output for
Proportional Actuators with Process Simulation . . . . . . . . . . . . . . . . . . . . . . 3-12
3.4.1 PIDCTR: Primary Controller for a Continuous Controller with Pulse
Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
3.4.2 PROC_P: Process for a Continuous Controller with Pulse Generator . . . 3-15
3.5 Example 4: Single-Loop Ratio Controller (RATIOCTR) . . . . . . . . . . . . . . . . 3-16
3.6 Example 5: Multiple-Loop Ratio Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
3.7 Example 6: Blending Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
3.8 Example 7: Cascade Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
3.9 Example 8: Controller with Precontroller (CTRC_PRE) . . . . . . . . . . . . . . . . 3-26
3.10 Example 9: Controller with Feedforward Control (CTR_C_FF) . . . . . . . . . 3-28
3.11 Example 10: Range Splitting Controller (SPLITCTR) . . . . . . . . . . . . . . . . . . 3-30
3.12 Example 11: Override Controller (OVR_CTR) . . . . . . . . . . . . . . . . . . . . . . . . 3-33
3.13 Example 12: Multiple Variable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-36
4 Technical Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
4.1 Run Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
4.2 Work Memory Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
4.3 Rules of Thumb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
5 Startup and Test Tool for Modular PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
A References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Glossary-1
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index-1
Concept of The “Modular PID Control” software product consists of a set of function
Modular blocks (FBs) and functions (FCs) containing the algorithms for creating
PID Control controller functions. This is therefore purely a software controller in which
you can implement the controller functions by interconnecting the blocks.
The block library is supplemented by a number of ready-to-use controller
structures (single-loop fixed setpoint controller, ratio controller etc.) in the
form of examples. You can copy and adapt these examples to suit your own
control task.
When operating a large number of control loops, it is usually the case that
some loops must be processed more often than others although each loop
itself must be processed at equidistant intervals. For this situation, there is a
loop scheduler (LP_SCHED) available with which extensive control systems
can be configured clearly and simply. This also ensures that the load on the
CPU is spread out.
To help you install and test individual control loops, the package also
includes the “Startup and Test” tool. This includes a loop monitor, a curve
recorder for manipulating and monitoring process variables, and an algorithm
for process identification and optimization of the PID parameters.
Overview of the In many control tasks, the classic PID controller that influences the process is
Basic Functions not the sole important element but great demands are also made on signal
processing.
A controller created with the “Modular PID Control” software package
therefore consists of a series of subfunctions for which you can select
parameter values separately. In addition to the actual controller with the PID
algorithm, functions are also available for processing the setpoint and process
variable and for adapting the calculated manipulated variable.
Modular PID The “Modular PID Control” package consists of a library with function
Control FB blocks and 12 ready-to-use examples of controllers.
You can install the software on programming devices/PCs with the SETUP
program. The online help system provides you with information about
subfunctions and individual parameters while you are working.
Modular PID Using the “Startup and Test” tool, you can install, start up and test your
Control Tool controller structure and optimize the PID parameters.
The Startup and Test tool includes a loop monitor, a curve recorder and an
algorithm for setting or optimizing the PID controller parameters. The
Startup and Test tool is described in detail in Chapter 5.
Modular For details of the content of this manual, refer to the table of contents.
PID Control
Manual
Hardware The controllers created with the “Modular PID Control” can be run on the
Environment programmable controllers (CPU with floating-point and cyclic interrupts) of
the S7-300 and S7-400 family.
PG/PC OS, OP
STEP 7
Configuring
Parameter assignment Operator
Test control/
Installation/startup monitoring
CPU CP
S7-300/400
MPI
LAN bus
Software Modular PID Control is designed for use in the STEP 7 program group.
Environment
Apart from the STEP 7 software, you also require:
– Microsoftr Windowst 95.
The configuration software for Modular PID Control can be installed locally
on a programming device/PC or in a network on a central network drive.
Range of Both slow processes (temperatures, tank levels) and very fast processes (flow
Functions of rate, motor speed) can be controlled. The following controller types can be
Modular PID implemented:
Control
S Continuous PID controllers
S PID step controllers for integrating actuators
S Pulse-break controllers
Conventions Used The names of the parameters are a maximum of 8 characters long.
with Parameter
The following conventions were used to name the parameters:
and Block Names
in the Block First letter:
Diagrams
Q general output of the type BOOL (Boolean variable)
SP setpoint
PV process variable
LMN manipulated variable or analog output signal
DISV disturbance variable
Following letters:
MAN manual value
INT internal
EXT external
_ON BOOLEAN variable to activate a function
Call Data Most blocks in the Modular PID Control package require loop-specific call
data such as the complete restart bit and sampling time. These values are
transferred via the inputs COM_RST and CYCLE.
Notes on the block parameters (input, output and in/out parameters)
S Default: these are the default values used when an instance is created.
S Permitted Values: the values set for the input parameters should not
exceed the permitted range of values. The range is not checked when the
block is executed. The entry “technical range of values” means a physical
variable with a value between approximately 10 6.
Application If the process variable is affected by noise and the controller is optimally set,
the noise will also affect the controller output. Due to the high switching
frequency (step controller), this increases wear and tear on the actuator.
Suppressing the noise prevents oscillation of the controller output.
Block Diagram
ADAPT
A_DEAD_B
INV OUTV
ADAPT
DB_W H_LM DB_W IDTH
DB_W L_LM
CRIT_FRQ
RET_FAC
ADAPT_ON
COM_RST
CYCLE
Functional This block filters high-frequency disturbance signals out of the error signal. It
Description forms a dead band around the zero point. If the input variable is within this
dead band, zero is applied to the output. The width of the dead band is
automatically adapted to the amplitude of the noise signal.
The block operates according to the following function:
OUTV = INV + DB_WIDTH when INV < –DB_WIDTH
OUTV = 0.0 when –DB_WIDTH ≤ INV ≤ +DB_WIDTH
OUTV = INV – DB_WIDTH when INV > +DB_WIDTH
OUTV
–DB_W IDTH
Adaptation of the To ensure stability, the effective dead width band DB_WIDTH is limited
Dead Band downwards by the selectable input parameter DB_WL_LM. If the input
signal INV affected by noise exceeds the currently set dead band width in the
negative (1), positive (2), and then negative (3) direction again within the
period 1/CRIT_FRQ, the effective band width is increased by the value 0.1.
(see also Figure 2-4).This procedure is started whenever the dead band is
exceeded in a positive or negative direction. Whenever the dead band is
exceeded subsequently (3 –> 4), in the opposite direction within half the
period, it is once again increased by 0.1. This procedure is repeated until the
dead band width matches the amplitude of the measured noise. To prevent
input signals of any magnitude being suppressed, the effective dead band
width is limited upwards by the input DB_WH_LM. If, on the other hand, the
dead band width is not exceeded within the time RET_FAC*1/CRIT_FRQ,
the value is reduced by 0.1.
CRIT_FRQ specifies the critical frequency at which a signal component is
detected as noise. It is limited upwards and downwards as follows:
0.01 CRIT_FRQ 1/(3*CYCLE) where CYCLE is the sampling time in
seconds.
The RET_FAC parameter specifies the multiple of 1/CRIT_FRQ following
which the dead band width is reduced again.
The adaptation logic only operates when the input variable without a noise
component is close to zero.
OUTV
1 4
DB_W L_LM DB_W H_LM
–DB_W IDTH
OUTV
2 4
t
1 3
INV
DB_W H_LM
2 4 DB_W IDTH
DB_W L_LM
–DB_W L_LM t
–DB_W IDTH
–DB_W H_LM 1 3
Input Parameters The following table shows the data type and structure of the input parameters
of A_DEAD_B.
Output Parameters The following table shows the data type and structure of the output
parameters A_DEAD_B.
Complete Restart During a complete restart, OUTV is set to 0.0 and the effective dead band
width is set so that DB_WIDTH = DB_WL_LM.
Block-Internal The values of the input parameters are not restricted in the block; the
Limits parameters are not checked.
Example If the adaptation is turned on due to noise during startup and if a stable dead
band width is established after a certain time, the adaptation can be turned
off. The dead band width set by the adaptive function is retained until there is
a complete restart.
Application The block adapts the range of values of the analog I/Os to the internal
representation of the modular controller; it can, for example, be called in the
process variable branch.
Block Diagram
CRP_IN CRP_IN
INV_PER OUTV
FACTOR CRP_IN
OFFSET
START_ON
STARTVAL
The floating-point value can be adapted using a scaling factor and an offset.
The output is obtained as follows:
OUTV = INV_PER * 100/27648 * FACTOR + OFFSET
During installation, testing or if problems occur in the periphery, it is possible
to change to a startup value. If START_ON = TRUE is set, the value in
STARTVAL is output at the OUTV output.
Note
There is no check for positive/negative overflow.
Input Parameters The following table shows the data type and structure of the input parameters
of CRP_IN.
Output Parameters The following table shows the data type and structure of the output
parameters CRP_IN.
Complete Restart The block does not have a complete restart routine.
Normal Operation The block has no modes other than normal operation.
Block-Internal The values of the input parameters are not restricted in the block; the
Limits parameters are not checked.
Application The block adapts a floating-point value of the modular controller to the
peripheral format.
Block Diagram
CRP_OUT
CRP_OUT
INV OUTV_PER
FACTOR
CRP_OUT
OFFSET
The floating-point value can be adapted using a scaling factor and an offset.
The output is calculated as follows:
OUTV_PER = (INV * FACTOR + OFFSET) * 27648/100
Note
There is no check for positive/negative overflow.
Input Parameters The following table shows the data type and structure of the input parameters
of CRP_OUT.
Output Parameters The following table shows the data type and structure of the output
parameters CRP_OUT.
Complete Restart The block does not have a complete restart routine.
Normal Operation The block has no modes other than normal operation.
Block-Internal The values of the input parameters are not restricted in the block; the
Limits parameters are not checked.
Application This block can be used in ratio controllers when the individual components
have different distances to travel before they are brought together.
Block Diagram
DEAD_T
INV OUTV
DB_NBR
DEAD_TM
TRACK
COM_RST
CYCLE
Functional The block delays the output of an input value by a selectable time (dead
Description time). The input values are buffered in a shared data block. The maximum
dead time depends on the length of this data block. The data in the shared
data block DB_NBR are processed in the same way as in a ring buffer.
The location indicated by the read/write pointer is read and output to OUTV.
Following this, INV is written to the same memory location. The memory
location index for the read/write pointer is incremented by 1 each time the
block is executed. When it reaches n, it returns to 0.
If the dead time DEAD_TM is specified and with a fixed sampling time
CYCLE, the data block must allow
DEAD_TM
CYCLE
DEAD_TM
DB length (in bytes) u= 4
CYCLE
Note
The block does not check whether or not a shared DB with the number
DB_NBR really exists nor whether the parameters DEAD_TM (dead time)
and CYCLE (sampling time) match the length of the data block. If the
parameter assignment is incorrect, the CPU changes to STOP with an
internal system error.
Input Parameters The following table shows the data type and structure of the input parameters
of DEAD_T.
Output Parameters The following table shows the data type and structure of the output
parameters DEAD_T.
Shared Data Block The following table shows the data type and Parameters of the shared data
DB_NBR block.
Complete Restart During a complete restart, all the saved input values are deleted and OUTV =
0.0 is output.
Normal Operation The input values are output delayed by the dead time. Online changes to the
dead time setting can cause step changes in the output value.
S Tracking
If tracking is turned on (TRACK = TRUE), the input value is transferred
to OUTV without any delay. The buffering of the input values is not
interrupted so that when tracking is turned off, the input values can still
be output after the set dead time. If TRACK = FALSE, OUTV jumps to
INV[DEAD_TM].
Block-Internal The values of the input parameters are not restricted in the block; the
Limits parameters are not checked.
Application If the process variable is affected by noise and the controller is optimally set,
the noise will also affect the controller output. Due to the high switching
frequency (step controller), this increases wear and tear on the actuator.
Suppressing the noise prevents oscillation of the controller output.. When the
dead band is used to form the error signal, the offset DEADB_O must be set
to 0.0.
Block Diagram
DEADBAND
INV OUTV
DEADB_W
DEADB_O
Functional The DEADBAND block suppresses small fluctuations in the input variable
Description INV around a specified zero point. Outside this dead band, the output
variable OUTV rises proportionally to the input variable. The block operates
according to the following function:
OUTV = INV + DEADB_W – DEADB_O
when INV < DEADB_O – DEADB_W
OUTV = 0.0 when DEADB_O – DEADB_W ≤ INV
and INV ≤ DEADB_O + DEADB_W
OUTV = INV – DEADB_W – DEADB_O
when INV > DEADB_O + DEADB_W
The signal is falsified by the amount of the value DEADB_W. The mid point
of the dead band is specified by DEADB_O.
OUTV
DEADB_O
INV
DEADB_W
The dead band width DEADB_W and dead band offset DEADB_O can be
selected.
Input Parameters The following table shows the data type and structure of the input parameters
of DEADBAND.
Output Parameters The following table shows the data type and structure of the output
parameters DEADBAND.
Normal Operation The block has no modes other than normal operation.
Block-Internal The values of the input parameters are not restricted in the block; the
Limits parameters are not checked. The dead band width can only have positive
values.
Example Figure 2-10 shows the suppression of noise using the offset.
INV
OUTV
DEADB_W
INV(t)
t
DEADB_O
t
OUTV(t)
Application Process variables are differentiated dynamically. This means, for example,
that the speed can be calculated from the distance traveled. The differentiator
can be used for feedforward control, as a precontroller and to configure a
controller.
Block Diagram
D IF
INV OUTV
TD
TM_LAG
COM_RST
CYCLE
Functional The block differentiates the input value over time and filters the signal with a
Description 1st order lag.
Input Parameters The following table shows the data type and structure of the input parameters
of DIF.
Output Parameters The following table shows the data type and structure of the output
parameters DIF.
Complete Restart/ During a complete restart, all the signal outputs are set to 0. Internally, the
Restart differentiator is assigned the current input value INV. The transition to
normal operation therefore does not cause any step change if the input
variable remains the same.
Normal Operation During differentiation, the block operates according to the following transfer
function:
in the Laplace range: OUTV(s) / INV(s) = TD / (1+TM_LAG*s)
where s is the Laplace variable
The time response of the differentiator is specified by the derivative time TD
and the time lag TM_LAG. The corresponding step response is illustrated in
the following diagram.
Step Response Figures 2-12 and 2-13 show the step response of DIF (with and without lag).
INV, OUTV
TD
OUTV(t) = INV 0 * e – t/TM_LAG
TM_LAG
TD
* INV0
TM _LA G INV(t)
OUTV(t)
t
TM_LAG
If the value assigned for TM_LAG is less than or equal to CYCLE/2, the
differentiator works without time lag. An input step change is applied to the
output with the factor TD/CYCLE. After one cycle, the output returns to 0.0
again.
INV, OUTV
TD
* INV0
CYCLE INV(t)
OUTV(t)
t
CYCLE
Block-Internal The derivative time is limited downwards to the sampling time. The time lag
Limits is limited downwards to half the sampling time.
The values of the other input parameters are not restricted in the block; the
parameters are not checked.
Application The block is used to form and monitor the error signal.
Block Diagram
ERR_MON
ER_LM QER_LM
ER_LMTD QER_LMTD
SP ER
PV
SP_DIF
TM_DELAY
TM_RAMP
COM_RST
CYCLE
Functional The block calculates the error signal ER = SP – PV and monitors it for
Description selectable limits. If there is a change in the setpoint greater than SP_DIF, the
activation of the limit value signal ER_LM is suppressed for a selectable
time (TM_DELAY+TM_RAMP); during this time the higher limit value
ER_LMTD of ER is monitored. If ER_LMTD is exceeded, QER_LMTD =
TRUE is output. Once the delay time has expired, ER_LMTD changes to
ER_LM according to a ramp function. The on delay is started by a setpoint
change. The slope of the ramp can be selected with the TM_RAMP
parameter.
SP
PV
SP
PV
t
Time delay
ER
ÏÏÏÏÏÏÏ
ÎÎÎÎÎ
Ramp function
ER_LMTD
ÏÏÏÏÏÏÏ
ÎÎÎÎÎ
ÎÎÎÎÎ
ER_LM
ÏÏÏÏÏÏÏ
ÎÎÎÎÎ
ÏÏÏÏÏÏÏ
ÎÎÎÎÎ
ÏÏÏÏÏÏÏ
ÎÎÎÎÎ
ÏÏÏÏÏÏÏ
t
–ER_LM
–ER_LMTD ÎÎÎÎÎ
ÏÏÏÏÏÏÏ
TM_DELAY TM_RAMP
QER_LMTD
QER_LM
Input Parameters The following table shows the data type and structure of the input parameters
of ERR_MON.
Output Parameters The following table shows the data type and structure of the output
parameters ERR_MON.
Complete Restart During a complete restart, the QER_LM and QER_LMTD signals and the
error signal output ER are reset.
Normal Operation The block has no modes other than normal operation.
Block-Internal The values of the input parameters are not restricted in the block; the
Limits parameters are not checked.
Application Process variables are integrated dynamically. This means, for example, that
the distance traveled is calculated from the speed. The integrator can be used
to configure a controller.
Block Diagram
IN T E G
INV OUTV
H_LM QH_LM
L_LM QL_LM
TI
DF_OUTV
HOLD
DFOUT_ON
COM_RST
CYCLE
Functional The block integrates the input variable over time and restricts the integral to
Description a selectable upper and lower limit. The limit of the output variable is
indicated by signal bits.
Input Parameters The following table shows the data type and structure of the input parameters
of INTEG.
Output Parameters The following table shows the data type and structure of the output
parameters INTEG.
Complete Restart/ During a complete restart, the OUTV output is reset to 0.0. If DFOUT_ON =
Restart TRUE is set DF_OUTV is output. The limiting of the output remains
effective during a complete restart and the limit signal bits are also effective.
When the controller changes to normal operation, the block integrates
starting at OUTV.
If you want the integrator to start at a particular operating point when a
complete start is executed, the operating point must be entered at the input
DF_OUTV. When the block is called during the complete restart routine,
DFOUT_ON = TRUE must be set and then reset to DFOUT_ON = FALSE at
the cyclic interrupt priority level.
Normal Operation In addition to normal operation, the block has the following modes:
S Integration
When integrating, the block operates according to the following transfer
function:
in the Laplace range:
OUTV(s) / INV(s) = 1 / (TIs)
where s is the Laplace variable
The time response of the integrator is specified by the reset time TI. The
corresponding step response is illustrated in the following diagram.
INV, OUTV
1
OUTV(t) = INV0 * t
TI
OUTV(t)
INV0 INV(t)
t
TI
where : TI: Reset time
INV0: Input step change
t: Time
INV: Input variable
OUTV: Output variable
The output and the integrator buffer are restricted to the selectable limit
values H_LM and L_LM. If the output is within the limits, this is indicated
by the signal bits QH_LM and QL_LM.
S Integrator Hold
If HOLD is set to TRUE, the integrator remains at its current output value
OUTV. When HOLD is reset to FALSE, the integrator continues to integrate
starting at the current output value OUTV.
The values of the other input parameters are not restricted in the block; the
parameters are not checked.
DFOUT_ON, HOL D
TRUE
DFOUT_ON
FALSE t
TRUE
HOLD
FALSE t
INV, OUTV
H_LM
OUTV(t)
DF_OUTV (t)
INV(t)
t
TI
Block Diagram
LA G 1S T
INV OUTV
TM_LAG
DF_OUTV
TRACK
DFOUT_ON
COM_RST
CYCLE
Functional The block filters the input variable with a 1st order time lag. The time lag
Description can be selected.
Input Parameters The following table shows the data type and structure of the input parameters
of LAG1ST.
Output Parameters The following table shows the data type and structure of the output
parameters LAG1ST.
Complete Restart/ During a complete restart, the output OUTV is reset to 0.0. If DFOUT_ON =
Restart TRUE is set, DF_OUTV is output. When the controller changes to normal
operation, the block continues to operate starting from OUTV.
Normal Operation Apart from normal operation, the block has the following modes:
S Filtering
When filtering, the block operates according to the following transfer
function:
in the Laplace range: OUTV(s) / INV(s) = 1 / (1+TM_LAGs)
where s is the Laplace variable
The time response of the lag element is specified by the time lag TM_LAG.
The corresponding step response is shown in the following figure.
INV, OUTV
t
OUTV(t) =INV0 ( 1 – e TM_LAG )
INV(t)
INV0
OUTV(t)
t
TM_LAG
S Tracking
If TRACK = TRUE, the input value INV is switched to the output OUTV.
Block-Internal The time lag is limited downwards to half the sampling time.
Limits
The values of the other input parameters are not restricted in the block; the
parameters are not checked.
DFOUT_ON,TRACK
TRUE
DFOUT_ON
FALSE t
TRUE
TRACK
FALSE t
INV, OUTV
INV(t)
OUTV(t)
DF_OUTVV(t)
Application The block is used to simulate system components for precontrollers and
two-loop controllers.
Block Diagram
LAG2ND
INV OUTV
TM_CONST
DAM_COEF
TRANCOEF
DF_OUTV
DFOUT_ON
TRACK
COM_RST
CYCLE
Block Diagram Figure 2-23 shows the block diagram of the LAG2ND.
1 TRANCOEF
TM_CONST TM_CONST
INF OUTV
X
1 2*DAM_COEF
TRANCOEF TRANCOEF
X
Step Response
_ DAM_COEF
TRANCOEF t 1 – DAM_COEF2
TM_CONST
OUTV(t) = TRANCOEF + 2 e sin( t – phi )
1 – DAM_COEF TM_CONST
O UTV
IN V
1 – DAM_COEF 2
tan phi =
DAM_COEF
where:
OUTV(t): Output variable
INV(t): Input variable
OUTV(t) TRANCOEF: Transfer coefficient
TRANCOEF TM_LAG: Time lag constant
DAM_COEF: Damping coefficient
phi: Supplementary angle
INV(t)
1
Input Parameters The following table shows the data type and structure of the input parameters
of LAG2ND.
Output Parameters The following table shows the data type and structure of the output
parameters LAG2ND.
Complete Restart During a complete restart, output OUTV is set to 0.0. If DFOUT_ON =
TRUE, then DF_OUTV is output.
Normal Operation Apart from normal operation, the block has the following modes:
S Tracking
If TRACK = TRUE is set, then OUTV = INV; the internal historical values
are set to INV.
S Default at the Output
If DFOUT_ON = TRUE is set, then DF_OUTV is output, the internal
historical values are set to DF_OUTV. DFOUT_ON has higher priority than
TRACK.
Block-Internal The time constant TM_CONST is limited downwards to half the sampling
Limits time.
The values of the other input parameters are not restricted in the block; the
parameters are not checked.
Application Illegal or dangerous states can occur in a system if process values (for
example, motor speed, temperature or pressure) exceed or fall below critical
values. Such limit violations must be detected and signaled to allow an
appropriate reaction.
Block Diagram
LIMALARM
H_LM_ALM QH_LMALM
H_LM_W RN QH_LMW RN
L_LM_W RN QL_LMW RN
L_LM_ALM QL_LMALM
INV
HYS
COM_RST
Functional Four limit values can be selected for the input variable INV. If one of these
Description limits is reached and exceeded, a limit signal is output. A hysteresis can be
set for the off threshold.
INV
HYS
H_LM_ALM
H_LM_WRN
INV(t)
L_LM_W RN
L_LM_ALM
t
QH_LMALM
QH_LMWRN
QL_LMW RN
QL_LMALM
Input Parameters The following table shows the data type and structure of the input parameters
of LIMALARM.
Output Parameters The following table shows the data type and structure of the output
parameters LIMALARM.
Complete Restart/ During a complete restart, all the signal outputs are set to FALSE.
Restart
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Application If the parameters are set dynamically (for example setpoints calculated from
process variables) these can be set to values that are not permitted for the
process. With LIMITER, you can keep values within the permitted range.
Block Diagram
LIMITER
INV OUTV
H_LM QH_LM
L_LM QL_LM
COM_RST
Functional The block restricts the output variable OUTV to a selectable high and low
Description limit H_LM and L_LM when the input variable INV is outside these limits.
The limits of OUTV are signaled via outputs QH_LM and QL_LM.
INV
OUTV INV(t)
H_LM
OUTV(t)
0
t
L_LM
Q L_ L M
Q H _LM
Input Parameters The following table shows the data type and structure of the input parameters
of LIMITER.
Output Parameters The following table shows the data type and structure of the output
parameters LIMITER.
Complete Restart/ During a complete restart, all signal outputs are set to FALSE; 0.0 is output
Restart at OUTV.
The block can only operate correctly when: L_LM < H_LM.
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Application The block is used to structure a continuous PID controller. It contains the
manipulated value processing of the controller.
Block Diagram
LM N G E N _C
C
MAN LMN
C
LMN_HLM QLMN_HLM
LMN_LLM QLMN_LLM
LMN_URLM LMNG_PID
LMN_DRLM
DF_OUTV
MAN_ON
MANGN_ON
MANUP
MANDN
LMNRC_ON
DFOUT_ON
COM_RST
CYCLE
PID_LMNG
Functional The block includes the manual-automatic switchover. In the manual mode,
Description you can specify an absolute value or increase or reduce the value with
switches. The manipulated value and the rate of change of the manipulated
value can be restricted to selectable limits.
The block is always used in conjunction with the PID algorithm block.
PID LMNGEN_C
ER LMN
C
PID_LMNG LMNG_PID
LMNG_PID PID_LMNG
While the PID algorithm is located in a cyclic interrupt priority class, with a
cycle time adapted to the dominant system time constant, the LMNGEN_C
block, that influences the actuator, can be located in a faster cyclic interrupt
priority class to allow manual interventions. The block is connected using the
structured input-output parameters PID_LMNG and LMNG_PID.
Input Parameters The following table shows the data type and structure of the input parameters
of LMNGEN_C.
Output Parameters The following table shows the data type and structure of the output
parameters LMNGEN_C.
Complete Restart/ During a complete restart, the default value DF_OUTV is switched to the
Restart LMN output regardless of the default bit DFOUT_ON. The limitation of the
output and the limit signal bits are also effective in a complete restart. When
the controller changes to normal operation, the block continues to operate
starting with DF_OUTV.
Normal Operation Apart from normal operation, the block has the following modes:
Figure 2-31 Block Diagram Manipulated Value Processing of the Continuous PID Controller
S Automatic Mode
If no other mode is selected, the value calculated by the PID algorithm is
transferred to manipulated value processing. The switchover to the automatic
mode does not cause any sudden change if the manipulated value rate of
change function is activated (LMNRC_ON = TRUE).
S Manual Mode
Using the MAN_ON switch, you can switch over to manual operation and
interrupt the control loop. If MANGN_ON = TRUE, you can increase or
reduce the manipulated value starting from the current value using the
switches MANUP and MANDN within the limits LMN_HLM and
LMN_LLM. The rate of change depends on the limits:
During the first 3 seconds after setting MANUP or MANDN:
dLMN/dt = (LMN_HLM – LMN_LLM) / 100 s
then: dLMN/dt = (LMN_HLM – LMN_LLM) / 10 s
If MANGN_ON = FALSE and MAN_ON = TRUE, the input value MAN is
switched through as the manipulated value.
The upper and lower limits of the manipulated value must be applied to
inputs LMN_HLM and LMN_LLM. The rate of change of the manipulated
value can also be limited. The up and down rate of change limits or the
manipulated value are set at inputs LMN_URLM and LMN_DRLM and
activated with the switch LMNRC_ON. The manipulated value appears at
the LMN output. The limiting of the manipulated value by the LMN_HLM
and LMN_LLM limits is signaled by the bits QLMN_HLM and
QLMN_LLM.
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
LMNOP_ON
(”PG: ”) LMN_OP
1 (TRUE)
(LMN)
0 (FALSE)
(”Controller: ”) MP1
Figure 2-32 Intervention in the Manipulated Value Branch Using the Startup and Test
Tool
The loop monitor has a field labeled “manipulated value”. Here, in the upper
field (”Controller: ”), the manipulated value currently applied to measuring
point MP1 is displayed. In the field below (”PG: ”), you can set the
parameter LMN_OP.
Switching over to If the switch in the Startup and Test tool is set to “PG: ”, the switching signal
Manual of the structure switch LMNOP_ON is set to TRUE in the controller FB and
Manipulation Value LMN_OP is switched through to the manipulated value LMN.
with the Startup
If the rate of change limit LMN_ROC is activated in the manipulated
and Test Tool
variable branch , it is possible to switch between “PG: ” and “Controller: ”
without causing any sudden change. The value to which the manipulated
variable switches back (MP1) can be seen in the “Controller: ” display field
of the loop monitor. LMN then returns to this value at the rate of change set
at LMN_ROC.
These interventions only affect the process after you transfer them to the
programmable controller by clicking the “Send” button in the loop monitor.
The parameters LMNOP_ON, LMN_OP, and MP1 are static variables and
are not available as input/output parameters for the block. The parameters
should not be connected and should only be used and monitored with the
Startup and Test tool.
Application The block is used to structure a PID step controller for actuators with an
integral component, (for example motor-driven valves). It contains the
manipulated value processing of the controller. The step controller can
operate both with and without a position feedback signal.
Block Diagram
LM N G E N _S
S
MAN LMN
S
LMN_HLM QLMNUP
LMN_LL M QLMNDN
LMNR_IN QLMN_HLM
PULSE_TM QLMN_LLM
BREAK_TM LMNG_PID
MTR_TM
MAN_ON
MANGN_ON
MANUP
MANDN
LMNR_ON
LMNR_HS
LMNR_LS
LMN_ON
LMNUP
LMNDN
COM_RST
CYCLE
PID_LMNG
PID LMNGEN_S
ER QLMNUP
S QLMNDN
PID_LMNG LMNG_PID
LMNG_PID PID_LMNG
While the PID algorithm is located in a cyclic interrupt priority class, with a
cycle time adapted to the dominant system time constant, the LMNGEN_S
block, that influences the actuator, can be located in a faster cyclic interrupt
priority class to allow manual interventions. The block is connected using the
structured input-output parameters PID_LMNG and LMNG_PID.
Input Parameters The following table shows the data type and structure of the input parameters
of LMNGEN_S.
Output Parameters The following table shows the data type and structure of the output
parameters LMNGEN_S.
Complete Restart/ During a complete restart, all signal outputs are set to zero.
Restart
Normal Operation Apart from normal operation, the block also has the following modes:
In the mode “step controller without position feedback signal”, the controller
has no information about the value of the valve position, it is therefore point-
less to specify a manual value. In step controllers without position feedback
signal, there is no “manipulated value manual mode”.
Warning
! If there are no limit position signals, the controller cannot recognize a valve
limit stop and it is, for example, possible that the controller outputs signals
to open the valve although it is already fully open.
If there are no limit position signals, the inputs LMNR_HS and LMNR_LS
must be set to FALSE.
Manual value
processing
LMNR_HS
MANGN_ON
MAN LMNR_LS
MAN_GEN 0 LMNUP
1 QLMN_HLM LMNDN LMNS_ON
MAN_ON QLMN_HLM
MANUP LMN
MANDN MP1
1
0
LMNLIMIT THREE_ST 1 PULSEOUT
0 AND QLMNUP
0 1
PID_LMNG 0 1 –
1
0 AND QLMNDN
LMN_HLM
LMN_LLM MTR_TM 0 PULSE_TM
PID_OUTV LMN_OP 1
BREAK_TM
LMNUP_OP
LMNOP_ON
LMNSOPON
LMNDN_OP
LMNR_IN
LMNR_HS
LMNR_LS
LMNUP
QLMNUP
LMNDN
LMN_ON QLMNDN
100.0 0.0
THREE_ST 1 PULSEOUT 1 0
0 AND
PID_LMNG. 0
Simulation of the
1 position feedback signal LMNRS_ON
PID_OUTV AND +
– 0 INT LMNLIMIT
0 1 1
MTR_TM 0.0
0 LMNR_SIM
LMNUP_OP PULSE_TM, 1 0
BREAK_TM LMNRS_ON 100.0,
–100.0 0.0
LMNRSVAL 0.0
LMNDN_OP LMNSOPON OR 1/MTR_TM x
LMNLIMIT INT
–
100.0,
PID_LMNG. –100.0 0.0 1
PID_SCTR 0
Warning
! The position feedback signal is only simulated. It does not necessarily
correspond to the real position feedback signal of the final control element.
The PID process identification function of the configuration tool requires the
position feedback signal as an input variable.
If a real position feedback signal exists, it should be used.
Block-Internal No values are limited internally in the block; the parameters are not checked.
Limits
Influencing the Manipulated Value with the Startup and Test Tool
LMN Display and The Startup and Test tool has its own interface to the LMNGEN_S block. It
Setting in the Loop is therefore always possible to interrupt the manipulated variable branch
Monitor when working on a programming device or PC and to set your own
manipulated values (Figure 2-37).
LMNS_ON
LMNOP_ON
LMNUP
LMN_OP LMNDN
MP1
LMNUP_OP
LMNDN_OP
LMNSOPON
LMNR
Figure 2-37 Interventions in the Manipulated Value Branch Using the Startup and
Test Tool
The loop monitor has a field labeled “manipulated value”. Here, in the upper
field (”Controller:”), the manipulated value currently applied to measuring
point MP1 is displayed. In the field below (”PG:”), you can set the parameter
LMN_OP.
Switching over to If the switch in the Startup and Test tool is set to “PG: ”, the switching signal
Manual of the structure switch LMNOP_ON is set to TRUE in the controller FB and
Manipulated Value LMN_OP is switched through to the manipulated value LMN.
with the Startup
If the rate of change limit LMN_ROC is activated in the manipulated
and Test Tool
variable branch , it is possible to switch between “PG: ” and “Controller: ”
without causing any sudden change. The value to which the manipulated
variable switches back (MP1) can be seen in the “Controller: ” display field
of the loop monitor. LMN then returns to this value at the rate of change set
at LMN_ROC.
If the switch “Controller:/PG: ” in the manipulated values field is set to
“PG: ”, the parameter LMNSOPON = TRUE is set and the actuating signal
outputs can be controlled with the parameters LMNUP_OP (up) or
LMNDN_OP (down) in the loop monitor. This applies to a step controller
with or without position feedback signal.
These interventions only affect the process after you transfer them to the
programmable controller by clicking the “Send” button in the loop monitor.
The parameters LMNOP_ON, LMN_OP, MP1, LMNSOPON, LMNUP_OP
and LMNDN_OP are static variables and are not available as input/output
parameters for the block. The parameters should not be connected and should
only be used and monitored with the Startup and Test tool.
Application When calling a large number of control loops with different sampling times,
and with control loops with large sampling times, the range of the priority
classes for cyclic interrupts is not adequate. Using the loop scheduler
LP_SCHED, several control loops with different sampling times can be
called at equal intervals in one cyclic interrupt priority class.
The use of the loop scheduler is not obligatory. The controller FBs can also
be called directly by the OB without the scheduler function.
Block Diagram
LP_SCHED
DB_NBR
TM_BASE
COM_RST
Functional The scheduling of several controllers in one cyclic interrupt priority class is
Description implemented in the LP_SCHED function. The block must be called before
all the control loops. The data for the individual block calls are stored in a
shared data block (DB_LOOP).
Shared DB
”DB_LOOP”
FC
LP_SCHED
The LP_SCHED block processes the shared data block and sets the ENABLE
bits in keeping with the sampling times of the control loops. It supports the
time base of the cyclic interrupt priority class and calls the control loops
according to their different sampling times. The individual loops in this
priority class are called and processed according to their sampling time. After
the block call, the ENABLE bit must be reset. The block calls and the
resetting of the ENABLE bits must be programmed.
The calls for individual control loops can be disabled manually. Individual
loops can also be reset (complete restart).
Note
! The block does not check whether or not a shared DB with the number
DB_NBR exists or whether the “highest loop number” parameter GLP_NBR
fits in the DB length. If the parameter assignment is incorrect, the CPU
changes to STOP with an internal system error.
Input Parameters The following table shows the data type and structure of the input parameters
of LP_SCHED.
Output Parameters The following table shows the data type and structure of the output
parameters LP_SCHED.
Table 2-34
Shared Data Block The following table shows the shared data block DP_LOOP for the controller
“DP_LOOP” calls.
Table 2-35
Calling a Control The LP_SCHED function is integrated in the call strategy of the CPU using
Loop Using three input parameters. The time base of the cyclic interrupt class is specified
LP_SCHED at the TM_BASE input. The control loops are called using a conditional
block call in one cyclic interrupt class (for example OB35) and the ENABLE
bits are queried in the shared data block.
If the call is made at the complete restart level, the input COM_RST = TRUE
is set. This call must be reset to FALSE in the cyclic interrupt class. The
shared data block (Table 2-35) with the time data for the control loops in the
cyclic interrupt class is assigned using the input parameter DB_NBR.
Programming a The loop scheduler must be programmed without the support of the Startup
Control Loop Call and Test tool.
(Shared DB)
The data block (DB_LOOP) contains both a parameter for the total number
of control loops to be processed in the cyclic interrupt class (a maximum of
256) and a parameter to indicate the control loop currently being processed,
as follows:
GLP_NBR Highest control loop number
ALP_NBR Number of the control loop being processed in the cycle
The number of each control loop is decided by the position of its call in the
sequence of entries in the DB.
The call data of the individual control loops are in structured form in the
LOOP_DAT field. If you want to add control loops, the field length of
LOOP_DAT must be adapted by modifying the ARRAY data type in the
declaration view. With, for example 10 loops, you would enter
ARRAY[1..10]. You must also adapt the parameter GLP_NBR in the data
view. It must never be higher than the field length.
The parameters COM_RST and CYCLE must be linked to the corresponding
input parameters of the FB belonging to the called control loop. This
connection must be programmed by the user. If the ENABLE parameter is
set, the corresponding control loop will be called. After the controller has
been called, the ENABLE bit must be reset. The user must program the
conditional controller call and the ENABLE bit reset.
Using the parameters MAN_CYC / MAN_DIS / MAN_CRST that can be set
manually, you can decide whether or not a control loop is called. You can
change these calls online (in other words during operation) as long as you
only overwrite parameters and do not regenerate the entire DB. The meaning
of the parameters is as follows:
MAN_CYC Sampling time of the corresponding controller (rounded up to
a whole multiple of TM_BASE * GLP_NBR in CYCLE).
MAN_DIS Disable the controller call.
MAN_CRST Complete restart for the controller.
Processing Calls Each loop is processed according to the parameters set in the DB if the
ENABLE signal of the controller call data is set.
The data block is worked through from top to bottom. Per cycle, the loop
scheduler moves on one loop number (ALP_NBR) further in the order in
which they are entered in the DB. The internal counter ILP_COU is then
decremented by one. If ILP_COU = 0 is set, the loop scheduler sets the
ENABLE bit of the corresponding loop. The ENABLE bit must be reset after
the call and this must be programmed by the user.
When CYCLE is processed, the parameter MAN_CYC is transferred:
CYCLE = GV (MAN_CYC), GV = whole multiple
Instance DB
Controller [1]
PID_C/PID_S
COM_RST
CYCLE
Conditional
block call
Figure 2-39 Principle of the Controller Call Using the Loop Scheduler LP_SCHED
Note
If you want to insert or delete a control loop and regenerate the entire DB
without a complete restart of the loop scheduler, the internal loop counters
(ILP_COU[n]) and the parameter for the current loop number ALP_NBR
must be set to zero.
Conditions for To ensure that the intervals between the calls of a particular controller remain
Calling a Loop constant and to spread the load on the CPU, only one control loop can be
With LP_SCHED processed per time base unit of the cyclic interrupt class. When you assign
the sampling times MAN_CYC, remember the following conditions with
respect to the time base (TM_BASE):
S The processing times of the individual loops must be shorter than the time
base (TM_BASE) of the cyclic interrupt class.
S The sampling time of a control loop (MAN_CYC) must be a whole
multiple (GV) of the product of the time base and number of controllers
to be processed (GLP_NBR):
MAN_CYC = GV (TM_BASE GLP_NBR).
Example of Loop The following example illustrates the sequence of calls of four loops in one
Scheduling cyclic interrupt class (Figure 2-40). Only one loop is processed per time base
unit. The sequence in which the loops are called and with it the time
displacement (TD1 to TD5) result from the sequence of the call data within
the shared data block.
ÇÉ ÉÉ É ÇÉ
ÇÉ ÉÉ É ÇÉ
ÇÉ ÉÉ É ÇÉ
t
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Application With NONLIN, the input value, for example a measured value from a
thermoelement, can be adapted using a selectable function.
Block Diagram
NONLIN
INV OUTV
DF_OUTV
DB_NBR
DFOUT_ON
TRACK
COM_RST
Functional The points of the function are stored in a shared data block. NONLIN assigns
Description the corresponding output value to the current input value from the function.
If the input value is lower than the value at point 0, the value is extrapolated
with the slope between points 0 and 1. If the value is higher than the value of
the last point (NBR_PTS), the slope between the points NBR_PTS–1/
NBR_PTS is used for the extrapolation. For the block to supply a feasible
result, the values of the points must have a strictly monotonous rising slope.
Using control inputs, a selected value or the input variable itself can be
output directly as the output variable.
OUTV
PI[4].OUTV
PI[3].OUTV
PI[2].OUTV
PI[1].OUTV
PI[0].OUTV
Note
The block does not check whether a shared DB with the number DB_NBR
really exists, or whether the parameter DB_NBR.NBR_PTS (number of
points) matches the length of the data block. If the parameters are set
incorrectly, the CPU changes to STOP with an internal system error.
Input Parameters The following table shows the data type and structure of the input parameters
of NONLIN.
Output Parameters The following table shows the data type and structure of the output
parameters NONLIN.
Shared Data Block The following table shows the data type and Parameter von DB_NBR
DB_NBR (default with 5 curve points).
Normal Operation In normal operation, the pair of points either side of the input value is found.
If the input value is below the value of point 0, the pair 0/1 is used and if the
input value is higher than the point NBR_PTS, the pair
(NBR_PTS–1)/NBR_PTS is used. The output value is then calculated
according to the following formula:
DB_NBR.PI[n+1].OUTV – DB_NBR.PI[n].OUTV
Slope =
DB_NBR.PI[n+1].INV – DB_NBR.PI[n].INV
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Application The value of a process variable supplied by a sensor is often in a range that is
not particularly suitable for the user (for example 0 to 10 V correspond to 0
to 1200 _C or 0 to 10 V correspond to 0 to 3000 rpm). By adapting the
setpoint or process variable, both variables can have the same range.
Block Diagram
NORM
OUTV
INV INV OUTV
IN_HVAL
OUTV
IN_LVAL
INV
OUT_HVAL
OUT_LVAL
Functional The block normalizes the input variable to form an output variable with a
Description different range of values. The normalization curve is defined by two points.
OUTV
OUT_HVAL
OUT_LVAL
IN_LVAL IN_HVAL
INV
Input Parameters The following table shows the data type and structure of the input parameters
of NORM.
Output Parameters The following table shows the data type and structure of the output
parameters NORM.
Normal Operation The input variable INV is converted to the output variable OUTV using the
normalization curve. The normalization curve is determined by the points
IN_HVAL, IN_LVAL, OUT_HVAL and OUT_LVAL.
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Block Diagram
OVERRIDE
MIN
OVERRIDE
MAX
PID1_ON QPID1
OVERRIDE
PID2_ON QPID2
MIN
OVR_MODE OVR_PID1
MAX
PID1_OVR OVR_PID2
PID2_OVR OVR_LMNG
LMNG_OVR
Functional Two PID controllers are connected to one actuator. The maximum
Description (OVR_MODE = FALSE) or minimum (OVR_MODE = TRUE) of the two
PID controllers is applied to the actuator. To do this, 2 PID blocks are
connected via the OVERRIDE block with one of the manipulated value
blocks LMNGEN_C or LMNGEN_S.
The truth table of the switches PID1_ON, PID2_ON and OVR_MOD is
shown below.
Which PID algorithm is active is indicated at the outputs QPID1 and QPID2.
Input Parameters The following table shows the data type and structure of the input parameters
of OVERRIDE.
Output Parameters The following table shows the data type and structure of the output
parameters OVERRIDE.
Normal Operation The block has no modes other than normal operation.
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
PID
OVERRIDE LMNGEN_C/S1)
LMNG_PID PID_LMNG
PID1_OVR
PID PID2_OVR OVR_LMNG PID_LMNG LMNG_PID
LMNG_PID PID_LMNG
Application The block is used in controller structures with parameter changeovers when
optimum parameters are required for different operating ranges.
Block Diagram
GAIN PARA_CTL
TI
TD PSET1_ON GAIN
PSET2_ON TI
GAIN
PSET3_ON TI TD
TD TM_LAG
PSET4_ON
PARA_SET
Functional Several controller parameters sets (GAIN, TI, TD and TM_LAG) can be
Description transferred to one PID controller.
With the switches PSET1_ON ... PSET4_ON, one of the four sets of
parameters can be applied to the outputs GAIN, TI, TD and TM_LAG.
if PSET1_ON = 1 then GAIN = PARA_SET[1].GAIN
TI = PARA_SET[1].TR
TD = PARA_SET[1].TD
TM_LAG = PARA_SET[1].TM_LAG
if PSET2_ON = 1 then GAIN = PARA_SET[2].GAIN
TI = PARA_SET[2].TR
TD = PARA_SET[2].TD
TM_LAG = PARA_SET[2].TM_LAG
if PSET3_ON = 1 then GAIN = PARA_SET[3].GAIN
TI = PARA_SET[3].TR
TD = PARA_SET[3].TD
TM_LAG = PARA_SET[3].TM_LAG
Input Parameters The following table shows the data type and structure of the input parameters
of PARA_CTL.
Output Parameters The following table shows the data type and structure of the output
parameters PARA_CTL.
Controller The following table shows the data type and parameters.
Parameter Sets
Table 2-44
Normal Operation The block has no modes other than normal operation.
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
ROC_L I M
GAIN
PARA_CTL PID LMNGEN_C
TI
Application The block contains the PID algorithm for creating the following controller
types:
S Continuous PID controller:
PID + LMNGEN_C
S PID pulse controller for proportional actuators:
PID + LMNGEN_C + PULSEGEN
S PID step controller for integrating actuators:
PID + LMNGEN_S
Block Diagram
P ID
ER LMN_P
PV LMN_I
GAIN LMN_D
TI PID_LMNG
I_ITLVAL
TD
TM_LAG
DISV
P_SEL
PFDB_SEL
DFDB_SEL
I_SEL
INT_HOLD
I_ITL_ON
D_SEL
I_SEL DISV_SEL
COM_RST
INT_HOLD
I_ITL_ ON CYCLE
D_SEL LMNG_PID
DFDB_SEL
Functional The block implements the PID algorithm. It is designed as a purely parallel
Description structure and functions solely as a positioning algorithm. The proportional,
integral and derivative actions can be activated or deactivated individually.
This allows P, PI, PD and PID controllers to be configured.
The calculation of the P and D actions can be located in the feedback path.
By moving the P and D actions to the feedback path, the controller causes no
sudden changes if disturbances are compensated at the same speed. It is not
normally necessary to use a setpoint integrator to avoid step changes in the
setpoint.
While the PID block is located in a cyclic interrupt priority class whose cycle
time is adapted to the dominant system time constant, the blocks for
processing the actuator signals (LMNGEN_C and LMNGEN_S) can be
located in a faster cyclic interrupt priority class.
Input Parameters The following table shows the data type and structure of the input parameters
of PID.
Output Parameters The following table shows the data type and structure of the output
parameters PID.
Complete Restart/ During a complete restart, all output and in/out parameters are set to zero.
Restart
Normal Operation Apart from normal operation, the block has the following modes:
S P Controller
Here, the D action is turned off. With the I action, the initialization value
I_ITLVAL can be used to specify an operating point (I_SEL = TRUE and
I_ITL_ON = TRUE). If the operating point is to be kept to a constant zero,
the I action can also be turned off.
Transfer Function
The error signal ER is multiplied by GAIN.
Step Response
ER, P ID_LMNG.PID_OUTV
ER(t)
t
where : PID_LMNG.
PID_OUTV(t) : Manipulated variable automatic mode
ER : Error signal
GAIN : Controller gain
t: Time
S PI Controller
Here, the D action is turned off.
Transfer Function
The error signal ER is multiplied and integrated. The transfer function in the
Laplace range is:
PID_LMNG.PID_OUTV(s) / ER(s) = GAIN (1 + 1 / (TIs))
where s is the Laplace variable
Step Response
ER, PID_LMNG.PID_OUTV
PID_LMNG.P ID_OUTV(t)
ER0 * GAIN
ER(t) * GAIN
ER0 * GAIN ER(t)
t
TI
1
PID_LMNG.P ID_OUTV(t) = GA IN * ER0 ( 1 + *t)
TI
where: PID_LMNG.
PID_OUTV(t) : Manipulated variable automatic mode
ER : Error signal
ER0 : Error signal step change
GAIN : Gain
TI : Reset time
t: Time
S PD Controller
Here, the I action is turned off.
Transfer Function
The error signal ER is multiplied and differentiated. The transfer function in
the Laplace range is:
PID_LMNG.PID_OUTV(s) / ER(s) = GAIN* (1 + TD*s / (1 + TM_LAG*s))
where s is the Laplace variable
Step Response
ER, PID_LMNG.PID_OUTV(t)
TD
GAIN * * E R0
TM_LAG
PID_LMNG.PID_OUTV(t)
t
TD
PID_LMNG.PID_OUTV (t) = GAIN * ER0 ( 1 + * e TM_LA G )
TM_LA G
where: PID_LMNG.
PID_OUTV (t) : Manipulated variable automatic mode
ER : Error signal
ER0 : Error signal step change
GAIN : Controller gain
TD : Derivative time
TM_LA G : Time lag
t: Time
S PID controller
P, I and D actions are activated.
Transfer Function
The error signal ER is multiplied, integrated and differentiated. The transfer
function in the Laplace range is:
PID_LMNG.PID_OUTV(s) / ER(s) = GAIN* (1 + 1 / (TI*s) + TD*s / (1 +
TM_LAG*s))
where s is the Laplace variable
Step Response
ER, PID_LMNG.PID_OUTV
PID_LMNG.PID_OUTV(t)
TD
GAIN * * ER0
TM_LAG
ER0 * GAIN
ER0 * GAIN
ER0 * GAIN ER(t)
t
TM_LAG
TI
1 TD t
PID_LMNG.PID_OUTV(t) = GAIN * ER0 ( 1 + *t+ * e TM_LAG )
TI TM_LAG
where : PID_LMNG.
PID_OUTV(t) : Manipulated variable automatic mode
ER : Error signal
ER0 : Error signal step change
GAIN : Controller gain
TI : Reset time
TD : Derivative time
TM_LAG : Time lag
t: Time
Block Diagram
LMNG_PID.LMN
PFDB_SEL
LMNG_PID.LMNR_ON P_SEL
LMNG_PID.ARWHL_ON 1 LMN_P
1
LMNG_PID.ARWLL_ON 0 0.0
LMNG_PID.MAN_ON 0
GAIN INT
LIMITER I_SEL
ER x 1
PID_LMNG.
0.0 + PID_OUTV
PV x x TI, INT_HOLD, LMNG_PID.LMN_HLM 0
IITL_ON, LMNG_PID.LMN_LLM LMN_I
–1 1
I_ITLVAL
x PID_LMNG.
0 PID_SCTR
1/TI
DFDB_SEL DIF
LMNG_PID.LMNR_ON
1
1
LMNG_PID.MAN_ON 0 0.0
LMNG_PID.LMN_HLM 0 LMN_D
TD, TM_LAG
LMNG_PID.LMN_LLM
D_SEL
DISV_SEL
0.0 0
DISV 1
P Action
The proportional action can be activated and deactivated with the P_SEL
switch. It can be included in the feedback path using the PFDB_SEL switch.
In this case, the process variable PV is used as the input for the P action. The
P action represents the product of the error signal ER (if the P action is in the
feedback path it is the process variable PV) and the proportional gain GAIN.
I Action
The integral action can be activated and deactivated with the I_SEL switch.
When it is deactivated, the I action and the internal memory of the integrator
are set to zero. The I action can be frozen with INT_HOLD. The reset time is
determined by the reset time constant TI. You can also assign your own value
for the integrator. The value at input I_ITLVAL is transferred to the
integrator via the I_ITL_ON switch. If the manipulated value is limited, the I
action remains at the old value (anti reset wind-up).
D Action
The D action can be activated and deactivated with the D_SEL switch. It can
be included in the feedback path using the DFDB_SEL switch. The input
value of the D action is then the negative process variable PV. The time
response is determined by the derivative action time TD. A first-order time
lag is integrated in the derivative unit. The time lag is entered at TM_LAG.
Particularly in fast systems when the D action is active, unacceptable
disturbance fluctuations can occur. In this case, the control quality can be
improved by the time lag integrated in the D action. Usually a small
TM_LAG is sufficient
Block-Internal The reset time is limited downwards to half the sampling time.
Limits
The derivative time is limited downwards to the sampling time.
The time lag is limited downwards to half the sampling time.
The values of the other input parameters are not limited in the block; the
parameters are not checked.
Application The block is used to structure a PID controller with pulse a output for
proportional actuators. This allows three-step and two-step controllers with
pulse duration modulation to be implemented.
Block Diagram
P U LS E G E N
INV QPOS_P
PER_TM QNEG_P
P_B_TM
RATIOFAC
STEP3_ON
ST2BI_ON
MAN_ON
POS_P_ON
NEG_P_ON
SYN_ON
COM_RST
CYCLE
Functional Using pulse duration modulation, the block transforms the input variable INV
Description ( = LMN of the PID controller) into a pulse train with a constant period
PER_TM. The period corresponds to the cycle time interval at which the
input variable is updated. The duration of a pulse per period is proportional
to the input variable. An input variable of 30% therefore means: a positive
pulse with a duration 0.3 * period, no pulse for 0.7 * period. The pulse
duration is recalculated at the beginning of every period.
Figure 2-56 illustrates pulse duration modulation.
INV 100
(LMN) 80
50
50
30
0 t
QPOS_P
1
0 t
CYCLE
PER_TM
Input Parameters The following table shows the data type and structure of the input parameters
of PULSEGEN.
Output Parameters The following table shows the data type and structure of the output
parameters PULSEGEN.
Complete Restart/ During a complete restart, all signal outputs are set to zero.
Restart
Accuracy of Pulse The implementation of this function in the CPU requires a decision about the
Generation current status of the binary signal n times at points in the cycle within a
period of the controller output. The higher the value of n, the more accurate
the pulse duration modulation.
While the continuous PID controller (PID–LMNGEN_C) is located in a slow
cyclic interrupt priority class whose cycle time is adapted to the dominant
system time constant, the PULSEGEN block must be located in a faster
cyclic interrupt priority class. The faster the cyclic interrupt priority class, the
greater the accuracy with which the manipulated value can be output. By
using a cyclic interrupt priority class that is 100 times faster, you can achieve
a resolution of 1% of the manipulated value range.
It is possible to synchronize the pulse output with the block that updates the
input variable INV (for example PID_C) automatically. This ensures that a
changing input variable is output as a pulse in the shortest possible time.
If INV has changed and if the block call is not in the first or in the last two
call cycles of a period, synchronization is performed. The pulse duration is
recalculated and in the next cycle, output starts with a new period.
The period PER_TM must correspond to the sampling time CYCLE of the
controller.
CYCLE of PID_C
Period start
ÇÇ
ÇÇ
ÇÇÇÇÇÇÇ
ÇÇÇ
ÇÇÇ 1 1 1 0 0 0 0 0 0 0 1
ÇÇÇ
1
ÇÇ
ÇÇÇÇ ÇÇ
1 1 1 1 1 1 0 0 1 1
ÇÇ
ÇÇ
ÇÇÇÇÇÇÇ
ÇÇÇ
ÇÇÇ ÇÇÇ
ÇÇÇÇÇÇ ÇÇ ....
t
PER_TM PER_TM
CYCLE of
PULSEGEN Synchronization of the No synchronization necessary
period start
PULSEGEN detects: INV has changed PULSEGEN detects: INV has changed
and the call is not in the first cycle or to 80.0 or 50.0 and the call is in the first
last two cycles of the period cycle or last two cycles of the period
Ç
Ç
Processing PULSEGEN Processing PULSEGEN in the first cycle or in the last two cycles of the period
Note
With the start of the new period after synchronization, the old value of INV
(in other words of LMN) is simulated more or less inaccurately by the pulse
signal.
Modes of the Depending on the parameter settings of the pulse generator, PID controllers
Controller with with three-step output or with bipolar or monopolar two-step output are
Pulse Output configured. The following table shows the switch combinations for the
possible modes.
Three-Step Control In the three-step control mode, three states can be generated for the actuator
signal, for example, depending on the actuator and process: more – off – less,
forwards – stop – backwards, heat – off – cool etc. Depending on the
requirements of the process to be controlled, the states of the binary output
signals QPOS_P and QNEG_P are assigned to the corresponding operating
states of the actuator. The table shows two examples.
Note
Small absolute values of the input variable LMN that would produce a pulse
duration less than P_B_TM are suppressed. For large input values that would
produce a pulse duration greater than PER_TM – P_B_TM, the pulse
duration is set to 100% or –100%.
The duration of the positive or negative pulses is calculated from the input
variable (in %) multiplied by the period:
Duration of the
pos. pulse On continuously
PER_TM
PER_TM – P_B_TM
P_B_TM
-100 %
100 %
Off continuously
Duration of the
neg. pulse
Asymmetrical With the ratio factor “RATIOFAC”, the ratio of the duration of negative
Three-Step Control pulses to positive pulses can be changed. In a thermal process, different time
constants for heating and cooling can be compensated.
If, with the same absolute value for the input variable |INV|, the pulse
duration at the negative pulse output must be shorter than the positive pulse,
a ratio factor less than 1 must be set (Figure 2-61):
pos. pulse > neg. pulse: RATIOFAC < 1
Duration of the
pos. pulse
PER_TM
PER_TM – P_B_TM
P_B_TM
-100 %
0.5 * P_B_TM
100 %
Duration of the
neg. pulse
Figure 2-61 Asymmetrical Curve of the Three-step Controller (Ratio Factor = 0.5)
If the opposite is required, so that with the same absolute value for the input
variable |INV|, the pulse duration at the positive pulse output is shorter than
the negative pulse, a ratio factor greater than 1 must be set:
pos. pulse < neg. pulse: RATIOFAC > 1
The ratio factor also influences the minimum pulse and minimum break
times. Mathematically, this means that with RATIOFAC < 1, the on threshold
for negative pulses is multiplied by the ratio factor and with RATIOFAC > 1
the on threshold for positive pulses is divided by the ratio factor.
Two-Step Control In a two-step control, only positive pulse output QPOS_P of PULSEGEN is
connected to the on/off actuator. Depending on the actuating range, LMN =
–100.0 ... 100.0 % or LMN = 0.0 % ... 100.0 %, the two-step controller has a
bipolar or monopolar actuating range.
In the monopolar mode, the input variable INV can only have values between
0.0 and 100%.
Off continuously
P_B_TM
PER_TM
PER_TM – P_B_TM
P_B_TM
0.0 % 100.0 %
On Off
QPOS_P TRUE FALSE
QNEG_P FALSE TRUE
Manual Mode in In the manual mode (MAN_ON = TRUE), the binary outputs of the
Two or Three-Step three-step or two-step controllers can be set by the signals POS_P_ON and
Control NEG_P_ON regardless of INV.
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Application The ramp soak is used mainly as a setpoint value generator for a controller
that sets different setpoints at different times while the process is running.
Block Diagram
RMP_SOAK
t DF_OUTV OUTV
DB_NBR QR_S_ACT
TM_SNBR NBR_ATMS
TM_CONT t RS_TM
DFOUT_ON T_TM
RMPSK_ON R_TM
HOLD
CONT_ON
CYC_ON
TUPDT_ON
COM_RST
CYCLE
Functional This block allows curves whose coordinates are stored in a global data block
Description to be executed. In each call cycle, values are output according to a time
schedule. The value is interpolated in the time slices between the
coordinates.
The following modes can be selected with control inputs:
S Ramp soak on
S Default output variable
S Hold processing
S Set time slice number and time to continue
S Repetition on (cyclic mode)
S Total time and total time remaining update on
OUTV
3 4
PI[3].OUTV
PI[4].OUTV
OUTV(t)
PI[1].OUTV 1 2
PI[2].OUTV
PI[5].OUTV 0 5 6
PI[6].OUTV t
PI[1].TMV PI[3].TMV PI[4].TMV PI[5].TMV PI[6].TMV
PI[0].TMV PI[2].TMV = 0 ms
Figure 2-65 Example of a Ramp Soak with Starting Point and 6 Coordinates
Note
The block does not check whether a shared DB with the number DB_NBR
exists or not and whether the parameter DB_NBR.NBR_PTS (number of
time slices) matches the DB length. If the parameter assignment is incorrect,
the CPU changes to STOP due to an internal system error.
Input Parameters The following table shows the data type and structure of the input parameters
of RMP_SOAK.
Output Parameters The following table shows the data type and structure of the output
parameters of RMP_SOAK.
The coordinates (points) and the number of points NBRPTS are stored in a
shared data block (DB_NBR). Output begins at point 0 and ends at point
NBR_PTS.
Table 2-51
Complete Restart/ During a complete restart, output OUTV is set to 0.0. If DFOUT_ON=TRUE
Restart is set, DF_OUTV is output. The time slices (0 to NBRPTS–1) between points
0 to NBRPTS are totaled and are available at T_TM. The output QR_S_ACT
is reset, the outputs NBR_ATMS and RS_TM are set to 0.
Normal Operation S The coordinate parameters NBR_PTS, PI[i].TMV and PI[i].OUTV are
stored in a shared data block.
S The parameter PI[i].TMV must be specified in the TIME format.
S The way in which the point values and time slice are counted is illustrated
in the following schematic:
OUTV PI[1].OUTV
Point 1 PI[1].TMV
Starting Point 2
point PI[2].OUTV
PI[0].OUTV
PI[0].TMV PI[2].TMV
PI[0].TMV PI[1].TMV PI[2].TMV
RS_TM
OUTV(t) + PI[n ) 1].OUTV– (PI[n ) 1].OUTV–PI[n].OUTV)
PI[n].TMV
Modes of the To influence the control inputs, the following states and modes of the ramp
Ramp Soak soak can be implemented:
1. Ramp soak on for one run
2. Default value at output of the ramp soak
3. Cyclic ramp soak mode on
4. Hold ramp soak
5. Time slice number and time to continue (the remaining slice time RS_TM
and the point number TM_SNBR are redefined)
6. Update total time and total time remaining
Modes When setting one of the modes, the values of the control inputs as shown in
the following table apply:
Mode RMPSK DFOUT RMP CONT CYC TUPDT Output Signal OUTV
_ON _ON _HOLD _ON _ON _ON
1. Ramp soak on TRUE FALSE FALSE FALSE OUTV(t)
Final value retained on
completion of processing.
2. Default output TRUE TRUE DF_OUTV
variable
3. Cyclic ramp soak TRUE FALSE FALSE TRUE OUTV(t)
mode on Automatic start when
completed
4. Hold ramp soak TRUE FALSE TRUE FALSE Current value of
OUTV(t) retained *)
5. Set time slice and TRUE FALSE TRUE TRUE OUTV (old) *)
ti tto continue
time ti
FALSE The ramp soak continues
with new values.
6. Update total time FALSE Does not affect OUTV
TRUE Does not affect OUTV
*) As far as the next point, the curve does not have the slope set by the user.
The selected mode is executed regardless of the value of the
control signals in the shaded fields.
Ramp Soak On The change in RMPSK_ON from FALSE to TRUE activates the ramp soak.
After reaching the last time slice (last point in the curve), the ramp soak
(curve) is completed. If you want to restart the function manually,
RMPSK_ON must first be set to FALSE and then back to TRUE.
Default Output If you want the ramp soak to start at a specific output value, you must set
Variable, Starting DFOUT_ON = TRUE. In this case the signal value DF_OUTV is applied to
the Ramp Soak the output.
Note
The signal for output of the constant setpoint DFOUT_ON has higher
priority than the start signal for the ramp soak RMPSK_ON.
RMPSK_ON
DFOUT_ON
OUTV
Configured curve
3 4 Actual curve
DF_OUTV OUTV(t)
1 2
0 5 6
t
PI[0]. PI[1]. PI[2]. PI[3]. PI[4]. PI[5]. 0 ms
TMVT* TMV TMV TMV TMV TMV PI[6].
TMV
QR_S_ACT PI[6].TMV
Figure 2-67 Influencing the Ramp Soak with the Default Signal DFOUT_ON
When the ramp soak is started with RMPSK_ON = TRUE, the fixed setpoint
DF_OUTV is output until DFOUT_ON changes from TRUE to FALSE after
the time T* (Figure 2-67). At this point, the time PI[0].TMV and part of the
time PI[1].TMV has expired. OUTV changes from DF_OUTV to
PI[2].OUTV other words to point 2.
The configured curve is only output starting at point 2, in other words the
output signal QR_S_ACT has the value TRUE. If the default signal
DFOUT_ON changes while the ramp soak is being processed, the output
value OUTV jumps to DF_OUTV without delay.
Cyclic Ramp Soak If the ’cyclic repetition’ mode is active (CYC_ON = TRUE), the ramp soak
Mode On automatically returns to the starting point and runs through again when it has
output the last value.
There is no interpolation between the last point and the starting point. To
achieve a smooth transition, the following must apply: PI[NBR_PTS].OUTV
= PI[0].OUTV.
Hold Ramp Soak If RMP_HOLD = TRUE is set, the value of the output variable (including
time processing) is put on hold. When this is reset (RMP_HOLD = FALSE),
the ramp soak continues from the point at which it was stopped PI[x].TMV.
RMP_HOLD
DFOUT_ON
T*
OUTV
Configured curve
3 4 OUTV(t) Actual curve
* Actual values
DF_OUTV
1 2
0 6 6*
T*
5 5*
t
PI[0].TMV PI[1].TMV PI[2].TMV PI[3].TMV PI[4].TMV PI[5].TMV PI[6].TMV
Configured time
Current time: PI[4].TMV+T* PI[5].TMV
QR_S_ACT
Figure 2-68 Influencing the Ramp Soak with the Hold Signal RMP_HOLD
The execution time of the ramp soak is extended by the hold time T*. The
ramp soak takes the configured course from point 1 until the signal change at
RMP_HOLD (FALSE → TRUE) and from point 5* to point 6*, in other
words the output signal QR_S_ACT has the value TRUE. (Figure 2-68).
If the bit CONT_ON is set, the stopped ramp soak continues operation at the
specified point TM_CONT.
Time Slice and If the control input CONT_ON for the continuation of the ramp soak is set to
Time to Continue TRUE, the ramp soak continues at TM_CONT (time to continue) with point
TM_SNBR (destination point). The time parameter TM_CONT determines
the remaining time that the ramp soak requires to the destination point
TM_SNBR.
No reaction!
CONT_ON
RMP_HOLD
OUTV(t)
1 2
0
5* 5 6* 6
t
PI[0].TMV PI[1].TMV PI[2].TMV PI[3].TMV PI[4].TMV PI[5].TMV
PI[6].TMV
Configured time T* PI[5].TMV
Actual time:
QR_S_ACT
Figure 2-69 Influencing the Ramp Soak of the Hold Signal RMP_HOLD and the
Continue Signal CONT_ON
Update Total Time In every cycle, the current point number NBR_ATMS, the current actual
and Total Time remaining time until the curve point is reached RS_TM, the total time T_TM
Remaining and the total time remaining to the end of the curve RT_TM are updated.
If PI[n].TMV is changed online, the total time and the total time remaining to
the end of the curve are also changed. Since the calculation of T_TM and
RT_TM greatly increases the run time of the function block when there is a
large number of time slices, the calculation is only made after a complete
restart or when TUPDT_ON = TRUE is set. The time slices PI[0 ...
NBR_PTS].TMV between the individual curve points are totaled and
indicated at the outputs total time T_TM and total time remaining RT_TM.
Please note that determining the total times means a relatively long CPU run
time!
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Application Ramp functions are used when the process must not be subjected to a step
change at the input. This is, for example, the case when gearing is included
between the motor and the load and when increasing the motor speed too fast
would overload the gearing.
Block Diagram
ROC_LIM
INV OUTV
UPRLM_P QUPRLM_P
DNRLM_P QDNRLM_P
UPRLM_N QUPRLM_N
DNRLM_N QDNRLM_N
H_LM QH_LM
L_LM QL_LM
PV
DF_OUTV
DFOUT_ON
TRACK
MAN_ON
COM_RST
CYCLE
Functional The block limits the rate of change of an output value. A step change
Description becomes a ramp function. Two ramps (rising and falling values) in the
positive and negative range can be selected for input variable and output
variable. Control inputs set the following modes:
S Default output variable
S Tracking
S Stepless automatic-manual switchover
The value of the output variable can be limited by two selectable limits. If
the rate of change limit rising or falling is reached or the high/low limit is
reached, this is indicated at outputs.
INV
OUTV
H_LM
UPRLM_P DNRLM_P
INV(t) OUTV(t)
UPRLM_P
0
UPRLM_N
t
DNRLM_N
DNRLM_N
L_LM
Input Parameters The following table shows the data type and structure of the input parameters
of ROC_LIM.
Table 2-53
Output Parameters The following table shows the data type and structure of the output
parameters ROC_LIM.
Table 2-54
Complete Restart/ During a complete restart, output OUTV is reset to 0.0. If DFOUT_ON =
Restart TRUE is set, DF_OUTV is output. All signal outputs are set to FALSE.
Normal Operation The slopes are straight line limit curves and relate to a rise/fall per second. If,
for example, the value 10.0 is set for UPRLM_P at a sampling time of
1s/100ms/10ms, then when the block is called, 10.0/1.0/0.1 is added to
OUTV if INV > OUTV, until INV is reached. Limiting the output variable
upwards and downwards is possible if the input variable exceeds H_LM or
falls below L_LM. (Exception: manual mode MAN_ON=TRUE; see
Examples Figure 2-72)
If one of the limits is exceeded, this is indicated at the outputs QUPRLM_P,
QDNRLM_P, QUPRLM_N, QDNRLM_N , QH_LM and QL_LM.
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Example If MAN_ON, TRACK, DFOUT_ON are set to FALSE, the signal outputs
have values as shown below:
INV
OUTV
H_LM
INV(t) OUTV(t)
L_LM
QH_LM
QL_LM
QUPRLM_P
QDNRLM_P
QDNRLM_N
QUPRLM_N
Figure 2-72 Example (MAN_ON, TRACK, DFOUT_ON = FALSE; L_LM < 0.0 < H_LM)
If MAN_ON is set, the limits H_LM and L_LM are not effective. If TRACK
is set, the input value is output without being changed. If DFOUT_ON =
TRUE, DF_OUTV is always output.
MAN_ON
TRACK
DFOUT_ON
INV
OUTV
H_LM
INV(t)
OUTV(t)
DF_OUTV
0
t
PV(t)
L_LM
QH_LM
QL_LM
QUPRLM_P
QDNRLM_P
QDNRLM_N
QUPRLM_N
Setpoint
ROC_LIM PID
value INV OUTV ER
–
PV
MAN_ON
Manual
Input Parameters The following table shows the data type and structure of the input
parameters.
INV
OUTV
100.0
H_LM
INV(t) OUTV(t)
50.0
L_LM
0.0
t
QH_LM
QL_LM
QUPRLM_P
QDNRLM_P
QUPRLM_N
QDNRLM_N
Application The value of a process variable supplied by a sensor is often in a range that is
not particularly suitable for the user (for example 0 to 10 V correspond to 0
to 1200 _C or 0 to 10 V correspond to 0 to 3000 rpm). By adapting the
setpoint or process variable, both variables can have the same range.
Block Diagram
OUTV SCALE
INV INV OUTV
OUTV
FACTOR
OFFSET
INV
Functional The block normalizes an analog variable. The normalization curve is defined
Description by the slope (FACTOR) and distance between OUTV when INV = 0 and the
coordinate axis OUTV = 0.
Algorithm
OUTV = INV * FACTOR + OFFSET
An analog variable INV is applied to the output variable OUTV via the
normalization curve. The normalization curve is defined by the variables
FACTOR and OFFSET.
OUTV
FACTOR
OFFSET
INV
Input Parameters The following table shows the data type and structure of the input parameters
of SCALE.
Output Parameters The following table shows the data type and structure of the output
parameters SCALE.
Normal Operation The block has no modes other than normal operation.
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Application To enter a setpoint value manually, the output value can be modified with the
SP_GEN block using two inputs. To allow small changes, the block should
have a sampling time of v100 ms.
Block Diagram
SP_GEN SP_GEN
DF_OUTV OUTV
SP_GEN
H_LM QH_LM
L_LM QL_LM
OUTVUP
OUTVDN
DFOUT_ON
COM_RST
CYCLE
Functional At the inputs OUTVUP and OUTVDN, the output variable OUTV can be
Description continuously increased or decreased within the limits H_LM and L_LM. The
rate of change depends on the length of time that OUTVUP and OUTVDN
are activated.
During the first three seconds after setting OUTVUP or OUTVDN the rate of
change is
dV/dt = (H_LM – L_LM) / 100 seconds; then it is
dV/dt = (H_LM – L_LM) / 10 seconds.
The value of OUTV is L_LM OUTV H_LM; if OUTV is limited, a message
is displayed.
With DFOUT_ON, OUTV can be assigned DF_OUTV.
OUTV
H_LM
OUTV(t)
L_LM 3 sec
t
OUTVUP
Input Parameters The following table shows the data type and structure of the input parameters
of SP_GEN.
Output Parameters The following table shows the data type and structure of the output
parameters SP_GEN.
Complete Restart During a complete restart, the OUTV is set to 0.0. If DFOUT_ON = TRUE
is set, DF_OUTV is output. The limits are also effective during a complete
restart.
Normal Operation DFOUT_ON, OUTVUP and OUTVDN have the following influence on
OUTV:
CYCLE
(H_LM – L_LM)
100s
CYCLE
(H_LM – L_LM)
10s
OUTVUP
OUTVDN
DFOUTV_ON
OUTV
H_LM
OUTV(t)
DF_OUTV
3 sec 3 sec
L_LM
0
t
QH_LM
QL_LM
Block-Internal No values are limited internally in the block; the parameters are not checked.
Limits
Block Diagram
SPL_LMNG.PID_OUTV
EDR_OUTV
STR_OUTV
0
STR_INV EDR_INV INV
Figure 2-82
Input Parameters The following table shows the data type and structure of the input parameters
of SPLT_RAN.
Output Parameters The following table shows the data type and structure of the output
parameters SPLT_RAN.
Normal Operation The block has no modes other than normal operation.
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Example The output value of the PID block is distributed on two manipulated value
processing blocks LMNGEN_C and LMNGEN_S by SPLT_RAN.
PID LMNGEN_C
LMN
SPLT_RAN LMNGEN_C
1)
SPLT_RAN LMNGEN_S
Application The block is used as an input and/or output multiplexer of two input/output
variables.
Block Diagram
SWITCH
INV1 OUTV1
INV2 OUTV2
INV1_ON
OUTV1_ON
COM_RST
Functional The block switches one of two analog input values to one of two output
Description values according to the following table:
Input Parameters The following table shows the data type and structure of the input parameters
of SWITCH.
Output Parameters The following table shows the data type and structure of the output
parameters SWITCH.
Complete Restart During a complete restart, OUTV1=0.0 and OUTV2=0.0 are set.
Normal Operation The block has no modes other than that in normal operation.
Block-Internal The values of the parameters are not limited in the block; the parameters are
Limits not checked.
Overview Using blocks from the ModPID library of Modular PID Control, you can
create your own specific controller.
The project ModPIDEx contains 12 examples of controller structures
(EXAMPL01 to EXAMPL12). Sections 3.2 to 3.13 describe these 12
examples that are made up of the blocks of the ModPID library as described
in Chapter 2.
Examples and Table 3-1 lists the examples supplied in the ModPIDEx project.
Their Uses
Table 3-1 List of Examples
Example Function
EXAMPL01 Fixed Setpoint Controller with Switching Output for
Integrating Actuators
EXAMPL02 Fixed Setpoint Controller with Continuous Output
EXAMPL03 Fixed Setpoint Controller with Switching Output for
Proportional Actuators
EXAMPL04 Single-Loop Ratio Controller
EXAMPL05 Multiple-Loop Ratio Controller
EXAMPL06 Blending Controller
EXAMPL07 Cascade Controller
EXAMPL08 Controller with Precontroller
EXAMPL09 Controller with Feedforward Control
EXAMPL10 Range Splitting Controller
EXAMPL11 Override Controller
EXAMPL12 Multiple Variable Controller
Based on the examples in Table 3-1, you can see the calls and
interconnection of the most important blocks.
You can copy the example that comes closest to the controller structure you
require as a template and then modify the template by removing or adding
block calls and interconnections.
Note
Only examples 1 to 3 include process simulation and can be run without a
connection to a process.
Examples 4 to 12 require a connection to a process. Before you can use these
examples, the blocks (CRP_IN, LMNGEN_C, LMNGEN_S, SP_GEN ...)
must be assigned new parameter values to that the process values are
connected through.
STL Programming The following example shows how to call the blocks from the ModPID
Example library and interconnect them using STL.
STL Description
Network 1:
CALL #DI_SP_GEN //Block call
OUTVUP := #SP_UP
OUTVDN :=#SP_DOWN
L #DI_SP_GEN.OUTV //Interconnection
T #DI_ROC_LIM.INV
CALL #DI_ROC_LIM //Block call
OUTV :=#OUT
BE
SCL Programming The following example shows how to call the blocks from the ModPID
Example library and interconnect them using SCL.
FUNCTION_BLOCK User FB
VAR_INPUT
SP_UP: bool := FALSE;
SP_DOWN: bool := FALSE;
END_VAR
VAR_OUTPUT
OUT: real := 0.0;
END_VAR
VAR
DI_SP_GEN: SP_GEN;
DI_ROC_LIM: ROC_LIM;
END_VAR
BEGIN
DI_SP_GEN( //Block call + interconnection
OUTVUP := SP_UP,
OUTVDN :=SP_DOWN);
DI_ROC_LIM( //Block call + interconnection
INV := DI_SP_GEN.OUTV);
OUT := DI_ROC_LIM.OUTV; //Interconnection
END_FUNCTION_BLOCK
Practising with the The examples 1 to 3 contain a complete control loop. They are particularly
Examples suitable for practising.
Using the standard tool “Monitoring and Modifying Variables”, it is simple to
modify control parameters and you can then watch the results of the changes
in the reaction of the simulated control loop.
The configuration tool provides a graphic interface with the loop monitor and
curve recorder and allows process identification.
Overview Example 1 is called EXAMPL01 and consists of a PID step controller (fixed
setpoint controller with switching output for integrating actuators) and a
simulated process.
Control Loop Figure 3-1 shows the complete control loop of example 1.
Process
Setpoint PID step
– controller Valve
Process
variable
Limit stop signals
Block Call and Figure 3-2 shows the block call and the interconnection of example 1.
Interconnection
(Complete restart)
TRUE (OB100)
FALSE (OB35) COM_RST
CYCLE
T 100ms
Application The PIDCTR_C block implements a PID step controller for integrating
actuators (for example motor-driven valves in industrial processes).
Figure 3-3 shows the block interconnections of PIDCTR_S.
+
–
Functional The setpoint generator SP_GEN sets the setpoint whose rate of change is
Description limited by the limiter ROC_LIM. The peripheral process variable is
converted to a floating-point value by CRP_IN and monitored by the limit
value monitor LIMALARM to check that it does not exceed selected limit
values. The error signal is routed to the PID algorithm via a DEADBAND.
The position feedback signal is read in via a second CRP_IN block. The
manipulated value processing block LMNGEN_S sets the output signals
QLMNUP and QLMNDN.
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Application The PROC_S block simulates an integrating actuator with a 3rd-order time
lag.
Figure 3-4 shows the block diagram of PROC_S.
QLMNR_HS
QLMNR_LS
GAIN
DISV
INV_UP
OUTV
INV_DOW N
Functional The block simulates an integrating actuator and three 1st-order time lags in
Description series. The disturbance variable DISV is always added to the output of the
actuating valve. The motor actuating time MTR_TM is the time required by
the valve from limit stop to limit stop.
Complete Restart During a complete restart, the output variable OUTV and the internally
stored values are all set to 0.
Control Loop Figure 3-5 shows the complete control loop of example 2.
DISV
Block Call and Figure 3-6 shows the block call and the interconnection of Example 2.
Interconnection
(Complete restart)
Application The PIDCTR_C block is used as a fixed setpoint controller with continuous
output. Figure 3-7 shows the block interconnections of PIDCTR_C.
Functional The setpoint generator SP_GEN sets the setpoint whose rate of change is
Description limited by the limiter ROC_LIM. The peripheral process variable is
converted to a floating-point value by CRP_IN and monitored by the limit
value monitor LIMALARM to check that it does not exceed selected limit
values. The error signal is routed to the PID algorithm. The manipulated
value processing block LMNGEN_C generates the analog manipulated
variable LMN that is converted to the peripheral format by CRP_OUT.
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Application The block PROC_C simulates an integrating actuator with a 3rd-order time
lag.
Figure 3-8 shows the block diagram of PROC_C.
DISV GAIN
INV OUTV
Functional The block simulates three 1st-order time lags in series. The disturbance
Description variable DISV is always added to the output of the actuating valve.
Complete Restart During a complete restart, the output variable OUTV and the internally
stored values are all set to 0.
Control Loop Figure 3-9 shows the complete control loop of example 3.
DISV
SP Continuous QPOS_P
controller with Process with
pulse duration switching input
PV modulation
Block Call and Figure 3-10 shows the block call and the interconnection of Example 3.
Interconnection
(Complete restart)
Application The block PIDCTR implements a PID controller with continuous output. It is
used to calculate the analog manipulated value within a pulse-break
controller. It is also used as a primary controller in ratio controls, blending
controls, and cascade controls. Figure 3-11 shows the block interconnections
of PIDCTR.
+
–
Functional The setpoint generator SP_GEN sets the setpoint whose rate of change is
Description limited by the limiter ROC_LIM. The peripheral process variable is
converted to a floating-point value by CRP_IN and monitored by the limit
value monitor LIMALARM to check that it does not exceed selected limit
values. The error signal is routed to the PID algorithm. The manipulated
value processing block LMNGEN_C generates the analog manipulated
variable LMN.
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Application The PROC_P block simulates a continuous actuator valve with a digital input
and a 3rd-order time lag.
Figure 3-12 shows the block diagram of PROC_P.
QLMNR_HS
QLMNR_LS
GAIN
LMNR DISV
OUTV
POS_P Demo-
dulation
+ x
PER_TM LMNR_HLM TM_LAG1 TM_LAG2 TM_LAG3
LMNR_LLM
Functional The block converts the binary input values of the pulse duration modulation
Description into continuous analog values and, after the disturbance variable has been
added, delays the output signal with three 1st-order time lags.
Complete Restart During a complete restart, the output variable OUTV and the internally
stored values are all set to 0.
Control Loop Figure 3-13 shows the application of Example 4 in a complete control loop.
EXAMPL04 DISV
SP Continuous LMN PV
Process
controller
PV1
PV2
(Complete restart)
Application The block implements a single loop ratio controller for continuous actuators.
Figure 3-15 shows the block interconnections of RATIOCTR.
Functional The ratio setpoint is set with the input parameter SP_RATIO. The peripheral
Description process variables PV_PER1 and PV_PER2 are converted to floating-point
values by CRP_IN and the ratio is formed. The floating-point value of
PV_PER2 is limited by the LIMITER so that no division by zero is possible.
The error signal is routed to the PID algorithm PID. The manipulated value
processing block LMNGEN_C generates the analog manipulated variable
LMN that is converted to the peripheral format by CRP_OUT.
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Control Loop Figure 3-16 shows the application of Example 5 in a complete control loop.
EXAMPL05
SP Primary LMN PV
Process
controller
Scaling Sec.
Sec. LMN PV
controller
controller Process
RATIO_FAC
Block Call and Figure 3-17 shows the block call and the interconnection of Example 5.
Interconnection
(Complete restart)
Primary Controller The primary controller is block PIDCTR from Example 3. Its functions are
described in Section 3.4.1 on Page 3-14.
Secondary The secondary controller is block RB_CTR_S. This block is a PID step
controller controller for integrating actuators that can be used as a secondary controller
in a multiple loop ratio or blending controller. Figure 3-18 shows the block
interconnections of RB_CTR_S.
+
–
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Control Loop Figure 3-19 shows the application of Example 6 in a complete control loop.
EXAMPL06
BLENDFAC
SP Primary LMN Scaling Sec. LMN PV
Process
controller controller
BLENDFAC
Scaling Sec. LMN PV
Process +
controller
BLENDFAC
Scaling Sec. LMN PV
Process
controller
Block Call and Figure 3-20 shows the block call and the interconnection of Example 6.
Interconnection
(Complete restart)
Primary controller The primary controller is block PIDCTR from Example 3. Its functions are
described in Section 3.4.1 on page 3-14.
+
–
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Control Loop Figure 3-22 shows the application of Example 7 in a complete control loop.
EXAMPL07
DISV
Block Call and Figure 3-23 shows the block call and the interconnection of Example 7.
Interconnection
(Complete restart)
Primary controller The primary controller is block PIDCTR from Example 3. Its functions are
described in Section 3.4.1.
Secondary The secondary controller is block PIDCTR_S from Example 1. Its functions
controller are described in Section 3.2.1 on page 3-7.
Control Loop Figure 3-24 shows the application of Example 8 in a complete control loop.
EXAMPL08
Precontroller
DISV
SP Continuous LMN PV
– controller + Process
(Complete restart)
+
–
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Control Loop Figure 3-27 shows the application of Example 9 in a complete control loop.
EXAMPL09
DISV
Feedforward
control
SP Continuous LMN PV
Process
controller
(Complete restart)
Application The block CRT_C_FF is a PID controller with feedforward Control for
continuous actuators. Figure 3-29 shows the block interconnections of
CTR_C_FF.
+
–
Functional The setpoint generator SP_GEN sets the setpoint whose rate of change is
Description limited by the limiter ROC_LIM. The peripheral process variable is
converted to a floating-point value by CRP_IN and monitored by the limit
value monitor LIMALARM to check that it does not exceed selected limit
values. The error signal is routed to the PID algorithm. The peripheral
disturbance value is converted to a floating-point value by CRP_IN, filtered
with LAG1ST and linearized. The manipulated value processing block
LMNGEN_C generates the analog manipulated variable LMN that is
converted to peripheral format by CRP_OUT.
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Control Loop Figure 3-30 shows the application of Example 10 in a complete control loop.
EXAMPL10
DISV
Block Call Figure 3-31 shows the block call of Example 10.
(Complete restart)
Application The block SPLITCTR is a PID controller with range splitting for 2
continuous actuators. Figure 3-32 shows the block interconnections of
SPLITCTR.
+
–
Functional The setpoint generator SP_GEN sets the setpoint whose rate of change is
Description limited by the limiter ROC_LIM. The peripheral process variable is
converted to a floating-point value by CRP_IN and monitored by the limit
value monitor LIMALARM to check that it does not exceed selected limit
values. The error signal is routed to the PID algorithm. The manipulated
value processing block LMNGEN_C generates the analog manipulated
variable LMN. The manipulated value range is split into two ranges by two
SPLT_RAN blocks. For each range, LMNGEN_C calculates an analog
manipulated variable that is converted to the peripheral format by
CRP_OUT.
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Overview Example 11 is called EXAMPL11 and ist ein Override Controller. There is no
simulated process with this example.
Control Loop Figure 3-33 shows the application of Example 11 in a complete control loop.
EXAMPL11
DISV
SP PID Override
–
controller 1 controller
with step LMN
Process
controller
SP PID output
– controller 2
Block Call Figure 3-34 shows the block call of Example 11.
(Complete restart)
Application The block OVR_CTR is an override controller. Two PID controllers are
connected to one step controller output. Figure 3-35 shows the block
interconnections of OVR_CTR.
+
–
+
–
Functional The setpoint generators SP_GEN sets the setpoints whose rates of change are
Description limited by the limiter ROC_LIM. The peripheral process variables are
converted to floating-point values by CRP_IN blocks and monitored by the
limit value monitors LIMALARM to check that they do not exceed selected
limit values. The error signals are led to the PID algorithm. The manipulated
values of the two PID blocks are applied to an OVERRIDE block. Here,
either the maximum or the minimum of the two manipulated values is
determined and passed to the manipulated value processing block
LMNGEN_S. In the override controller, LMNGEN_S can only operate in the
“step controller with position feedback signal“ mode.
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Control Loop Figure 3-36 shows the application of Example 12 in a complete control loop.
EXAMPL11
DISV
SP PID LMN
– PV1
controller 1
Process
PV2
SP PID LMN
– controller 2
Block Call Figure 3-37 shows the block call of Example 12.
(Complete restart)
Application The block MUL_CTR is a multiple variable controller. Two PID controllers
with continuous outputs are connected to the process. Figure 3-38 shows the
block interconnections of MUL_CTR.
+
–
+
–
Complete Restart During a complete restart, each block is called individually. Blocks with a
complete restart routine run through this routine.
Block Name CPU 313 CPU 314 CPU 315 CPU 412-1 CPU 414-1 CPU 416-1
CPU 315-2DP CPU 413-1 CPU 414-2DP CPU 416-2DP
CPU 413-2DP
in s in s in s in s in s in s
A_DEAD_B FB1 170 160 130 31 30 9
CRP_IN FB2 60 60 60 21 30 6
CRP_OUT FB3 220 210 180 42 30 12
DEAD_T FB4 330 320 260 60 39 17
DEAD- FB5 210 200 160 32 30 10
BAND
DIF FB6 710 690 550 92 55 26
ERR_MON FB7 350 340 270 49 34 14
INTEG FB8 510 500 400 74 44 20
LAG1ST FB9 670 650 520 94 56 27
LAG2ND FB10 1140 1110 880 158 86 44
LIMALARM FB11 610 590 470 65 41 18
LIMITER FB12 170 170 140 30 30 9
LMNGEN_C FB13 410 390 320 64 41 18
LMNGEN_S FB14 1470 1430 1160 184 115 57
NONLIN FB15 410 400 320 74 45 20
NORM FB16 430 420 330 67 42 19
OVERRIDE FB17 180 170 150 35 30 9
PARA_CTL FB18 150 140 120 30 30 9
PID FB19 1460 1420 1150 184 113 56
PULSEGEN FB20 200 200 170 50 33 12
RMP_SOAK FB21 200 200 160 40 30 11
ROC_LIM FB22 680 660 530 90 55 24
SCALE FB23 130 120 100 23 30 8
SPLT_RAN FB24 110 100 90 23 30 7
SP_GEN FB25 350 340 270 58 35 15
SWITCH FB26 90 80 70 25 30 7
LP_SCHED FC1 340 330 280 79 42 26
Run Time You can calculate the total run time with the following formula:
CPU Constant
CPU 313 105 s
CPU 314 100 s
CPU 315, CPU 315-2 DP 80 s
CPU 412-1, CPU 413-1 23 s
CPU 414-1, CPU 414-2 DP 12 s
CPU 416-1, CPU 416-2 DP 9 s
Memory The rule of thumb for memory requirements relates to the work memory.
Requirements
Diskettes The software is supplied on 3.5 inch diskettes, MS-DOS format, 1.44
Mbytes.
Creating Backup Make a copy of each original diskette and install the Startup and Test tool
Copies using the copies. Put the originals away for safe keeping. If you are unsure
how to make copies, refer to your MS-DOS or WINDOWS description.
Readme File If there is any important new information not in the manual or help, you will
find this in a “readme” in the opening window of the SIMATIC Manager.
Purpose The tool is intended to make installation, startup and testing of your
controller easier leaving you free to concentrate on the real control problem
in hand.
Functions of the Each function has its own window. You can also call a function more than
Startup and Test once, in other words, you can, for example, display the loop monitors of
Tool more than one controller at the same time.
Monitoring Using the curve recorder function, you record the values of selected variables
Controllers in the control loop over time and display them. Up to four variables can be
displayed at the same time.
With the loop monitor function, you can display the relevant control
variables (setpoint, manipulated variable, and process variable) of a selected
controller.
Process Using the process identification function, you can find out the optimum
Identification controller setting for a particular control loop. The characteristics of the
process are identified experimentally. Based on these characteristics, the
ideal controller parameters are calculated and saved for future use.
Manual Control The loop monitor function allows you to modify or set new values for
relevant variables of the control loop.
Integrated Help The Startup and Test tool has an integrated help system that supports you
while working with the tool. You can call the help system as follows:
S With the menu command Help " Contents
S By pressing the F1 key
S By clicking the Help button in the individual dialogs.
Blending control Blending control involves a controller structure in which the setpoint for the
total amount SP is converted to percentages of the individual components.
The total of the blending factors FAC must be 1 (= 100 %).
Cascade control Cascade control involves a series of interconnected controllers, in which the
master controller adjusts the setpoint for the secondary (slave) controllers
according to the instantaneous error signal of the main process variable.
A cascade control system can be improved by including additional process
variables. A secondary process variable PV2 is measured at a suitable point
and controlled to the reference setpoint (output of the maser controller SP2).
The master controller controls the process variable PV1 to the fixed setpoint
SP1 and sets SP2 so that the target is achieved as quickly as possible without
overshoot.
Master controller
Slave controller
Disturbance variable
SP1
SP2
Controller1 LMN PV2
Controller 2 Process 2 Process 1
Secondary loop
Control Process
Control loop The control loop is the connection between the process output (process
variable) and the controller input and between the controller output
(manipulated variable) and the process input, so that the controller and
process form a closed loop.
Controller Controller parameters are characteristic values for the static and dynamic
parameters adaptation of the controller response to the given loop or process
characteristics.
Dead time Dead time is the time delay in the process variable reaction to disturbances or
manipulated value changes in processes involving transport. The input
variable of a dead time element is displaced by the value of the dead time in
a ratio of 1 : 1 at the output.
Derivative time TV The derivative time is the time required by a P controller when the curve of
the input value is ramp shaped to achieve the same manipulated variable
change as a PD or PID controller due to its D action (TV = TD).
Digital control A controller that acquires a new value for the controlled variable (process
variable) at constant intervals (! sampling time) and then calculates a new
value for the manipulated variable depending on the value of the current
error signal.
wk yk = A(xk – wk)
yk y (t)
Memory Pulse Actuator
xk A = control gen.
Process
algorithm
Sampling x (t)
ADC Sensor
Disturbance All influences on the process variable (with the exception of the manipulated
variable variable) are known as disturbances. Influences adding to the process output
signal can be compensated by superimposing the actuating signal.
Error signal (ER) The error signal function forms the error signal ER = SP-PV. At the point at
which the comparison is made, the difference between the desired value
(setpoint) and the actual process value is calculated. This value is applied to
the input of the control algorithm.
SP – LMN PV
Controller Process
–
Control loop
Final control The final control element is the part of the control loop used to influence the
element manipulated variable at the process input. Normally consists of the actuator
drive and the actuator.
Fixed setpoint A fixed setpoint controller is a controller with a fixed setpoint that is only
control changed occasionally. This controller is used to compensate for disturbances
occurring in the process.
Follow-up control Follow-up control involves a controller in which the setpoint is constantly
influenced externally (secondary controller of a multi-loop control system).
The task of the secondary controller is to correct the local process variable as
quickly and accurately as possible so that it matches the setpoint.
Loop scheduler The loop scheduler organizes the calls for several controllers in one cyclic
interrupt priority class and the calls for all controllers during a complete
restart. The loop scheduler is used when there are too many controllers for
one cyclic interrupt priority class or when controllers with long sampling
times are used.
Manipulated The manipulated variable is the output variable of the controller or input
variable variable of the process. The actuating signal can take the form of an analog
percentage or a pulse duration value. With integrating actuators (for example
motor-driven) binary up/down or forwards/backwards signals are adequate.
Non balanced A non balanced process is a process in which the slope of the process
process variable as a step response to a disturbance or manipulated variable change is
proportional to the input step in the steady-state condition (I action).
PV
t
Settling Steady-state condition
Parallel structure The parallel structure is a special type of signal processing in the controller
(mathematical processing). The P, I and D components are calculated parallel
to each other with no interaction and then totalled.
LMN_P
GAIN Linear
GAIN = 0 combination
SP INT LMN_I
X +
– TI = 0 PID_OUTV
PV
DIF LMN_D
TD = 0
PI algorithm Algorithm for calculating an output signal in which the change in the
manipulated variable is made up of a component proportional to the error
signal and an I component proportional to the error signal and time.
Characteristics: no steady-state error signal, faster compensation than with an
I algorithm, suitable for all processes.
Process The process is the part of the system in which the process variable is
influenced by the manipulated variable (by changing the level of energy or
mass). The process can be divided into the actuator and the actual process
being controlled.
LMN PV
t t
LMN Process PV
Adaptation
Controller Process
design model
SP LMN
Controller Process
–
PV
Control loop
Process variable Process variable (output variable of the process) that is compared with the
instantaneous value of the setpoint.
SP LMN1 PV1
Controller 1 Process 1
–
Factor
LMN2 PV2
Controller 2 Process 2
–
Reset time TN The reset time is how much earlier a pure I controller would have to
intervene compared with P controller without time lag to achieve the same
change in the manipulated variable (TN = TI).
Restart When a controller restarts, it starts again assuming the same events and
operating state as when it was interrupted. This means that the controller
continues to work with the values calculated when the interruption occurred.
Setpoint The setpoint is the instantaneous reference input that specifies the desired
value of the process variable being controlled. The setpoint is the value that
the process variable should adopt under the influence of the controller.
Step controller A step controller is a quasi continuous controller with a discontinuous output
(and motor-driven actuator with an I action). The actuator has a three-step
response, for example up – stop – down (or open – hold – close).
Three-step A controller whose manipulated variable can only adopt three discrete states
controller (for example “heat – off cool” or “right – stop – left”).
Two-step A controller whose manipulated variable can only adopt two discrete states
controller (for example “on” – “off”).
A C
Adaptation of the dead band, 2-6 Call data, 2-3
Call processing, 2-69
Cascade control, Glossary-1
B
Cascade controller, 3-24
Backup diskettes, 5-1 Change range peripheral input, 2-10
Blending control, Glossary-1 Change range peripheral output, 2-12
Blending controller, 3-21 Closed-loop controller, Glossary-2
Block diagram Control loop, Glossary-2
A_DEAD_B, 2-4 Controller parameters, Glossary-2
CRP_IN, 2-10 Controller structures, examples, 3-2
CRP_OUT, 2-12 Controller with feedforward control, 3-28
DEAD_T, 2-14 Controller with precontroller, 3-26
DEADBAND, 2-18
DIF, 2-21
ERR_MON, 2-25 D
INTEG, 2-29 Dead band, 2-18
LAG1ST, 2-35 Dead band, adaptive, 2-4
LAG2ND, 2-39 Dead time, 2-14, Glossary-2
LIMALARM, 2-43 Derivative component, Glossary-2
LIMITER, 2-47 Derivative time, Glossary-2
LMNGEN_C, 2-50 Differentiator, 2-21
LMNGEN_S, 2-56 Digital control, Glossary-2
LP_SCHED, 2-65 Disabling loops, 2-69
NONLIN, 2-71 Disturbance variable, Glossary-2
NORM, 2-76
OVERRIDE, 2-78
E
PARA_CTL, 2-81
PID, 2-85 Error signal, Glossary-3
PULSEGEN, 2-95 Error signal monitoring, 2-25
RMP_SOAK, 2-105
ROC_LIM, 2-115 F
SCALE, 2-124 Feedforward control, Glossary-3
SP_GEN, 2-126 Final control element, Glossary-3
SPLT_RAN, 2-130 First-order lag element, 2-35
SWITCH, 2-134 Fixed setpoint control, Glossary-3
Fixed setpoint controller, 3-7
Fixed setpoint controller with continuous out-
put, 3-10
P S
Parallel structure (PID), Glossary-4 Setpoint, Glossary-6
Parameter control, 2-81 Setpoint generator, 2-126
Physical normalization, 2-76 Software environment, 1-4
PID algorithm, 2-85 Split Ranging, 2-130
Process, Glossary-5 Standard controller
Process identification, Glossary-5 basic functions, 1-2
Process variable, Glossary-5 functions, 1-2
Pulse generator, 2-95 Startup and Test tool, 5-1
accuracy, 2-98 installing, 5-1
automatic synchronization, 2-98 integrated help, 5-2
modes, 2-99 software requirements, 5-1
Pulse output, switching, 2-100 Step controller, 3-8, Glossary-7
Subfunctions, 1-2
Switch, 2-134
R
Ramp, 2-115
Ramp soak, 2-105 T
activating, 2-110 Technical data, 4-1
cyclic mode, 2-112 Three-step control, 2-100
default output value, 2-111 Three-step controller, Glossary-7
hold, 2-112 asymmetrical characteristics, 2-101
holding, continuing, 2-113 characteristics, 2-101
modes, 2-109, 2-110 manual mode, 2-104
online changes, 2-114 Time lag, 2nd order, 2-39
starting, 2-111 Two-step controller, 2-102, Glossary-7
Range splitting controller, 3-30
Rate of change limiter, 2-115
W
Ratio control, Glossary-6
Ratio controller Work memory requirements, 4-3
multiple-loop, 3-18
single-loop, 3-16
Readme file, 5-1
Reset time, Glossary-6
Rules of thumb, 4-5
Run times, 4-2
rules of thumb, 4-5
Östliche Rheinbrückenstr. 50
D–76181 Karlsruhe
Federal Republic of Germany
From:
Your Name: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Your Title: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Company Name: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Street: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
City, Zip Code_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Country: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Phone: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
❒ Automotive ❒ Pharmaceutical
❒ Chemical ❒ Plastic
❒ Electrical Machinery ❒ Pulp and Paper
❒ Food ❒ Textiles
❒ Instrument and Control ❒ Transportation
❒ Nonelectrical Machinery ❒ Other _ _ _ _ _ _ _ _ _ _ _
❒ Petrochemical
C79000-G7076-C121-01 1
Remarks Form
Your comments and recommendations will help us to improve the quality and usefulness
of our publications. Please take the first available opportunity to fill out this questionnaire
and return it to Siemens.
Please give each of the following questions your own personal mark within the range
from 1 (very good) to 5 (poor).
1. Do the contents meet your requirements?
2. Is the information you need easy to find?
3. Is the text easy to understand?
4. Does the level of technical detail meet your requirements?
5. Please rate the quality of the graphics/tables:
6.
7.
8.
Additional comments:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _