On-Off Control - Cooling (B30)
FB(X:=IN1, W:= IN2);
The block is an On/Off controller, parametrable according to CONTROLLERTYPE, bandwidth Xp, and offset OFF.
||Enable of operation
||Controlled value (e.g. temperature).
||Setpoint value (e.g. temperature).
||Controller type (Heating, Cooling).
||Offset, added to the setpoint W.
||Output signal (usually heating element, chiller etc.).
The output variable "OUT" has a flag since function block version 1.1 RETAIN to keep the last state when the PLC is restarted.
The block is an implementation of a 2-state controller, or On/Off controller, where X is the controlled value, and W+OFF is the setpoint (the OFF parameter is an offset). It works as follows: Supposing temperature X is too high, then OUT=TRUE and cooling (if CONTROLLERTYPE=COOLING) is activated. As soon as the measured temperature X drops below W+OFF, the block sets OUT=FALSE and cooling goes off, which results in the temperature X rising. When temperature rises above X=W+OFF+XP, then OUT=TRUE, and cooling is activated again. Temperature drops and the whole process repeats.
The offset OFF is used to compensate the W parameter. There are 3 ways to set the offset, see below. Off = 0: Cooling controller. Off = -Xp : Maximum level controller.
The ENABLED parameter may switch the controller off. When ENABLED=FALSE, then the controller is off and OUT=FALSE.
When X= W+OFF then OUT=FALSE. When X = W+OFF+XP then OUT is not defined (it depends if it is reached from left or right).