Control2P
Control2P (FB)
Control2P (FB)FUNCTION_BLOCK Control2P
Short description
2-point controller with actual value / setpoint / enable and adjustable switching hysteresis The action (inverted / direct) is also adjustable.
Representation

Interfaces
Inputs
rX
REAL
Analog actual value
rW
REAL
Analog setpoint
xEn
BOOL
* FALSE: Controller locked * TRUE: Controller enabled
Outputs
xY
BOOL
Digital output signal
rDiff
REAL
Control deviation ( rX - rW )
rOnAt
REAL
Absolute switch-on point ( rW + rSwitchOnPoint )
rOffAt
REAL
Absolute switch-off point ( rW + rSwitchOffPoint )
Setpoints / parameters
rSwitchOffPoint
REAL
0.5
Switch-off point relative to setpoint rW
rSwitchOnPoint
REAL
-0.5
Switch-on point relative to setpoint rW
xOffCondition
BOOL
FALSE
State of the output xY at xEn = 0
xInitValue
BOOL
FALSE
State of the output xY after a restart
eAction
eControlMode
eControlMode.Inverted
Controller action (Inverted = heating, Direct = cooling)
eManModeB
eManBin
eManBin.Auto
Operating mode for the digital output signal xY
Function description
Enable input xEn
xEn
Control process
xY
rDiff
rOnAt
rOffAt
Notes
TRUE
TRUE
X
X
x
x
Enable of the control
FALSE
FALSE
xOffCondition ( if eManModeB = eManBin.Auto )
X
x
x
Locking of the control
Legend: X = any\
Digital output xY
The digital output xY is influenced by the enable input xEn, the control process and the manual override module.\
Control process
xEn
eManModeB
xY
Notes
FALSE
TRUE
eManBin.Auto
FALSE
Automatic operation - control process = FALSE
TRUE
TRUE
eManBin.Auto
TRUE
Automatic operation - control process = TRUE
X
FALSE
eManBin.Auto
xOffCondition
Automatic operation without enable
X
X
eManBin.ManOff
FALSE
Manual operation - Off
X
X
eManBin.ManOn
TRUE
Manual operation - On
Legend: X = any\
Control process
The controller can be operated in two different modes ( eAction = eControlMode.Inverted or eAction = eControlMode.Direct ). The following rules apply:\
eAction
Control
eControlMode.Inverted
rSwitchOnPoint < rSwitchOffPoint
eControlMode.Direct
rSwitchOnPoint > rSwitchOffPoint
If in operating mode eControlMode.Inverted the rSwitchOffPoint the rSwitchOnPoint, then the rSwitchOffPoint compared to the rSwitchOnPoint is increased by 0.1. If in operating mode eControlMode.Inverted the rSwitchOnPoint the rSwitchOffPoint, then the rSwitchOffPoint compared to the rSwitchOnPoint is reduced by 0.1. The output variables rDiff ( rX - rW ), absolute switch-on point rOnAt ( rW + rSwitchOnPoint ) and absolute switch-off point rOffAt ( rW + rSwitchOffPoint ) are available regardless of the enable input xEn always available.\
xEn
eAction
rDiff
xY
Notes
TRUE
eControlMode.Inverted
< rSwitchOnPoint
TRUE
Automatic operation - Inverted On
TRUE
eControlMode.Inverted
> rSwitchOffPoint
FALSE
Automatic operation - Inverted Off
TRUE
eControlMode.Direct
> rSwitchOnPoint
TRUE
Automatic operation - Direct On
TRUE
eControlMode.Direct
< rSwitchOffPoint
FALSE
Automatic operation - Direct Off
Legend: X = any In summary, the control process can alternatively be described as follows:\
xEn
eAction
rX
xY
Notes
TRUE
eControlMode.Inverted
< rOnAt
TRUE
Automatic operation - Inverted On
TRUE
eControlMode.Inverted
> rOffAt
FALSE
Automatic operation - Inverted Off
TRUE
eControlMode.Direct
> rOnAt
TRUE
Automatic operation - Direct On
TRUE
eControlMode.Direct
< rOffAt
FALSE
Automatic operation - Direct Off
Legend: X = don't care
CODESYS
InOut:
Input
rX
REAL
Input
rW
REAL
Input
xEn
BOOL
Input Const
rSwitchOffPoint
REAL
0.5
Input Const
rSwitchOnPoint
REAL
-0.5
Input Const
xOffCondition
BOOL
FALSE
Input Const
xInitValue
BOOL
FALSE
Input Const
eAction
eControlMode
eControlMode.Inverted
Input Const
eManModeB
eManBin
eManBin.Auto
Output
xY
BOOL
Output
rDiff
REAL
Output
rOnAt
REAL
Output
rOffAt
REAL
Last updated

