OSCAT BASIC ControlModules - RWTH-EBC/AixOCAT GitHub Wiki

23. Control Modules

23.1. Introduction

In the feld of process control modules for the construction of controllers
and controlled systems are provided. Where possible, the modules measu-
res the cycle time and calculate the output change with the current cycle
time. This process has and advantage to a process over a fxed cycle time,
that control systems of diferent speeds can be processed within the same
task. Another advantage is the fact that at low priority Tasks the cycle
time can vary and a controller with fxed cycle time inaccurate output va-
lues generates. The user should ensure with use of the set, that the cycle
time of the task is in accordance with the requirements of the process.
Overview of the control circuit elements:
TYPE Name Parameter Transfer function Calculation
P Proportional ele-
ment
KP KP Y = X * KP
I Integrator KI Y = Ya + X * KI * ΔT
D Diferentiator KD Y = KD * ΔX / ΔT
PT1 1st order low pass T1 KP / ( 1 + T1s)
PT2 2nd order lowpass T1, T2
PI PI element KP, KI KP (1 + 1/TNs) Y = Ya + KP ((1 + ΔT/TN)X - Xa)
PD PD-element KP, KD KP (1 + TDs)
PDT1 PD element, delayed -KP, TV, T1 KP (1 + TVs/(1+T1s))
PID PID-element KP, TN, TV KP (1 + 1/TNs + TVs
PIDT1 PID element delayed -KP, TN, TV,T1 KP (1 + 1/TNs + TVs/(1+T1s))
Wind-Up:
The wind- Up efect efects all controllers with I component. Thus real con-
troller have a restricted control area the Integrator would always grow,
reaching large control diferences and output limits. If after some time the
process value exceeds the nominal value would have to wait until the Inte-
grator reduces its high value. This is an undesirable and inappropriate be-
havior of the controller. The controller would suspend for the time of Inte-
grator required to reduce its high value, which would, the longer the lon-
ger the controller is in the limitation. Therefore at regulators with I-share
anti wind-up measures are necessary.
The simplest measure to prevent the wind Up is the integrator to reach a
Limits to stop and return to work until the area with the last value of the
Integrator continue working. This method has the disadvantage that chan-
ges in the control deviation during the output is limited, continues to per-
form in unnecessarily high values of the integrator. Modules in the library
are working with the procedure marked with a W at the end.
A sophisticated anti- Wind-Up Measure is a process that the output value
of the integrator limits to a value and together with the other control rules
exactly leads to the output limit. This method has the advantage that at
entering the work area the controller can be operational immediately and
can respond without time delay. Modules in the library working with this
better method are marked with a WL at the end.

23.2. BAND_B

Type Function: BYTE
Input X: BYTE (input value)
B: BYTE (limit area)
Output BYTE (output value)
BAND_B hides at the input areas 0255
the areas 0B and 255-B 255, in this
areas the output is 0 respectively 255.

23.3. CONTROL_SET2

Type Function module
Input KT: REAL (critical gain)
TT: REAL ( Period of the critical Vibration )
PI: BOOL (TRUE if parameters for PI controller are determined)
PID: BOOL (TRUE if parameters for PID controller)
Setup P_K: REAL:= 0.5 (default value KP for P controller)
PI_K: REAL:= 0.45 (default value KP for PI controller
PI_TN: REAL:= 0.83 (default value of TN for PI controller)
PID_K: REAL:= 0.6 (default value KP for PID controller)
PID_TN: REAL:= 0.5 (default value of TN for PID controller)
PID_TV: REAL:= 0.125 (default value TV for PID controller)
Output KP: REAL (variable gain KP)
TN: REAL (past set time of the integrator)
TV: REAL (retention time of the diferentiator)
CI: REAL ( Gain of the integrator)
KD: REAL ( Gain of Diferentiator )
CONTROL_SET1 calculate setting parameters for P, PI and PID controller
according to the Ziegler-Nichols method. Here it indicates the critical gain
KT, and the period of the critical vibration TT. The parameters are determi-
ned by the controller operated as a P-controller and the gain is ramped up
while committed to a continuous oscillation with a constant amplitude.
The corresponding values of KT and TT are then determined. Disadvantage
of this method is not any real control loop can be moved to the stability li-
mit, and so the process very long time for slow control loops such as room
arrangements.
Controller
Type
PI PID KP TN TV
P Controller 0 0 P_K * KT
PI Control 1 0 PI_K * KT PI_TN * TT
PID Control-
ler
0 1 PID_K * KT PID_TN * TT PID_TV * TT
The default values of the tuning rules are defned in Setup variables and
can be changed by the user. The following table shows the default values
Controller PI PID KP TN TV
Type
P Controller 0 0 P_K = 0.5
PI Control 1 0 PI_K = 0.45 PI_TN = 0.83
PID Control-
ler
0 1 PID_K = 0.6 PID_TN = 0.5 PID_TV = 0.125

23.4. CONTROL_SET2

Type Function module
Input KT: REAL (critical gain)
TT: REAL ( Period of the critical Vibration )
PI: BOOL (TRUE if parameters for PI controller are determined)
PID: BOOL (TRUE if parameters for PID controller)
Confg P_K: REAL:= 0.5 (default value KP for P controller)
PI_K: REAL:= 0.45 (default value KP for PI controller
PI_TN: REAL:= 0.83 (default value of TN for PI controller)
PID_K: REAL:= 0.6 (default value KP for PID controller)
PID_TN: REAL:= 0.5 (default value of TN for PID controller)
PID_TV: REAL:= 0.125 (default value TV for PID controller)
Output KP: REAL (variable gain KP)
TN: REAL (past set time of the integrator)
TV: REAL (retention time of the diferentiator)
CI: REAL ( Gain of the integrator)
KD: REAL ( Gain of Diferentiator )
CONTROL_SET2 calculated setting parameters for P, PI and PID controller
according to the Ziegler-Nichols method. Here, the delay time TU and
compensatory time TG is given. The parameters are determined by the
step response of the controlled system is measured. TU is the time after
which the output of the system 5% of its maximum value reached added.
TG is the time at the turn of the tangent of the controlled system. KS actu-
al value is the controlled / manipulated variable change.
The following chart shows the determination of TU and TG with the infec-
tion tangent method:
Controller
Type
PI PID KP TN TV
P Controller 0 0 P_K * TG / TU / KS
PI Control 1 0 PI_K * TG / TU / KS PI_TN * TU
PID Control-
ler
0 1 PID_K * TG / TU / KS PID_TN * TU PID_TV * TU
The default values of the tuning rules are defned in Confg variables and
can be changed by the user. The following table shows the Default Values:
Controller
Type
PI PID KP TN TV
P Controller 0 0 P_K = 1.0
PI Control 1 0 PI_K = 0.9 PI_TN = 3.33
PID Control-
ler
0 1 PID_K = 1.2 PID_TN = 2 PID_TV = 0.5

23.5. CTRL_IN

Type Function: REAL
Input SET_POINT: REAL (default)
ACTUAL: REAL (process value)
NOISE: REAL (threshold)
Output REAL (Process deviation)
CTRL_IN calculates the process deviation (SET_POINT _ ACTUAL) and pas-
ses them at the output. If the diference is less than the value at the input
NOISE of the output remains at 0. CTRL_IN can be used to build own rule
modules.
Block diagram of CTRL_IN:

23.6. CTRL_OUT

Type Function module
Input CI: REAL (input from controller)
OFFSET: REAL (output ofset)
MAN_IN: REAL (Manual input)
LIM_L: REAL (lower output limit)
LIM_H: REAL (upper output limit)
MANUAL: BOOL (switch for manual operation)
Output Y: REAL (Control signal)
LIM: BOOL (TRUE if control signal reaches a limit)
CTRL_OUT adds to the CI input the value of OFFSET and returns the result
to Y if MANUAL = FALSE. If MANUAL is TRUE at output Y the input value of
MAN_IN + OFFSET is issued. Y is always limited to the boundaries defned
by LIM_L and LIM_H. If Y reaches one of the limits, then the output LIM is
TRUE. CTRL_OUT can be used to build own rule modules.
Block diagram of CTRL_OUT:

23.7. CTRL_PI

Type Function module
Input ACT: REAL (value measured by the way)
SET: REAL (default)
SUP: REAL (noise reduction)
SFO: REAL (ofset for the output)
M_I: REAL (input value for manual operation)
MAN: BOOL (switch to manual mode, MANUAL = TRUE)
RST: BOOL (asynchronous reset input)
KP: REAL (proportional part of the controller)
KI: REAL (integral part of the controller)
LL: REAL (lower output limit)
LH: REAL (upper output limit)
Output Y: REAL (output of the controller)
DIFF: Real (deviation)
LIM: BOOL (TRUE if the output has reached a limit)
CTRL_PI is a PI controller with dynamic anti-wind-up and manual control in-
put. The PI controller operates according to the formula:
Y = KP * DIFF + KI * INTEG(DIFF) + OFFSET
where DIFF = SET_POINT - ACTUAL
In manual mode (manual = TRUE) is: Y = MANUAL_IN+ OFFSET
ACT is the measured value for the controlled system and set the setpoint
for the controller. The input values of LH and LL limit Output value Y. With
RST the internal integrator may be set to 0 any time. The output LIM si-
gnals that the controller has reached the limit of LL or LH. The PI controller
is free running and uses the trapezoidal rule to calculate the integrator for
the highest accuracy and optimal speed. The Default Values of the input
parameters are predefned as follows: KP = 1, KI = 1, LIMIT_L = -1000 and
LIMIT_H = +1000. With the input SUP a noise reduction is set, the value on
input SUP determines at which control diference the controller turns on.
With SUP is avoided that the output of the controller varies continously.
The value at the input SUP should be in dimension that it suppresses the
noise of the controlled system and the sensors. If the input to SUP is set to
0.1, the controller is only at deviations greater than 0.1 active. At the out-
put DIFF the measured and through a Noise Filter (DEAD_BAND) fltered
control deviation is available. DIFF is normally not required in a controlled
system but can be used to infuence the control parameters. The input
OFS is added as the last value to output, and is used to compensate main-
ly of noise, whose efect can be estimated on the loop.
The controller works with a dynamic air- Up that prevents that the integra-
tor, when reaching a output limit and further deviation, continues to run
unlimited and afects the properties usually negative. In the introduction
chapter of the control technology, more details can be found on anti-wind-
up.
The following graph illustrates the internal structure of the controller:

23.8. CTRL_PID

Type Function module
Input ACT: REAL (value measured by the way)
SET: REAL (default)
SUP: REAL (noise reduction)
SFO: REAL (ofset for the output)
M_I: REAL (input value for manual operation)
MAN: BOOL (switch to manual mode, MANUAL = TRUE)
RST: BOOL (asynchronous reset input)
KP: REAL (controller gain)
TN: REAL (reset of the controller)
TV: REAL (derivative of the controller)
LL: REAL (lower output limit)
LH: REAL (upper output limit)
Output Y: REAL (output of the controller)
DIFF: Real (deviation)
LIM: BOOL (TRUE if the output has reached a limit)
CTRL_PID is a PID controller with dynamic anti-wind up and manual control
input. The PID controller operates according to the formula:
Y = KP * (DIFF + 1/Tn * INTEG(DIFF) + TV *DERIV(DIFF)) + OFFSET
where DIFF = SET_POINT - ACTUAL
In manual mode (manual = TRUE) is: Y = MANUAL_IN+ OFFSET
ACT is the measured value for the controlled system and SET is the set-
point for the controller. The input values of LH and LL limit the output va-
lue Y. With RST, the internal integrator will always set to 0. The output LIM
signals that the controller has reached the limit of LL or LH. The PID con-
troller operates free-running and uses the trapezoidal rule to calculate
with highest accuracy and optimal speed. The default values of the input
parameters are predefned as follows: KP = 1, TN = 1, TV = 1, LIMIT_L =
-1000 and LIMIT_H = +1000. With the input SUP a noise reduction is set,
the value on input SUP determines at which control diference, the control-
ler turns on. With SUP is avoided that the output of the controller wob-
bles. The value at the input SUP should be in dimension that it suppresses
the noise of the controlled system and the sensors. If the input to SUP is
set to 0.1, the controller is only at deviations greater than 0.1 active. The
ouput DIFF passes the measured and through a noise flter (DEAD_BAND)
fltered control deviation. DIFF is normally not required in a controlled sys-
tem but can be used to infuence the control parameters. The input OFS is
added as the last value to output, and is used to compensate mainly of
noise, whose efect can be estimated on the loop.
The controller works with a dynamic air- Up that prevents that the integra-
tor, when reaching a output limit and further deviation, continues to run
unlimited and afects the properties usually negative. In the introduction
chapter of the control technology, more details can be found on anti-wind-
up.
The control parameters are given in the form of KP, TN and TV, and if the-
re are parameters KP, KI and KD they can be converted using the following
formula:
TN = KP/KI und TV = KD/KP
The following graph illustrates the internal structure of the controller:
In the following example, a PID controller is shown whose SET_POINT is ge-
nerated by module TUNE2 using buttons. Output DIFF is passedto a modu-
le PARSET2 which changes the parameters KP, TN, and TV depending on
the deviation at the output of DIFF.

23.9. CTRL_PWM

Type Function module
Input CI: REAL (input from controller)
MAN_IN: REAL (Manual input)
MANUAL: BOOL (switch for manual operation)
F: REAL (frequency of the output pulses in Hz)
Output Q: BOOL (control signal)
CTRL_PWM converts the input value of CI (0 .1) in a pulse width modulated
output signal Q. When MANUAL is TRUE at the output Q the input value of
MAN_IN is passed. CTRL_OUT can be used to build own rule modules.
Block diagram of CTRL_PWM:
The following example shows a PI controller with PWM output:

23.10. DEAD_BAND

Type Function
Input X: REAL (input)
L: REAL ( Lockout Value)
Output REAL (output value)
DEAD_BAND is a linear transfer function with dead zone. The function mo-
ves the positive part of the curve to -L and the negative part of the curve
by +L. DEAD_BAND is used to flter a quantization noise and other noise
components from a signal. DEAD_BAND, for example, is used in control
systems in order to prevent that the controller permanently switches in
small increments, while the actuator is overstressed and worn out.
DEAD_BAND = X - SGN(X)*L if ABS(X)> L if ABS(X) > L
DEAD_BAND = 0 if ABS(X) <= L

23.11. DEAD_BAND_A

Type Function module
Input X: REAL (input)
T: TIME (time delay of the lowpass)
KL: REAL (gain of the flter)
LM: REAL (maximum value of the HF amplitude)
Output Y: REAL (output value)
L: REAL (amplitude of high frequency)
DEAD_BAND_A is a self adapting linear transfer function with dead zone.
The function moves the positive part of the curve to -L and the negative
part of the curve by +L. DEAD_BAND_A is used to flter the noise com-
ponents at the origin of a signal. DEAD_BAND_A, for example, used in con-
trol systems in order to prevent that the controller permanently switches
in small increments, while the actuator is overstressed and worn out.
The size L is calculated by fltering the HF cpmponents of the input signal
X using a low pass with time constant T and the dead zone L calculated
from the amplitude of the HF portion. The sensitivity of the device can be
changed via the parameter KL. KL is predefned to 1 and can be unconnec-
ted. Reasonable values for KL are between 1 - 5.
L = HF_Amplitude(efective) *KL.
So that the module will remain stable even under extreme operating con-
ditions, the input LM is limited by of the maximum value of L.
DEAD_BAND = X - SGN(X)*L if ABS(X)> L if ABS(X) > L
DEAD_BAND = 0 if ABS(X) <= L

23.12. DEAD_ZONE

Type Function: REAL
Input X: REAL (input)
L: REAL ( Lockout Value)
Output REAL (output value)
DEAD_ZONE is a linear transfer function with dead zone. The output equals
the input signal when the absolute value of the input is greater than L.
DEAD_ZONE = X if ABS(X) > L
DEAD_ZONE = 0 if ABS(X) <= L

23.13. DEAD_ZONE2

Type Function module
Input X: REAL (input)
L: REAL ( Lockout Value)
Output Y: REAL (output value)
DEAD_ZONE2 is a linear transfer function with dead zone and hysteresis.
The output equals the input signal when the absolute value of the input is
greater than L.
DEAD_ZONE2 = X if ABS (X) > L
DEAD_ZONE2 = + / - L if ABS (X) <= L

23.14. FT_DERIV

Type Function module
Input IN: REAL (input signal)
K: REAL (multiplier)
RUN: BOOL (enable input)
Output OUT: REAL (derivation of the input signal K * X/  T )
FT_DERIV is a D-link, or LZI-transfer element, which has a diferentiating
transfer behavior. At the output of FT_DERIV the derivative is over time T
in seconds. When the input signal increases in one second from 3 to 4
then the output 1 * K (K *  X /  T = 1 * (4-3) / 1 = 1
In other words, the derivative of the input signal, the instantaneous slope
of the input signal. With the input RUN the FT_DERIV can be enabled or di-
sabled. FT_DERIV works internally in microseconds and fulfll also the re-
quirements of very fast PLC controller with cycle times under a millise-
cond.
Structure diagram:

23.15. FT_IMP

Type Function module
Input IN: REAL (input signal)
T: TIME (time constant)
K: REAL (multiplier)
Output OUT: REAL (High pass with time constant T )
FT_IMP is a high-pass flter with time constant T and multiplier K. An ab-
rupt change at the input is visible at the output, but after the time T the
value is already smoother by 63% and after 3 * T by 95%. Thus, after an
abrupt change of the input signal from 0 to 10, the output passes 10 at
the beginning and reduces after 1* T to 3.7 and after 3 * T to 0.5 and then
gradually to 0.
Structure diagram:

23.16. FT_INT

Type Function module
Input IN: REAL (input signal)
K: REAL (multiplier)
RUN: BOOL (enable input)
RST: BOOL (Reset input)
OUT_MIN: REAL (lower output limit)
OUT_MAX: REAL (upper output limit)
Output OUT_MAX: REAL (upper output limit)
LIM: BOOL (TRUE if the output is at a limit)
FT_INT is an integrator module which provides the integral of the input si-
gnal at the output. The input K is a multiplier for the output signal. Run
switches the integrator on if TRUE and of when FALSE. RST (reset) sets
the output to 0. The inputs OUT_MIN and OUT_MAX serve upper and lower
limits for the output of the integrator. FT_INT
works internally in microseconds and is thus fulfll also the requirements
very fast PLC controller with cycle times under one millisecond.
A fundamental problem with integrator is the resolution.The output of type
real has a resolution of 7-8 points. This will result in a calculated integrati-
on step of 1 at an output value of more than one hundred million (1E8).
Thus the step can not be added up because it falls below the resolution li-
mit of a maximum of 8 points in type Real. This limitation is important
when using FT_INT.
For example, an input signal of 0.0001 would be at a sampling time of 1
millisecond and a baseline of 100000 to add a value of 0.0001 * 0.001 se-
conds = 0.000001 to the baseline of 100000, which inevitably results in
the value of 100000 again, because the resolution of the data type Real
can only collect up to 8. This should be considered especially if FT_INT
should serve as a utility meter or similar applications.
Structure diagram:

23.17. FT_INT2

Type Function module
Input IN: REAL (input signal)
K: REAL (multiplier)
RUN: BOOL (enable input)
RST: BOOL (Reset input)
OUT_MIN: REAL (lower output limit)
OUT_MAX: REAL (upper output limit)
Output OUT_MAX: REAL (upper output limit)
LIM: BOOL (TRUE if the output is at a limit)
FT_INT2 is an integrator module which calculates internal with double-pre-
cision and ensures a resolution of 14 decimal places. This makes it suita-
ble to use FT_INT2 unlike FT_INT, for power meters and similar applicati-
ons.
For example, an input signal of 0.0001 results in a sampling time of 1 milli-
second and an output value of 100000 a value of 0.0001 * 0.001 seconds
= 0.000001. To be added to the baseline of 100000, which results inevita-
bly refect the value of 100000 because the resolution of the data type
Real can only collect up to 8. FT_INT2 solves this problem by calculating
internal with double-precision (14 decimal places) and adds even the
smallest input values so that no information is lost.

23.18. FT_PD

Type Function module
Input IN: REAL (input signal)
KP: REAL (proportional part of the controller)
TV: REAL (reset time of the diferentiator in seconds)
Output Y: REAL (output of the controller)
FT_PD is a PD controller, the following formula works:
Y = KP * (IN + DERIV(IN))
FT_PD can be used in conjunction with the modules CTRL_IN and
CTRL_OUT to establish a PD controller.
The following graph illustrates the internal structure of the controller:

23.19. FT_PDT1

Type Function module
Input IN: REAL (input signal)
KP: REAL (proportional part of the controller)
TV: REAL (reset time of the diferentiator in seconds)
T1: REAL (T1 of the PT1 element in seconds)
Output Y: REAL (output of the controller)
FT_PDT1 is a PD controller with a T1 link in the D-term. The device opera-
tes as follows:
Y = KP * (IN + PT1(DERIV(IN))
FT_PDT1 can be used in conjunction with the modules CTRL_IN and
CTRL_OUT and other regulatory technical modules to build complex con-
trol circuits.
Internal structure of the block:

23.20. FT_PI

Type Function module
Input IN: REAL (input signal)
KP: REAL (proportional part of the controller)
KI: REAL (integral part of the controller)
ILIM_L: REAL (lower limit of the integrator output)
ILIM_H: REAL (upper limit of the integrator output)
IEN: BOOL ( Enable for Integrator )
RST: BOOL (asynchronous reset input)
Output Y: REAL (output of the controller)
LIM: BOOL (TRUE if the output has reached a limit)
FT_PI is a PI controller which works following the formula:
Y = KP * IN + KI * INTEG(IN)
The input values ILIM_H and ILIM_L limits the working area of the internal
integrator. With RST, the internal Integrator can always be set to 0. The
output LIM indicates that the Integrator has reached one of the limits
ILIM_L oe ILIM_H. The PI controller is free running and uses the trapezoidal
rule to calculate the integrator for the highest accuracy and optimal
speed. The default values of the input parameters are predefned as fol-
lows: KP = 1, CI = 1, ILIM_L= -1E38 and ILIM_H = +1E38.
Anti Wind-Up: Control modules with Integrator tend to the so-called Wind-
Up Efect. A Wind-Up means that the integrator module continuously run
again because, for example, the control signal Y is at a limit and the sys-
tem can not compensate the deviation, which then leads to subsequent
transition into the control range until a long and time-consuming dismant-
ling of the integrator value and the scheme only respond delayed. Since
the integrator is only necessary to compensate the deviation for all other
control units, and the range of the integrator should be limited with the
values of ILIM. The Integrator then reaches a limit and stops remaining at
the last valid value. For other wind- Up Action, the Integrator can be con-
trolled with the input IEN = FALSE any time separately, the Integrator only
runs when IEN = TRUE.
The following graph illustrates the internal structure of the controller:
FT_PI can be used in conjunction with the modules CTRL_IN and CTRL_OUT
to build a PI controller.

23.21. FT_PID

Type Function module
Input IN: REAL (input value)
KP: REAL (controller gain)
TN: REAL (past set time of the controller in seconds)
TV: REAL (derivative of the controller in seconds)
ILIM_L: REAL (lower limit of the integrator output)
ILIM_H: REAL (upper limit of the integrator output)
IEN: BOOL ( Enable for Integrator )
RST: BOOL (asynchronous reset input)
Output Y: REAL (output of the controller)
LIM: BOOL (TRUE if the output has reached a limit)
FT_PID is a PID controller of the following formula works:
Y = KP * ( IN + 1/TN * INTEG(IN) + TV *DERIV(IN))
The control parameters are given in the form of KP, TN and TV, and if the-
re are parameters KP, KI and KD they can be converted using the following
formula:
TN = KP/KI und TV = KD/KP
The input values ILIM_H and ILIM_L limit the working area of the internal
integrator. With RST, the internal integrator will always set to 0. The out-
put LIM signals that the integrator runs one of the limits or ILIM_L ILIM_H.
The PI controller is free running and uses the trapezoidal rule to calculate
the integrator for the highest accuracy and optimal speed. The default va-
lues of the input parameters are predefned as follows: KP = 1, TN = 1s,
TV = 1s, ILIM_L =-1E38 and ILIM_H = +1 E38.
Anti Wind-Up: Control modules with Integrator tend to the so-called Wind-
Up Efect. A Wind-Up means that the integrator module continuously run
again because, for example, the control signal Y is at a limit and the sys-
tem can not compensate the deviation, which then leads to subsequent
transition into the control range until a long and time-consuming dismant-
ling of the integrator value and the scheme only respond delayed. Since
the integrator is only necessary to compensate the deviation for all other
control units, and the range of the integrator should be limited with the
values of ILIM. The Integrator then reaches a limit and stops remaining at
the last valid value. For other wind- Up Action, the Integrator can be con-
trolled with the input IEN = FALSE any time separately, the Integrator only
runs when IEN = TRUE.
The following graph illustrates the internal structure of the controller:
FT_PD can be used in conjunction with the modules CTRL_IN and
CTRL_OUT to establish a PD controller.

23.22. FT_PIDW

Type Function module
Input IN: REAL (input signal)
KP: REAL (proportional part of the controller)
TN: REAL (past set time of the controller in seconds)
TV: REAL (derivative of the controller in seconds)
LIM_L: REAL (lower limit of the integrator output)
ILIM_H: REAL (upper limit of the integrator output)
RST: BOOL (asynchronous reset input)
Output Y: REAL (output of the controller)
LIM: BOOL (TRUE if the output has reached a limit)
FT_PIDW is a PID controller with Anti Wind- Up Hold works according to the
following formula:
Y = KP * ( IN + 1/TN * INTEG(IN) + TV *DERIV(IN))
The control parameters are given in the form of KP, TN and TV, and if the-
re are parameters KP, KI and KD they can be converted using the following
formula:
TN = KP/KI und TV = KD/KP
The input values LIM_H and LIM_L limit the range of the output Y. With
RST, the internal Integrator can always be set to 0. The output LIM indica-
tes that the Output Y runs to one of the limits LIM_L orL IM_H. The PI con-
troller is free running and uses the trapezoidal rule to calculate the inte-
grator for the highest accuracy and optimal speed. The default values of
the input parameters are predefned as follows: KP = 1, TN = 1s, TV = 1s,
ILIM_L =-1E38 and ILIM_H = +1 E38.
Anti Wind-Up: Control modules with Integrator tend to the so-called Wind-
Up Efect. A Wind-Up means that the integrator module continuously run
again because, for example, the control signal Y is at a limit and the sys-
tem can not compensate the deviation, which then leads to subsequent
transition into the control range until a long and time-consuming dismant-
ling of the integrator value and the scheme only respond delayed. Since
the integrator is only necessary to compensate the deviation for all other
control units, and the range of the integrator should be limited with the
values of ILIM.
The module FT_PIDW has a so-called Wind-Up-Hold which freezes the inte-
grator after reaching for an output limit (LIM_L, LIM_H) on the last value
and thus a Wind-Up prevents.
The following graph illustrates the internal structure of the controller:
FT_PD can be used in conjunction with the modules CTRL_IN and
CTRL_OUT to establish a PD controller.

23.23. FT_PIDWL

Type Function module
Input IN: REAL (input signal)
KP: REAL (proportional part of the controller)
TN: REAL (past set time of the controller in seconds)
TV: REAL (derivative of the controller in seconds)
LIM_L: REAL (lower limit of the integrator output)
ILIM_H: REAL (upper limit of the integrator output)
RST: BOOL (asynchronous reset input)
Output Y: REAL (output of the controller)
LIM: BOOL (TRUE if the output has reached a limit)
FT_PIDWL is a PID controller with dynamic Wind- Up reset and works accor-
ding to the following formula:
Y = KP * ( IN + 1/TN * INTEG(IN) + TV *DERIV(IN))
The control parameters are given in the form of KP, TN and TV, and if the-
re are parameters KP, KI and KD they can be converted using the following
formula:
TN = KP/KI und TV = KD/KP
The input values LIM_H and LIM_L limit the range of the output Y. With
RST, the internal Integrator can always be set to 0. The output LIM indica-
tes that the Output Y runs to one of the limits LIM_L orL IM_H. The PI con-
troller is free running and uses the trapezoidal rule to calculate the inte-
grator for the highest accuracy and optimal speed. The default values of
the input parameters are predefned as follows: KP = 1, TN = 1s, TV = 1s,
ILIM_L =-1E38 and ILIM_H = +1 E38.
Anti Wind-Up: Control modules with Integrator tend to the so-called Wind-
Up Efect. A Wind-Up means that the integrator module continuously run
again because, for example, the control signal Y is at a limit and the sys-
tem can not compensate the deviation, which then leads to subsequent
transition into the control range until a long and time-consuming dismant-
ling of the integrator value and the scheme only respond delayed. Since
the integrator is only necessary to compensate the deviation for all other
control units, and the range of the integrator should be limited with the
values of ILIM.
The module FT_PIW has a so-called dynamic-wind Up Reset which resets
reaching a limit (LIM_L, LIM_H) the the Integrator to a value corresponding
of the output limit. After reaching a Limits the controller re-enters the work
area must the Integrator are not frst or Down-integrated, and the control-
ler is ready for use without delay. The dynamic Anti-Wind Up Method is
that in most cases without drawbacks preferred method, because it does
not negatively afect the control and prevents the disadvantages of
Wind_Up.
The following graph illustrates the internal structure of the controller:
FT_PD can be used in conjunction with the modules CTRL_IN and
CTRL_OUT to establish a PD controller.

23.24. FT_PIW

Type Function module
Input IN: REAL (input signal)
KP: REAL (proportional part of the controller)
KI: REAL (integral part of the controller)
LIM_L: REAL (lower limit of the integrator output)
ILIM_H: REAL (upper limit of the integrator output)
RST: BOOL (asynchronous reset input)
Output Y: REAL (output of the controller)
LIM: BOOL (TRUE if the output has reached a limit)
FT_PIDW is a PID controller with Anti Wind- Up Hold works according to the
following formula:
Y = KP * IN + KI * INTEG(IN)
The input values LIM_H and LIM_L limit the range of the output Y. With
RST, the internal Integrator can always be set to 0. The output LIM indica-
tes that the Output Y runs to one of the limits LIM_L orL IM_H. The PI con-
troller is free running and uses the trapezoidal rule to calculate the inte-
grator for the highest accuracy and optimal speed. The default values of
the input parameters are predefned as follows: KP = 1, CI = 1, ILIM_L=
-1E38 and ILIM_H = +1E38.
Anti Wind-Up: Control modules with Integrator tend to the so-called Wind-
Up Efect. A Wind-Up means that the integrator module continuously run
again because, for example, the control signal Y is at a limit and the sys-
tem can not compensate the deviation, which then leads to subsequent
transition into the control range until a long and time-consuming dismant-
ling of the integrator value and the scheme only respond delayed. Since
the integrator is only necessary to compensate the deviation for all other
control units, and the range of the integrator should be limited with the
values of ILIM.
The module FT_PIDW has a so-called Wind-Up-Hold which freezes the inte-
grator after reaching for an output limit (LIM_L, LIM_H) on the last value
and thus a Wind-Up prevents.
The following graph illustrates the internal structure of the controller:
FT_PIW can used together with the modules CTRL_IN and CTRL_OUT to
build complex controllers.

23.25. FT_PIWL

Type Function module
Input IN: REAL (input signal)
KP: REAL (proportional part of the controller)
KI: REAL (integral part of the controller)
LIM_L: REAL (lower limit of the integrator output)
ILIM_H: REAL (upper limit of the integrator output)
RST: BOOL (asynchronous reset input)
Output Y: REAL (output of the controller)
LIM: BOOL (TRUE if the output has reached a limit)
FT_PIWL is a PI controller with dynamic anti-wind Up and works according
the following formular:
Y = KP * IN + KI * INTEG(IN)
The input values LIM_H and LIM_L limit the range of the output Y. With
RST, the internal Integrator can always be set to 0. The output LIM indica-
tes that the Output Y runs to one of the limits LIM_L orL IM_H. The PI con-
troller is free running and uses the trapezoidal rule to calculate the inte-
grator for the highest accuracy and optimal speed. The default values of
the input parameters are predefned as follows: KP = 1, CI = 1, ILIM_L=
-1E38 and ILIM_H = +1E38.
Anti Wind-Up: Control modules with Integrator tend to the so-called Wind-
Up Efect. A Wind-Up means that the integrator module continuously run
again because, for example, the control signal Y is at a limit and the sys-
tem can not compensate the deviation, which then leads to subsequent
transition into the control range until a long and time-consuming dismant-
ling of the integrator value and the scheme only respond delayed. Since
the integrator is only necessary to compensate the deviation for all other
control units, and the range of the integrator should be limited with the
values of ILIM.
The module FT_PIWL has a so-called dynamic-wind Up Reset which resets
reaching a limit (LIM_L, LIM_H) the Integrator to a value corresponding of
the output limit. After reaching a Limits the controller re-enters the work
area must the Integrator are not frst or Down-integrated, and the control-
ler is ready for use without delay. The dynamic Anti-Wind Up Method is
that in most cases without drawbacks preferred method, because it does
not negatively afect the control and prevents the disadvantages of
Wind_Up.
The following graph illustrates the internal structure of the controller:
FT_PIWL can used together with the modules CTRL_IN and CTRL_OUT to
build complex controllers.

23.26. FT_PT1

Type Function module
Input IN: REAL (input signal)
T: TIME (time constant)
K: REAL (multiplier)
Output OUT_MAX: REAL (upper output limit)
FT_PT1 is an LZI- Transmission link with a proportional transfer behavior 1
Order, even as a low pass flter 1 order referred to. The multiplier K sets
the gain (multiplier) is fxed and T is the time constant.
A change at the input is attenuated at the output visible. The output signal
increases within T to 63% of the input value and after 3 * T to 95% of
input values. Thus, after an abrupt change of the input signal of 0 to 10 at
the time of the initial input change 0, increasing to 1 at T * 6.3 and after 3
* T 9.5 and then approaches asymptotically the value 10. The frst time
the output OUT to the IN input value is initialized to a defned starting
performance guarantee. If the input T of T#0s is equal to the output OUT
= K * IN.
Structure diagram:
Step response for T = 1, K = 1

23.27. FT_PT2

Type Function module
Input IN: REAL (input signal)
T: REAL (time constant)
D: REAL (damping)
K: REAL (multiplier)
Output OUT_MAX: REAL (upper output limit)
FT_PT2 is an LZI transfer module having a second transfer characteristic
proportional order, even as a low pass flter 2 order known. The multiplier
K sets the gain (multiplier), T and D the time constant and the damping. If
the input T of T#0s is equal to the output OUT = K * IN.
The corresponding functional relationship in the time windows is given by
the following diferential equation:
T² * OUT''(T) + 2 * D* T * OUT'(T) + OUT(T) = K * in(T).
Structure diagram:
Step response for T = 1, K = 2, D = 0,2 / 1 / 5

23.28. FT_TN16

Type Function module
Input IN: REAL (input signal)
T: REAL (delay time)
Output OUT_MAX: REAL (upper output limit)
FT_TN16 delays an input signal by an adjustable time T and scanned it in
time T 16 times. After each update of the output signal OUT, TRIG is TRUE
for one cycle.

23.29. FT_TN64

Type Function module
Input IN: REAL (input signal)
T: REAL (delay time)
Output OUT_MAX: REAL (upper output limit)
FT_TN64 delays an input signal by an adjustable time T and scans it in
time T 64 times. After each update of the output signal OUT, TRIG is TRUE
for one cycle.

T

16
IN
OUT
0 1 2 14 15

T

64
IN
OUT
0 1 2 62 63

23.30. Ft_ TN8

Type Function module
Input IN: REAL (input signal)
T: REAL (delay time)
Output OUT_MAX: REAL (upper output limit)
FT_TN8 delays an input signal by an adjustable time T and scanned it in
time T by 8 times. After each update of the output signal OUT, TRIG is
TRUE for one cycle.

23.31. HYST

Type Function module
Input IN: REAL (input value)
ON: REAL (upper threshold)
OFF: REAL (lower threshold)
Output Q: BOOL (output)
WIN : BOOL (shows that lies in between ON and OFF)
HYST is a standard Hysteresis module, its function depends on the input
values ON and OFF.
Is ON > OFF then the output TRUE if IN > ON and is FALSE when IN < OFF.
Is ON < OFF then the output TRUE if IN < ON and is FALSE when IN > OFF.
The output WIN is TRUE if IN is between ON and OFF, is IN is out of range
ON - OFF WIN gets FALSE.

23.32. HYST_1

Type Function module
Input IN: REAL (input value)
HIGH: REAL (upper threshold)
LOW: REAL (lower threshold)
Output Q: BOOL (output)
WIN : BOOL (shows that IN in between LOW and HIGH)
HYST_1 is a hysteresis module that works with upper and lower limit. The
output Q is only true if the input signal at IN has exceeded the value HIGH.
It is then held true until the input signal falls below LOW and Q gets FALSE.
A further output WIN indicates whether the input signal is between LOW
and HIGH.
The following example shows a triangular wave generator with down-
stream hysteresis hysteresis module HYST_1.
The green line shows the input signal, red is the output hysteresis and
blue the WIN.

23.33. HYST_2

Type Function module
Input IN: REAL (input value)
VAL: REAL (mean of the hysteresis)
HYS: REAL (width of hysteresis)
Output Q: BOOL (output)
WIN : BOOL (shows that IN is in between LOW and HIGH)
HYST_2 hysteresis is a module for the logic thresholds by a mean and a
hysteresis is defned. The lower threshold value is VAL - HYS / 2 and the
upper threshold for VAL + HYS / 2
A detailed description of the hysteresis and an application example, see
HYST_1.

23.34. HYST_3

Type Function module
Input IN: REAL (input value)
HYST: REAL (width of hysteresis)
VAL1: REAL (mean of the hysteresis 1)
VAL2: REAL (mean of the hysteresis 2)
Output Q1: BOOL (Output 1)
Q2: BOOL (Output 2)
HYST_3 is a three-point controller. The three-point controller consists of
two hysteresis. Q1 is a hysteresis with val1 as the threshold and HYST as
hysteresis. Q1 is TRUE when IN is less than VAL1 - HYST / 2 and FALSE
when IN is greater than VAL1 + HYST / 2. Q2 is analogous to val2. The
three-point controller is used at all when motorized valves are controlled,
which then be controlled with Q1r fo on and Q2 for of. If the value of IN
between val1 and val2 both outputs are FALSE and the engine still stops.
Following Example shows the waveform of a 3-point controller:

23.35. INTEGRATE

Type Function module
Input E: BOOL ( Enable Input, Default = TRUE)
X: REAL (input)
K: REAL (Integration value in 1/s)
I / O Y: REAL ( IntegratorOutput)
INTEGRATE is a Integrator which integrates the value of X to an external
value Y. The integrator operates when E = TRUE, the internal Default of E
= TRUE.

23.36. AIR_DENSITY

Type Function : REAL
Input T: REAL (air temperature in ° C)
P: REAL (air pressure in Pascal)
RH: REAL (humidity in %)
Output (Density of air in kg / m³)
AIR_DENSITY calculates the density of air in kg / m³ depending on pressu-
re, humidity and temperature. The temperature is given in ° C, pressure in
Pascal and the humidity in % (50 = 50%).

23.37. AIR_ENTHALPY

Type Function : REAL
Input T: REAL (air temperature)
RH: REAL (Relative humidity of the air)
Output (Enthalpy of air in J/g)
AIR_ENTHALPY calculates the enthalpy of moist air from the statements T
for temperature in degrees Celsius and relative humidity RH in % (50 =
50%). The enthalpy is calculated in joules/gram.

23.38. BOILER

Type Function module
Input T_UPPER: REAL (input upper temperature sensor)
T_LOWER: REAL (lower input temperature sensor)
PRESSURE: REAL (input pressure sensor)
ENABLE: BOOL (hot water requirement)
REQ_1: BOOL (input requirements for predefned Temperature
1)
REQ_2: BOOL (input requirements for predefned Temperature
2)
BOOST: BOOL (input requirement for immediate
Deployment)
Output HEAT: BOOL (output loading circuit)
ERROR: BOOL (error signal)
STATUS: Byte (ESR compliant status output)
Setup T_UPPER_MIN: REAL (minimum temperature at top)
Default = 50
T_UPPER_MAX: REAL (maximum temperature at top)
Default = 60
T_LOWER_ENABLE : BOOL (FALSE, if lower
Temperature Sensor does not exist)
T_LOWER_MAX: REAL (maximum temperature of bottom)
Default = 60
T_REQUEST_1: REAL (temperature requirement 1)
Default = 70
T_REQUEST_2: REAL (temperature requirement 2)
Default = 50
T_REQUEST_HYS: REAL (hysteresis control) Default = 5
T_PROTECT_HIGH: REAL (upper limit temperature,
Default = 80)
T_PROTECT_LOW: REAL (lower limit temperature,
Default = 10)
BOILER is a Controllerfor bufers such as warm water bufer. With two se-
parate temperature sensor inputs also storage layers can be controlled.
With the setup variable T_LOWER_ENABLE the lower temperature sensor
can be switched on and of. When the input ENABLE = TRUE, the boiler is
heated (HEAT = TRUE) until the preset temperature T_LOWER_MAX rea-
ches the lower area of the bufer and then turn of the heater, until the
lower limit temperature of the upper region (T_UPPER_MIN) is reached. If
T_LOWER_ENABLE is set to FALSE, the lower sensor is not evaluated and it
control the temperature between T_UPPER_MIN and T_UPPER_MAX at the
top. A PRESSURE-input protects the boiler and prevents the heating, if not
enough water pressure in the boiler is present. If a pressure sensor is not
present, the input is unconnected. As further protection are the default va-
lues T_PROTECT_LOW (antifreeze) and T_PROTECT_HIGH are available and
prevent the temperature in the bufer to not exceed an upper limit and
also a lower limit. If an error occurs, the output ERROR is set to TRUE, whi-
le a status byte is reported at output STATUS, which can be further evalua-
ted by modules such as ESR_COLLECT. By a rising edge at input BOOST
the bufer temperature is directly heated to T_UPPER_MAX (T_LOWER_ENA-
BLE = FALSE) or T_LOWER_MAX (T_LOWER_ENABLE = TRUE). BOOST can
be used to impairment heating up the boiler when ENABLE is set to FALSE.
The heating by BOOST is edge-triggered and leads during each rising edge
at BOOST to exactly one heating process. Due to a rising edge on BOOST
while ENABLE = TRUE the heating is started immediately until the maxi-
mum temperature is reached. The boiler will be loaded to provide maxi-
mum heat capacity. The inputs REQ_1 and REQ_2 serve any time to provi-
de a preset temperature (or T_REQUEST_1 T_REQUEST_2). REQ can be
used for example to provide a higher temperature for legionella disinfecti-
on or for other purposes. The provision of the request temperatures is
made by measuring at the upper temperature sensor and with a 2-point
control whose hysteresis is set by T_REQUEST_HYS.
Status
1 upper temperature sensor has exceeded the upper limit temperature
2 upper temperature sensor has fallen below the lower limit temperature
3 lower temperature sensor has exceeded the upper limit temperature
4 lower temperature sensor has fallen below the lower limit temperature
5 Water pressure in the bufer is too small
100 Standby
101 BOOST recharge
102 Standard recharge
103 Recharge on Request Temperature 1
104 Recharge on Request Temperature 2
The following Example shows the application of a BOILER with a TIMER
and a public holiday mode:

23.39. BURNER

Type Function module
Input IN: BOOL (control input)
Stage2: BOOL (control input level 2)
OVER_TEMP: BOOL (temperature limit of the boiler)
OIL_TEMP: BOOL (thermostat of fuel oil warming)
FLAME: BOOL (fame sensor)
RST: BOOL (reset input for failure reset)
RST_TIMER: BOOL (reset for the service counter)
Output MOTOR: BOOL (control signal for the motor)
COIL1: BOOL (control signal for valve oil Level 1)
COIL2: BOOL (control input for oil valve stage 2)
PRE_HEAT: BOOL (fuel oil warming)
IGNITE: BOOL (ignition)
KWH: REAL (kilo watt hour meter)
STATUS: BYTE (ESR compliant status output)
FAIL: BOOL (fault: TRUE if error appearance)
I / O RUNTIME1: UDINT (operating time level 1)
Runtime2: UDINT (operating time level 2)
CYCLES: UDINT (number of burner starts)
Setup PRE_HEAT_TIME: TIME (maximum time for fuel oil warming)
PRE_VENT_TIME: TIME (prepurge)
PRE_IGNITE_TIME: TIME (pre ignition time)
POST_IGNITE_TIME: TIME (post ignition time)
STAGE2_DELAY: TIME (delay level 2)
SAFETY_TIME: TIME ()
LOCKOUT_TIME: TIME (time must elapse before with
a RST a interference can be deleted)
MULTIPLE_IGNITION: BOOL ()
KW1: REAL (burner output at level 1 in KW)
KW2: REAL (burner output at level 2 in KW)
BURNER is a control interface for oil or gas burner operating at kilowatt
hour meter and counter. The module controls a two-stage burner with op-
tional fuel oil warming. The input IN is the control input that starts the bur-
ner only when the input OVER_TEMP is FALSE. OVER_TEMP is the boiler
thermostat protection, which gets TRUE, if the boiler temperature has rea-
ched the maximum temperature. A burner start begins with the fuel oil
warming, by PRE_HEAT gets TRUE. Then it waits for a signal at the input
OIL_TEMP. If the signal OIL_TEMP is within the PRE_HEAT_TIME not TRUE
and the oil temperature is not reached, the start sequence is interrupted
and the output FAIL is set to TRUE. At the same time the error is spent at
the Output STATUS. After fuel oil warming the motor gets on and sets the
fan in operation. Then after a defned time the ignition is switched and the
oil valve is opened. If no response of the fame sensor after specifed time
(SAFETY_TIME), the module shows a failure. A fault is signaled even if the
fame sensor responds before the ignition. If after a successful ignition, the
fame breaks of and the set-variable MULTIPLE_IGNITION = TRUE, imme-
diately a ignition is started. A second stage is activated automatically after
the time STAGE2_DELAY when the input STAGE2 is TRUE.
If a fault occurs, then the module is locked for a fxed time LOCKOUT_TIME
and only after this time a RST can start the operation again. During the
LOCKOUT_TIME, the RST Input must be FALSE. A TRUE at input OVER_TEMP
stops immediately every action and reports the error 9.
The status output indicates the current state of the module:
110 = Wait for Start signal ( Standby )
111 = startup sequence is executed
112 = burner runs on stage 1
113 = burner runs at stage 2
A number of error conditions are provided at the output STATUS, if an error
is present:
1 = fuel oil warming has not responded within the PRE_HEAT_TIME
2 = fame sensor is active during fuel oil warming (PRE_HEAT_TIME)
3 = fame sensor is active during the aeration period
(PRE_VENTILATION_TIME)
4 = safety time ( Safety_Time) was passed without a fame
5 = fame stops in operation
9 = boiler overheating contact has tripped
Trace recording of a normal boot sequence:
The signal IN starts the sequence with the output PRE_HEAT. After rea-
ching the oil temperature (OIL_TEMP = TRUE), the engine started and the
PRE_VENTILATION_TIME (time from engine start until oil valve is open)
awaited. After an adjustable time (PPR_IGNITION_TIME) before opening the
oil valve, the ignition is turned on. The ignition is then on until the
POST_IGNITION_TIME has expired. The operating time per stage is measu-
red independently in seconds.
IN over
tem
p
Oil
tem
p
Flam
e
Rst mo-
tor
Oil
coil
Pre
hea
t
ig-
nite
Sta-
tus
fail
0 0 - - 0 0 0 0 0 110 0 Wait mode
1 0 0 0 0 0 0 1 0 111 0 fuel oil warming period
1 0 1 0 0 1 0 1 0 111 0 aeration period
1 0 1 0 0 1 0 1 1 111 0 pre ignition period
1 0 1 0 0 1 1 1 1 111 0 Open valve stage 1
1 0 1 1 0 1 1 1 1 112 0 Flame burns post ignition period
1 0 1 1 0 1 1 1 0 112 0 Burner is running
1 0 1 0 0 1 1 1 1 111 0 Post-ignition after fame stops
  • 1 - - - - - - - 9 1 Boiler overheating 1 0 1 1 0 1 0 1 0 3 1 foreign light failure
The following time diagram explains the various setup times and the
sequence:
The timing diagram refects the exact time line:
t1 = pre-heating (PRE_HEAT_TIME)
t2 = prepurge (PRE_VENT_Time)
t3 = pre ignition time (PRE_IGNITE_TIME)
t4 = safety time (SAFETY_TIME)
t5 = post ignition time (POST_IGNITE_TIME)
t6 = delay for stage 2 (STAGE2_DELAY)

23.40. DEW_CON

Type Function : REAL
Input RH: REAL (Relative Humidity)
T: REAL (temperature in °C)
Output REAL (water vapor concentration in g/m³)
The module DEW_CON calculates from the relative humidity (RH) and
temperature (T in °C) water vapor concentration in the air. The result is
calculated in grams/m³. RH is shown in % (50 = 50%) and indicates the
temperature in °C.
The module is suitable for temperatures from -40°C to +90°C.

23.41. DEW_RH

Type Function : REAL
Input VC: REAL (water vapor concentration in air, in grams / m³)
T: REAL (temperature in °C)
Output REAL (Relative humidity in %)
The module DEW_RH calculates the relative humidity in % (50 = 50%)
from the water vapor concentration (VC) and temperature (T in ° C). The
water vapor concentration is measured in grams / m³. DEW_CON can be
used for calculations in both directions (heat up and cool down). If cooled
too much, then the maximum relative humidity limited to 100%. For calcu-
lation of the dew point of the module DEW_TEMP is recommended.
In the following example, the case will be calculated when air is cooled
from 30°C and relative humidity of 50% by 6 degrees. The module
DEW_CON provides the moisture concentration in the outlet air of 30° and
DEW_RH calculates the resulting relative humidity RH of 69.7%. These cal-
culations are important when air is cooled or heated. In air conditioning
systems a resulting relative humidity of 100% hast to be avoided due to
condensation and the resulting problems.
See also the modules DEW_CON and DEW_TEMP.

23.42. DEW_TEMP

Type Function : REAL
Input RH: REAL (Relative Humidity)
T: REAL (temperature in °C)
Output REAL (dew point)
The module DEW_TEMP calculate the dew point temperature from the re-
lative humidity (RH) and temperature (T in ° C). The relative humidity is gi-
ven in % (50 = 50%).

23.43. HEAT_INDEX

Type Function : REAL
Input T: REAL (temperature in °C)
RH: REAL (Relative Humidity)
Output REAL ( Heat Temperature Index)
HEAT_INDEX calculates at high temperatures and high humidity wind chill.
The function is defned for temperatures above 20 ° C and relative humidi-
ty > 10%. For values outside the defned range, the input temperature is
passed out.

23.44. HEAT_METER

Type Function : REAL
Input TF: REAL (fow temperature in °C)
TR: REAL (back fow temperature in °C)
LPH: REAL (Flow in L/h or L/pulse)
E: BOOL ( Enable Signal)
RST: BOOL (asynchronous reset input)
Setup CP: REAL (Specifc heat capacity 2nd component)
DENSITY: REAL (density of the 2nd component)
CONTENT: REAL (share, 1 = 100%)
PULSE_MODE: BOOL (pulse counter if TRUE)
RETURN_METER: BOOL (fow meter in the return
if TRUE)
AVG_TIME: TIME (time interval for current consumption)
Output C: REAL (current consumption in joules/hour)
I / O Y: REAL (amount of heat in joules)
HEAT_METER is a calorimeter. The amount of heat Y is measured in joules.
The inputs of TF and TR are the forward and return temperature of the me-
dium. At the input LPH the fow rate in liters/hour, resp. the fow rate per
pulse of E is specifed. The property of E is determined by the Setup Varia-
ble PULSE_MODE. PULSE_MODE = FALSE means the amount of heat is ad-
ded continuously as long as E is set to TRUE. PULSE_MODE = TRUE means
the amount of heat with each rising edge of E is added up. The
PULSE_MODE is turned on the use of heat meters, while indicating the fow
rate in liters per pulse at the input LPH and the heat meter is connected
at the input E. If no fow meter is present, the the pump signal is connec-
ted at input E and at the input LPH given the pump capacity in liters per
hour. When using a fow meter with analog output is the output to be con-
verted to liters per hour and sent to the input LPH, the input E will be set
to TRUE. With the setup variables CP, DENSITY and CONTENT the 2nd
component of the medium is specifed. For operation with pure water no
details of CP, DENSITY and CONTENT are necessary. [fzy] If a mixture of
water and a 2nd media is present, with CP the specifc heat capacity in
J/KgK, with DENSITY the density in KG/l and with CONTENT the portion of
the 2nd component is specifed. A proportion of 0.5 means 50% and 1
would be equivalent to 100%. The setup variables RETURN_METER is spe-
cifed whether the fow meter sits in forward or reverse. RETRUN_METER =
TRUE for return measurement and FALSE for fow measurement. The out-
put C of the module represents the current consumption. The current con-
sumption is measured in joules/hour, and is determined at the intervals of
AVG_TIME.
The module has the following default values that are active when the cor-
responding values are not set by the user:
PULSE_MODE = FALSE
RETURN_METER = FALSE
AVG_TIME = T#5s

23.45. HEAT _TEMP

Type Function module
Input T_EXT: REAL (TAT)
T_INT: REAL (nominal room temperature)
OFFSET: REAL (lowering or raising the
Room temperature)
T_REQ: REAL (temperature requirement)
Output TY: REAL (heating circuit fow temperature)
HEAT: BOOL (heating requirement)
Setup TY_MAX: REAL (maximum heating circuit temperature, 70°C)
TY_MIN: REAL (minimum heating circuit temperature, 25°C)
TY_C: REAL (design temperature, 70°C)
T_INT_C: REAL (room design temperature, 20°C)
T_EXT_C: REAL (T_EXT at design temperature -15°C)
T_DIFF_C: REAL (forward / reverse diferential 10°C)
C: REAL (constant of the heating system, DEFAULT = 1.33)
H: REAL (threshold requirement for heating 3°C)
HEAT_TEMP calculates the fow temperature of the outside temperature by
the following formula:
TY = TR + T_DIFF / 2 * TX + (TY_Setup - T_DIFF / 2 - TR) * TX ^ (1 / C)
with: TR = T_INT + OFFSET
TX := (TR - T_EXT) / (T_INT_Setup - T_EXT_Setup);
The parameters of the heating curve are given by the setup variables
TY_C (design fow temperature), T_INT_C (room temperature at the design
point), T_EXT_C (outside temperature at the design point) and T_DIFF_C
(diference between forward / reverse at the design point). With the input
ofset, the heating curve of room reduction (negative ofset) or room
boost (positive ofset) can be adjusted. With the setup variables TY_MIN
and TY_MAX the fow temperature can be kept to a minimum and maxi-
mum value. The input T_REQ is used to support requirements such as ex-
ternal temperature from the boiler. If T_REQ is larger than the calculated
value of the heating curve for TY so TY is set to T_REQ. The limit of
TY_MAX does not apply to the request by T_REQ. The setup variable H de-
fne at what outside temperature the heating curve is calculated, as long
as T_EXT + H >= T_INT +OFFSET the TY stays at 0 and HEAT is FALSE. If
T_EXT + H < T_INT + OFFSET the HEAT is TRUE and TY outputs the calcu-
lated fow temperature. The setup variable C determines the curvature of
the heating curve. The curvature is dependent on the heating system.
Convectors: C = 1.25 – 1.45
Panel radiators: C = 1.20 – 1.30
Radiators: C = 1.30
Pipes: C = 1.25
Floor heating:C = 1.1
The larger the value of C, the stronger the heating curve is curved. A va-
lue of 1.0 gives a straight line as the heating curve. Typical heating sys-
tems are between 1.0 and 1.5.
The graph shows Heating curves for the design temperatures of 30 - 80°C
fow temperature at -20 ° C outside temperature and at a C of 1.33:

23.46. LEGIONELLA

Type Function module
Input MANUAL: BOOL (Manual Start Input)
TEMP_BOILER: REAL (boiler temperature)
TEMP_RETURN: REAL (temperature of the circulation pipe)
DT_IN: DATE_TIME (Current time of day and date)
RST: BOOL (Asynchronous Reset)
Output HEAT: BOOL (control signal for hot water heating)
PUMP: BOOL (control signal for circulation pump)
STATUS: Byte (ESR compliant status output)
Valve07: BOOL (control outputs for valves of circulation)
RUN: bool (true if sequence is running)
Setup T_START: TOD (time of day at which the disinfection starts)
DAY: INT (weekday on which the disinfection starts)
TEMP_SET : REAL (temperature of the boiler)
TEMP_OFFSET: REAL ()
TEMP_HYS: REAL ()
T_MAX_HEAT: TIME (maximum time to heat up the boiler)
T_MAX_RETURN: TIME (maximum time until the input
TEMP_RETURN to be active after VALVE)
TP_0  7: TIME (disinfection time for circles 07).
LEGIONELLA has an integrated timer, which starts on a certain day (DAY)
to a specifc time of day (T_START) the desinfection. For this purpose, the
external interface of the local time is needed (DT_IN). Each time can be
started the desinfection by hand with a rising edge at MANUAL.
The process of a disinfection cycle is started with an internal start due to
DT_IN, DAY and T_START, or by a rising edge at MANUAL. The output HEAT
is TRUE and controls the heating of the boiler. Within the heating time
T_MAX_HEAT the input signal TEMP_BOILER must go then to TRUE. If the
temperature is not reported within T_MAX_HEAT, the output STATUS pas-
ses fault. The disinfection then continues anyway. After the heating, the
heater temperature is measured and reheated if necessary by TRUE at the
output HEAT. When the boiler temperature is reached, PUMP gets TRUE
and the circulation pump is turned on. Then the individual valves are ope-
ned one after the other and measured, whether within the time
T_MAX_RETURN the temperature war reached at the return of the circulati-
on line. If a return fow thermometer is not present, the input T_MAX_RE-
TURN remains open.
The output STATE is compatible with ESR, and may give the following mes-
sages:
110 On hold
111 Sequence run
1 Boiler temperature was not reached
2 Return temperature at Ventil0 was not reached
38 Return temperature at valve17 was not reached
Schematic internal structure of Legionella:
The following example shows a simulation for 2 disinfection circuits with
trace recording. In this structure, VALVE2 connected to the input RST and
thus disrupts the sequence after of two circles:

23.47. SDD

Type Function : REAL
Input T: REAL (air temperature in ° C)
ICE: BOOL (TRUE for air over ice and FALSE for air over
water)
Output REAL (saturation vapor pressure in Pa)
SDD calculates the saturation vapor pressure for water vapor in air. The
temperature T is given in Celsius. The result can be calculated for air over
ice (ICE = TRUE) and for air to water (ICE = FALSE). The scope of the func-
tion is -30°C to 70°C over water and at -60°C to 0°C on ice. The calculati-
on is performed according to the Magnus formula.

23.48. SDD_NH3

Type Function : REAL
Input T: REAL (temperature in °C)
Output REAL (saturation vapor pressure in Pa)
SDD_NH3 calculates the saturation vapor pressure for ammonia (NH3).
The temperature T is given in Celsius. The scope of the function is located
at -109°C to 98°C.

23.49. SDT_NH3

Type Function : REAL
Input T: REAL (temperature in °C)
Output REAL (saturation vapor pressure in Pa)
SDT_NH3 calculates the saturation temperature for ammonia (NH3). The
pressure P is given in Celsius. The scope of the function is 0.001 bar to 60
bar.

23.50. T_AVG24

Type Function module
Input TS: INT (external temperature sensor)
DTI: DT (Date and time of day)
RST: BOOL (Reset)
Setup T_FILTER: TIME (T of the input flter)
SCALE: REAL:= 1.0 (scaling factor)
SFO: REAL (zero balance)
Output TA: REAL (Current outside temperature)
TP: BOOL (TRUE if T24 is renewed)
I / O T24: REAL (daily average temperature)
T24_MAX: REAL (Maximaltemp. in the last 24 hours)
T24_MIN: REAL (minimum temperature in the last 24 hours)
T_AVG24 determines the daily average temperature T24. The sensor input
TS is of type INT and is the temperature * 10 (a value of 234 means 23.4
°C). The data of flter run for noise suppression on a low-pass flter with
time T_FILTER. By scale and SFO a zero error, and the scale of the sensor
can be adjusted. At output TA shows the current outside temperature,
which is measured every hour and half hour. The module writes every 30
minutes the last, over the 48 values calculated daily average in the I / O
variable T24. This needs to be defned externally and thereby can be de-
fnded remanent or persistent. If the frst start a value of -1000 found in
T24, then the module initializes at the frst call with the current sensor va-
lue, so that every 30 minutes a valid average may be passed. If T24 has
any value other than -1000, then the module is initialized with this value
and calculates the average based on this value. This allows a power failure
and remanent storage of T24 an immediate working after restart. A reset
input can always force a restart of the module, which depending on the
value in T24, the module is initializes with either TS or the old value of
T24. If the module should be set on a particular average, the desired value
is written into T24 and then a reset generated.
T24_MAX and T24_MIN passes the maximum and minimum values of the
last 24 hours. To determine the maximum and minimum value, the tempe-
ratures of each half hour are considered. A temperature value that occurs
between 2 measurements is not considered.

23.51. TANK_VOL1

Type Function: REAL
Input TR : REAL (Radius of the tank)
TL: REAL (Length of the tank)
H: REAL (Filling height of the tank)
Output Real (Contents of the tank to the fll level)
TANK_VOL1 calculates the contents of a tube-shaped tanks flled to the
height H.

23.52. TANK_VOL2.

Type Function: REAL
Input TR : REAL (Radius of the tank)
H: REAL (Filling height of the tank)
Output Real (Contents of the tank to the fll level)
TANK_VOL2 calculates the contents of
a spherical tanks flled to the height H.

23.53. TEMP_EXT.

Type Function module
Input T_EXT1: REAL (external temperature sensor 1)
T_EXT2: REAL (external temperature sensor 2)
T_EXT3: REAL (external temperature sensor 3)
T_EXT_Setup: BYTE (query mode)
DT_IN: DATE_TIME (daytime)
Output T_EXT: REAL (output outside temperature)
HEAT: BOOL (heating signal)
COOL: BOOL (cooling signal)
Setup T_EXT_MIN: REAL (minimum outdoor temperature)
T_EXT_MAX: REAL (maximum outside temperature)
T_EXT_DEFAULT: REAL (default external temperature)
HEAT_PERIOD_START: DATE (start of heating season)
HEAT_PERIOD_STOP: DATE (end of heating season)
COOL_PERIOD_START: DATE (start of cooling period)
COOL_PERIOD_STOP: DATE (end of cooling period)
HEAT_START_TEAMP_DAY (heating trigger temperature day)
HEAT_START_TEAMP_NIGHT (heating trigger temperature night)
HEAT_STOP_TEMP: REAL (heating stop temperature)
COOL_START_TEAMP_DAY (cooling start temperature day)
COOL_START_TEMP_NIGHT (cooling start temperature night)
COOL_STOP_TEMP: REAL (cooling stop temperature)
START_DAY: TOD (start of the day)
START_NIGHT: TOD (early night)
CYCLE_TIME: TIME (query time for outside temperature)
TEMP_EXT processes up to 3 remote temperature sensor and provides by
mode a selected external temperature to the heating control. It calculates
signals for heating and cooling depending on outdoor temperature, date
and time. With the input T_EXT_Setup is defned how the output value
T_EXT is determined. If T_EXT_Setup is not connected, then the default va-
lue 0. The setup values T_EXT_MIN and T_EXT_Max set the minimum and
maximum value of the external temperature inputs. If these limits are ex-
ceeded or not reached, a fault in the sensor or broken wire is assumed and
instead of measured valued the default value T_EXT_DEFAULT is used.
T_EXT_Setup T_EXT
0 Average of T_EXT1, T_ext2 and T_ext3
1 T_EXT1

2 T_EXT2

3 T_EXT3

4 T_EXT_DEFAULT

5 Lowest value of the 3 inputs
6 Highest value of 3 inputs
7 Average value of 3 inputs
With the setup variables HEAT_PERIOD and COOL_PERIOD is defnes when
heating and when cooling is allowed. The decision, whether the output
HEAT or COOL gets TRUE, still depends on the setup values HEAT_START -
HEAT_STOP and COOL_START and COOL_STOP. These values can be def-
ned separately for day and night. The start of a day and night period can
be determined by the setup variables START_DAY and START_NIGHT. A va-
riable CYCLE_TIME specifes how often the outside temperature to be que-
ried.

23.54. WATER_CP

Type Function : REAL
Input T: REAL (water temperature in °C)
Output REAL (Specifc heat capacity at temperature T)
WATER_CP calculates the specifc heat capacity of liquid water as a functi-
on of temperature at atmospheric pressure. The calculation is valid in the
temperature range from 0 to 100 degrees Celsius and is calculated in
joules / (gram * kelvin). The temperature T is given in Celsius.

23.55. WATER_DENSITY

Type Function : REAL
Input T: REAL (temperature of the water)
SAT: BOOL (TRUE, if the water is saturated with air)
Output REAL (water density in grams / liter)
WATER_DENSITIY calculates the density of liquid water as a function of
temperature at atmospheric pressure. The temperature T is given in Celsi-
us. The highest density reached water at 3.983 °C with 999.974950 grams
per liter. WATER_DENSITY calculates the density of liquid water, not frozen
or evaporated water. WATER_DENSITY calculates the density of air-free wa-
ter when SAT = FALSE, and air-saturated water when SAT = TRUE. The cal-
culated values are calculated using an approximate formula and results
values with an accuracy greater than 0.01% in the temperature range of 0
  • 100°C at a constant pressure of 1013 mBar. The deviation of the density of air saturated with water is corrected accor- ding to the formula of Bignell. The dependence of the density of water pressure is relatively low at about 0.046 kg/m³ per 1 bar pressure increase, in the range up to 50 bar. The low pressure dependence has practical applications, no signifcant infu- ence.

23.56. WATER_ENTHALPY

Type Function : REAL
Input T: REAL (temperature of the water)
Output REAL (enthalpy of water in J/g at temperature T)
WATER_ENTHALPY calculates the Enthalpy (Heat content) of liquid water
as a function of temperature at atmospheric pressure. The temperature T
is given in Celsius. The calculation is valid for a temperature of 0 to 100 °
C and the result is the amount of heat needed to head the water from 0 °
C to a temperature of T. The result is expressed in joules / gram J / g and
passed as KJ/Kg. It is calculated by linear interpolation in steps of 10 ° and
thus reach a sufcient accuracy for non-scientifc applications. A possible
Application of WATER_ENTHALPY is to calculate the amount of energy nee-
ded, for example, to head a bufer tank at X (T2 - T1) degree. From the
energy required then the runtime of a boiler can be calculated exactly and
the required energy can be provided. Since there temperature readings
are signifcantly delays, with this method a better heating is possible in
practice.

23.57. WCT

Type Function : REAL
Input T: REAL (outdoor temperature in ° C)
V: REAL (Wind speed in km/h)
Output REAL (wind chill temperature)
WCT calculates the wind chill temperature depending on the wind speed in
km/h and the outside temperature °C. The wind chill temperature is def-
ned only for wind speeds greater than 5 km/h and temperatures below 10
°C. For values outside the defned range, the input temperature is output.