Documentation

P-Controller - Heating (B33)

Block name

B33_REVERSE_P_CONTROLLER

ST call

PROGRAM B33_TEST
VAR
XIN,WIN,COOLING:REAL;
FB: LIB.CORE.V1_0.B33_REVERSE_P_CONTROLLER;
END_VAR
FB(X:=XIN, W:=WIN, OUT=>COOLING);
END_PROGRAM

Library

LIB\CORE

Version

V1.0

Description

The block is an implementation of a P controller (with parameters: P-band, Offset, Min and Max values, and output value of an inactive controller).

Inputs

Input Type Description Default value
W REAL Setpoint (usually temperature). 0
X REAL Measured value (usually temperature). 0
CONTROLLERTYPE CONTROLLERTYPE Controller type (cooling/heating). cooling
ENABLED BOOL Controller enable (FALSE = controller is deactivated).). True
XP REAL Proportional band 30
OFF REAL Offset, added to the setpoint W. 0
MIN REAL Minimum output value OUT (usually 0). 0
MAX REAL Maximum output value OUT (usually 100). 100
DISVAL REAL Value of the OUT output when the controller is deactivated (ENABLED=FALSE) 0

Outputs

Output Type Description
OUT REAL Output signal (usually a valve, range 0 to 100%).

Function

There is a control deviation at the controller input, E=(W+OFF)-X. The controller output OUT is given by the relation OUT=-Xp/100×E+MIN, where XP is the proportional band. The resulting value is finally limited by MIN and MAX, see figure below. The ENABLED parameter switches the controller off (ENABLED=FALSE, controller disabled, and OUT=DISVAL). If Xp<0 then Xp=0, see below. If MAX<MIN then OUT=MAX (or minimum from (MIN, MAX)).

Application example