FB_BA_Cont4Stp01

Step switch with 4 levels

Interface

FB_BA_Cont4Stp01 1:

Functional description

The function block determines the resulting switching stages of a multi-level unit, depending on the input signal.
Four switch-on thresholds and four hysteresis values can be parameterised.

Diagram 01

Direction of action bActn = FALSE = reverse = heating

FB_BA_Cont4Stp01 2:

udiStp

udiNumOfStp

rSwiOn

rSwiOff

udiRemTiDlyOn

udiRemTiDlyOff

bQ01

bQ02

bQ03

bQ04

0

0

rSwiOn01

rSwiOn01 - rHys01

udiDlyOn01

0

FALSE

FALSE

FALSE

FALSE

1

>= 1

rSwiOn02

rSwiOn01 - rHys01

udiDlyOn02

udiDlyOff01

TRUE

FALSE

FALSE

FALSE

2

>= 2

rSwiOn03

rSwiOn02 - rHys02

udiDlyOn03

udiDlyOff02

TRUE

TRUE

FALSE

FALSE

3

>= 3

rSwiOn04

rSwiOn03 - rHys03

udiDlyOn04

udiDlyOff03

TRUE

TRUE

TRUE

FALSE

4

>= 4

rSwiOn04

rSwiOn04 - rHys04

0

udiDlyOff04

TRUE

TRUE

TRUE

TRUE

Diagram 02

Direction of action bActn =TRUE = direct = cooling

FB_BA_Cont4Stp01 3:

udiStp

udiNumOfStp

rSwiOn

rSwiOff

udiRemTiDlyOn

udiRemTiDlyOff

bQ01

bQ02

bQ03

bQ04

0

0

rSwiOn01

rSwiOn01 + rHys01

udiDlyOn01

0

FALSE

FALSE

FALSE

FALSE

1

>= 1

rSwiOn02

rSwiOn01 + rHys01

udiDlyOn02

udiDlyOff01

TRUE

FALSE

FALSE

FALSE

2

>= 2

rSwiOn03

rSwiOn02 + rHys02

udiDlyOn03

udiDlyOff02

TRUE

TRUE

FALSE

FALSE

3

>= 3

rSwiOn04

rSwiOn03 + rHys03

udiDlyOn04

udiDlyOff03

TRUE

TRUE

TRUE

FALSE

4

4

rSwiOn04

rSwiOn04 + rHys04

0

udiDlyOff04

TRUE

TRUE

TRUE

TRUE

Diagram 03

Timing of the switch-on and switch-off delays

At time t1 rIn changes from £rSwiOn01 to rSwiOn04

At time t2 rIn changes from rSwiOn04 to £ rSwiOn01 – rHys01

FB_BA_Cont4Stp01 4:

Inputs/outputs

VAR_INPUT

bEn          : BOOL;
rIn          : REAL;
rSwiOn01     : REAL;
rHys01       : REAL;
udiDlyOn01   : UDINT;
udiDlyOff01  : UDINT;
rSwiOn02     : REAL;
rHys02       : REAL;
udiDlyOn02   : UDINT;
udiDlyOff02  : UDINT;
rSwiOn03     : REAL;
rHys03       : REAL;
udiDlyOn03   : UDINT;
udiDlyOff03  : UDINT;
rSwiOn04     : REAL;
rHys04       : REAL;
udiDlyOn04   : UDINT;
udiDlyOff04  : UDINT;
udiNumOfStp  : UDINT;
bActn        : BOOL;

bEn: General enable of the function block. If bEn is FALSE, all outputs are set to 0.

rIn: Input value, from which the switching state is derived.

rSwiOn01: Switch-on point level 01

rHys01: Absolute value hysteresis level 01

udiDlyOn01: Switch-on delay level 01

udiDlyOff01: Switch-off delay level 01

rSwiOn02: Switch-on point level 02

rHys02: Absolute value hysteresis level 02

udiDlyOn02: Switch-on delay level 02

udiDlyOff02: Switch-off delay level 02

rSwiOn03: Switch-on point level 03

rHys03: Absolute value hysteresis level 03

udiDlyOn03: Switch-on delay level 03

udiDlyOff03: Switch-off delay level 03

rSwiOn04: Switch-on point level 04

rHys04: Absolute value hysteresis level 04

udiDlyOn04: Switch-on delay level 04

udiDlyOff04: Switch-off delay level 04

udiNumOfStp: Number levels that are required.
The input is limited to a range from 0 to 4

bActn: Input variable used to determine the direction of action of the step switch.
TRUE = direct = cooling; FALSE = reverse = heating

VAR_OUTPUT

bQ01           : BOOL;
bQ02           : BOOL;
bQ03           : BOOL;
bQ04           : BOOL;
udiStp         : UDINT;
rSwiOn         : REAL;
rSwiOff        : REAL;
udiRemTiDlyOn  : UDINT;
udiRemTiDlyOff : UDINT;

bQ01: display of status step 01
TRUE = ON; FALSE = OFF
udiStp >= 1

bQ02: display of status step 02
TRUE = ON; FALSE = OFF
udiStp >= 2

bQ03: display of status step 03
TRUE = ON; FALSE = OFF
udiStp >= 3

bQ04: display of status step 04
TRUE = ON; FALSE = OFF
udiStp >= 4

udiStp: shows the current step of the step switch

rSwiOn: display of the next switch-on point

rSwiOff: display of the next switch-off point

udiRemTiDlyOn: if the switch-on point for switching to the next level is met, the progress of the switch-on delay time is displayed here.

udiRemTiDlyOff: if the switch-off point for switching down to the next level is met, the progress of the switch-off delay time is displayed here.

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