FB_BA_StepCtrl08
Switching step function block, 8x
Functional description
The function block is used for issuing sequential control commands. A typical application for this function block is startup of an air conditioning system. bEn is used for general enable of the function block. If bEn = FALSE, all outputs of bQ01 to bQ08 are set to FALSE. The control sequence starts at input bEvt01. Once the timer udiDlyOn01 has elapsed, the corresponding output bQ01 is set. Further stages are activated after a rising edge at the inputs bEvt02 to bEvt08, in each case delayed via the timers udiDlyOn02 to udiDlyOn08. If bEvt01 becomes FALSE once the control chain is up and running, the control sequence switches back in reverse order. The switch-off of the outputs is delayed through the timers udiDlyOff01 to udiDlyOff08.
The outputs bUp and bDwn indicate whether the control chain is in ascending or descending state. The variable udiActvEvt indicates the current step of the control chain. "0" means the step sequence is not active. The output udiStep which shows the output udiActvEvt+1, is available for application with a BACnet multistate output object, which cannot show "0".
udiRemTiDlyOn indicates the time remaining to the next step during up-switching of the control chain. udiRemTiDlyOff indicates the time remaining to the next lower step during down-switching of the control chain.
Example
t0 step sequence switch-on
t1 step 1 switch-on udiDlyOn01 = t1 - t0
t2 event enable step 2, switch-on step 2, udiDlyOn02 = 0
t3 event enable step 3, switch-on step 3, udiDlyOn03 = 0
t4 event enable step 4, switch-on step 4, udiDlyOn04 = 0
t5 event enable step 5, switch-on step 5, udiDlyOn05 = 0
t6 step sequence switch-off, switch-off step 5, switch-off step 4; udiDlyOff05 = 0, udiDlyOff04 = 0
t7 switch-off step 3, udiDlyOff03 = t7 -t6
t8 switch-off step 2, udiDlyOff02 = t8 -t7
t9 switch-off step 1, udiDlyOff01 = t9 -t8
Inputs/outputs
VAR_INPUT
bEn : BOOL;
bEvt01 : BOOL;
udiDlyOn01 : UDINT;
udiDlyOff01 : UDINT;
bEvt02 : BOOL;
udiDlyOn02 : UDINT;
udiDlyOff02 : UDINT;
bEvt03 : BOOL;
udiDlyOn03 : UDINT;
udiDlyOff03 : UDINT;
bEvt04 : BOOL;
udiDlyOn04 : UDINT;
udiDlyOff04 : UDINT;
bEvt05 : BOOL;
udiDlyOn05 : UDINT;
udiDlyOff05 : UDINT;
bEvt06 : BOOL;
udiDlyOn06 : UDINT;
udiDlyOff06 : UDINT;
bEvt07 : BOOL;
udiDlyOn07 : UDINT;
udiDlyOff07 : UDINT;
bEvt08 : BOOL;
udiDlyOn08 : UDINT;
udiDlyOff08 : UDINT;
bEn: enable of the function block
bEvt01: control chain switch-on
udiDlyOn01: start-up delay for output bQ01 [s]
udiDlyOff01: switch-off delay for output bQ01 [s]
bEvt02: advance command step 2
udiDlyOn02: start-up delay for output bQ02 [s]
udiDlyOff02: switch-off delay for output bQ02 [s]
bEvt03: advance command step 3
udiDlyOn03: start-up delay for output bQ03 [s]
udiDlyOff03: switch-off delay for output bQ03 [s]
bEvt04: advance command step 4
udiDlyOn04: start-up delay for output bQ04 [s]
udiDlyOff04: switch-off delay for output bQ04 [s]
bEvt05: advance command step 5
udiDlyOn05: start-up delay for output bQ05 [s]
udiDlyOff05: switch-off delay for output bQ05 [s]
bEvt06: advance command step 6
udiDlyOn06: start-up delay for output bQ06 [s]
udiDlyOff06: switch-off delay for output bQ06 [s]
bEvt07: advance command step 7
udiDlyOn07: start-up delay for output bQ07 [s]
udiDlyOff07: switch-off delay for output bQ07 [s]
bEvt08: advance command step 8
udiDlyOn08: start-up delay for output bQ08 [s]
udiDlyOff08: switch-off delay for output bQ08 [s]
VAR_OUTPUT
bQ01 : BOOL;
bQ02 : BOOL;
bQ03 : BOOL;
bQ04 : BOOL;
bQ05 : BOOL;
bQ06 : BOOL;
bQ07 : BOOL;
bQ08 : BOOL;
bUp : BOOL;
bDwn : BOOL;
udiActvEvt : UDINT;
udiRemTiDlyOn : UDINT;
udiRemTiDlyOff : UDINT;
bQ01: step 1 on
bQ02: step 2 on
bQ03: step 3 on
bQ04: step 4 on
bQ05: step 5 on
bQ06: step 6 on
bQ07: step 7 on
bQ08: step 8 on
bUp: control chain is in ascending state
bDwn: control chain is in descending state
udiActvEvt: active step, display 0...8; "0" represents a non-active step sequence.
udiRTiDlyOn: remaining time until switching up to the next step [s]
udiRTiDlyOff: remaining time until switching down to the previous step [s]
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 |