On/Off controller - cooling

B30_ON_OFF_CONTROL_SEQUENCE

PROGRAM B30_TEST
VAR 
   IN1, IN2:REAL;
  O1: BOOL;
   FB: LIB.CORE.V1_1.B30_ON_OFF_CONTROL_SEQUENCE;
END_VAR
 
   FB(X:=IN1, W:= IN2);
    O1:= FB.OUT;
END_PROGRAM

LIB\CORE

V1.1

The block is an On/Off controller, parametrable according to CONTROLLERTYPE, bandwidth Xp, and offset OFF.

Input Type Description Default value
ENABLED BOOL Enable of operation True
X REAL Controlled value (e.g. temperature).0
W REAL Setpoint value (e.g. temperature). 22
CONTROLLERTYPECONTROLLERTYPEController type (Heating, Cooling). cooling
XP REAL Hysteresis 1
OFF REAL Offset, added to the setpoint W. 0
OutputTypeDescription
OUT BOOLOutput 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.

Note:
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).

  • © Energocentrum Plus, s.r.o. 2017 - 2024