FB_BA_LmtCtrl

Function block for determining the limits and its enable status

FB_BA_LmtCtrl 1:

Functional description

The function block is used to determine limit values (rHiLmt / rLoLmt) depending on the set operating mode and its enable (bQ).
The function block can be used for the following conditions, e.g. during a plant shutdown, at the moment of startup and until a plant is in a controlled state. During these phases, reporting of a loop object, for example, should be suppressed, in order to avoid sending of incorrect messages to the MCL (management and control level). Reporting of the loop object should not be activated until the air-conditioning system is fully running and the control is stable.

It is important that only via = FALSE can be reset. bQ bEn

Diagram 1

Diagram 1

FB_BA_LmtCtrl 2:

Diagram 2

FB_BA_LmtCtrl 3:

Inputs/outputs

VAR_INPUT

bEn           : BOOL;
rSp           : REAL;
rX            : REAL;
udiOpMod      : UDINT;
rHiVal        : REAL;
rLoVal        : REAL;
udiTiSttDly   : UDINT;[s]
udiTiSttAuto  : UDINT;[s]

bEn: enable function block. If bQ = TRUE, the output can only be reset, if bEn is set to FALSE.

rSp: setpoint

rX: actual value

udiOpMod: operating mode specification. You can choose between 3 modes. This results in

udiOpMod = 1 = fixed: rHiLmt = rHiVal and rLoLmt := rLoVal.It is important thatrLoValmust not be greater than or equal torHiVal. If this is the case, thenrHiLmt=rHiValandrLoLmt:=rHiVal- 0.05

udiOpMod = 2 = sliding absolute: the absolute value for the two input variables rHiVal / rLoVal is determined via the ABS function. rHiLmt = rSp + rHiVal and rLoLmt = rSp - rLoVal

udiOpMod = 3 = sliding percent: the function ABS is used to determine the absolute value for the two input variables rHiVal / rLoVal. The formulas for determining the limit values are: rHiLmt = rSp + ABS((rSp x rHiVal) / 100)); rLoHiLmt = rSp - ABS((rSp x rLoVal) / 100))

rHiVal: upper value for calculating the upper limit rHiLmt. The calculation of the upper limit value depends on the operating mode udiOpMod.

rLoVal: lower value for calculating the lower limit rLoLmt. The calculation of the lower limit value depends on the operating mode udiOpMod.

udiTiSttDly: Start delay for bQ, if function is met, see diagram 1.

udiTiSttAuto: automatic start delay. If bEn = TRUE, bQ becomes TRUE once the automatic delay has elapsed, see diagram 2.

VAR_OUTPUT

bQ               : BOOL;
rHiLmt           : REAL;
rLoLmt           : REAL;
udiRemTiSttDly   : UDINT;
udiRemTiSttAuto  : UDINT;

bQ: limit value monitoring is enabled. bQ can only be reset via bEn = FALSE.

rHiLmt: upper limit value for enabling limit value monitoring. The value depends on the operating mode udiOpMod

rLoLmt : lower limit value for enabling limit value monitoring. The value depends on the operating mode udiOpMod

udiRemTiSttDly: start delay countdown udiTiSttDly

udiRemTiSttAuto: automatic start delay countdown udiTiSttAuto

Requirements

Development environment

Target system

required library

required supplement

TwinCAT 2.11 R3/x64

PC/CX

TcBA library from V1.0.0

TS8040 | TwinCAT Building Automation from V1.0.0