FB_BA_StepCtrl12
Switching step function block, 12x
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 bQ12 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 bEvt12, in each case delayed via the timers udiDlyOn02 to udiDlyOn12. 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 udiDlyOff12.
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;
bEvt09 : BOOL;
udiDlyOn09 : UDINT;
udiDlyOff09 : UDINT;
bEvt10 : BOOL;
udiDlyOn10 : UDINT;
udiDlyOff10 : UDINT;
bEvt11 : BOOL;
udiDlyOn11 : UDINT;
udiDlyOff11 : UDINT;
bEvt12 : BOOL;
udiDlyOn12 : UDINT;
udiDlyOff12 : UDINT;
bEn: Enable function block
bEvt01: Control chain switch-on
udiDlyOn01: Switch-on delay for output bQ01 [s]
udiDlyOff01: Switch-off delay for output bQ01 [s]
bEvt02: Advance command step 2
udiDlyOn02: Switch-on delay for output bQ02 [s]
udiDlyOff02: Switch-off delay for output bQ02 [s]
bEvt03: Advance command step 3
udiDlyOn03: Switch-on delay for output bQ03 [s]
udiDlyOff03: Switch-off delay for output bQ03 [s]
bEvt04: Advance command step 4
udiDlyOn04: Switch-on delay for output bQ04 [s]
udiDlyOff04: Switch-off delay for output bQ04 [s]
bEvt05: Advance command step 5
udiDlyOn05: Switch-on delay for output bQ05 [s]
udiDlyOff05: Switch-off delay for output bQ05 [s]
bEvt06: Advance command step 6
udiDlyOn06: Switch-on delay for output bQ06 [s]
udiDlyOff06: Switch-off delay for output bQ06 [s]
bEvt07: Advance command step 7
udiDlyOn07: Switch-on delay for output bQ07 [s]
udiDlyOff07: Switch-off delay for output bQ07 [s]
bEvt08: Advance command step 8
udiDlyOn08: Switch-on delay for output bQ08 [s]
udiDlyOff08: Switch-off delay for output bQ08 [s]
bEvt09: Advance command step 9
udiDlyOn09: Switch-on delay for output bQ09 [s]
udiDlyOff09: Switch-off delay for output bQ09 [s]
bEvt10: Advance command step 10
udiDlyOn10: Switch-on delay for output bQ10 [s]
udiDlyOff10: Switch-off delay for output bQ10 [s]
bEvt11: Advance command step 11
udiDlyOn11: Switch-on delay for output bQ11 [s]
udiDlyOff11: Switch-off delay for output bQ11 [s]
bEvt12: Advance command step 12
udiDlyOn12: Switch-on delay for output bQ12 [s]
udiDlyOff12: Switch-off delay for output bQ12 [s]
VAR_OUTPUT
bQ01 : BOOL;
bQ02 : BOOL;
bQ03 : BOOL;
bQ04 : BOOL;
bQ05 : BOOL;
bQ06 : BOOL;
bQ07 : BOOL;
bQ08 : BOOL;
bQ09 : BOOL;
bQ10 : BOOL;
bQ11 : BOOL;
bQ12 : 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
bQ09: step 9 on
bQ10: step 10 on
bQ11: step 11 on
bQ12: step 12 on
bUp: control chain is in ascending state
bDwn: control chain is in descending state
udiActvEvt: active step, display 0...12; "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 |