FB_BA_StepCtrl08
The function block FB_BA_StepCtrl08 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 from bQ01 to bQ08 are set to FALSE. The control sequence starts at input bEvt01. Once the timer nDlyOn01 (see Parameters) has elapsed, the corresponding output bQ01 is set. Further steps are activated after a rising edge at the inputs bEvt02 to bEvt08, in each case delayed via the timers nDlyOn02 to nDlyOn08. If bEvt01 becomes FALSE once the control chain is up and running, the control sequence switches back in reverse order. The switching off of the outputs is delayed by the timers nDlyOff01 to nDlyOff08, see parameters.
The outputs bUp and bDwn indicate whether the control chain is in ascending or descending state. The variable nActvEvt indicates the current step of the control chain. "0" means the step sequence is not active.
The output nRemTiDlyOn indicates the time remaining to the next step during up-switching of the control chain. The output nRemTiDlyOff indicates the time remaining to the next lower step during down-switching of the control chain.
Sample
- t0 step sequence switch-on
- t1 switch on step 1 nDlyOn01 = t1 - t0
- t2 event enable step 2, switch on step 2, nDlyOn02 = 0
- t3 event enable step 3, switch on step 3, nDlyOn03 = 0
- t4 event enable step 4, switch on step 4, nDlyOn04 = 0
- t5 event enable step 5, switch on step 5, nDlyOn05 = 0
- t6 disable the step sequence, disable step 5, disable step 4; nDlyOff05 = 0, nDlyOff04 = 0
- t7 switch off step 3, nDlyOff03 = t7 -t6
- t8 switch off step 2, nDlyOff02 = t8 -t7
- t9 switch off step 1, nDlyOff01 = t9 -t8
Inputs
VAR_INPUT
bEn : BOOL;
bEvt01 : BOOL;
nDlyOn01 : UDINT;
nDlyOff01 : UDINT;
bEvt02 : BOOL;
nDlyOn02 : UDINT;
nDlyOff02 : UDINT;
bEvt03 : BOOL;
nDlyOn03 : UDINT;
nDlyOff03 : UDINT;
bEvt04 : BOOL;
nDlyOn04 : UDINT;
nDlyOff04 : UDINT;
bEvt05 : BOOL;
nDlyOn05 : UDINT;
nDlyOff05 : UDINT;
bEvt06 : BOOL;
nDlyOn06 : UDINT;
nDlyOff06 : UDINT;
bEvt07 : BOOL;
nDlyOn07 : UDINT;
nDlyOff07 : UDINT;
bEvt08 : BOOL;
nDlyOn08 : UDINT;
nDlyOff08 : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
bEn | BOOL | Function block enable |
bEvt01…08 | BOOL | Switch-on command for steps 1 to 8. |
nDlyOn01…08 | UDINT | Start-up delay for output bQ01…08 [s] |
nDlyOff01…08 | UDINT | Switch-off delay for output bQ01…08 [s] |
Outputs
VAR_OUTPUT
bQ01 : BOOL;
bQ02 : BOOL;
bQ03 : BOOL;
bQ04 : BOOL;
bQ05 : BOOL;
bQ06 : BOOL;
bQ07 : BOOL;
bQ08 : BOOL;
bUp : BOOL;
bDwn : BOOL;
nActvEvt : UDINT;
nRemTiDlyOn : UDINT;
nRemTiDlyOff : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
bQ01...bQ08 | BOOL | Step 1 to 8 On |
bUp | BOOL | Control chain is in ascending state. |
bDwn | BOOL | Control chain is in descending state. |
nActvEvt | UDINT | Active step, display 0...8, "0" means not active step sequence. |
nRemTiDlyOn | UDINT | Time remaining to up-switching to the next step [s]. |
nRemTiDlyOff | UDINT | Time remaining to down-switching to the previous step [s]. |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.22 | Tc3_BA2 from v5.2.5.0 |