FB_BA_StepCtrl12

FB_BA_StepCtrl12 1:

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_sec (see Parameters) 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_sec to udiDlyOn12_sec. If bEvt01 becomes FALSE once the control chain is up and running, the control sequence switches back in reverse order. Switching off of the outputs is delayed by the timers udiDlyOff01_sec to udiDlyOff12_sec; see Parameters.

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 udiRemTiDlyOn_sec indicates the time remaining to the next step during up-switching of the control chain. The output udiRemTiDlyOff_sec indicates the time remaining to the next lower step during down-switching of the control chain.

Example

FB_BA_StepCtrl12 2:

VAR_INPUT

bEn              : BOOL;
bEvt01           : BOOL;
udiDlyOn01_sec   : UDINT;
udiDlyOff01_sec  : UDINT;
bEvt02           : BOOL;
udiDlyOn02_sec   : UDINT;
udiDlyOff02_sec  : UDINT;
bEvt03           : BOOL;
udiDlyOn03_sec   : UDINT;
udiDlyOff03_sec  : UDINT;
bEvt04           : BOOL;
udiDlyOn04_sec   : UDINT;
udiDlyOff04_sec  : UDINT;
bEvt05           : BOOL;
udiDlyOn05_sec   : UDINT;
udiDlyOff05_sec  : UDINT;
bEvt06           : BOOL;
udiDlyOn06_sec   : UDINT;
udiDlyOff06_sec  : UDINT;
bEvt07           : BOOL;
udiDlyOn07_sec   : UDINT;
udiDlyOff07_sec  : UDINT;
bEvt08           : BOOL;
udiDlyOn08_sec   : UDINT;
udiDlyOff08_sec  : UDINT;
bEvt09           : BOOL;
udiDlyOn09_sec   : UDINT;
udiDlyOff09_sec  : UDINT;
bEvt10           : BOOL;
udiDlyOn10_sec   : UDINT;
udiDlyOff10_sec  : UDINT;
bEvt11           : BOOL;
udiDlyOn11_sec   : UDINT;
udiDlyOff11_sec  : UDINT;
bEvt12           : BOOL;
udiDlyOn12_sec   : UDINT;
udiDlyOff12_sec  : UDINT;

bEn: Enable function block.

bEvt01..12: Switch-on command for steps 1 to 12.

udiDlyOn01..12_sec: Switch-on delay for output bQ01 .. 12 [s].

udiDlyOff01..12_sec: Switch-off delay for output bQ01 .. 12 [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_sec  : UDINT;
udiRemTiDlyOff_sec : UDINT;

bQ01..12: Step 1 to 12 On.

bUp: Control chain is in ascending state.

bDwn: Control chain is in descending state.

udiActvEvt: Active step, display 0..12; "0" represents an active step sequence.

udiRTiDlyOn: Time remaining to up-switching to the next step [s].

udiRTiDlyOff: Time remaining to down-switching to the previous step [s].

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.7

Tc3_BA from v1.1.6.0