FB_BA_StepCtrl12

FB_BA_StepCtrl12 1:

The function block FB_BA_StepCtrl12 is used for output 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 bQ12 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 bEvt12, in each case delayed via the timers nDlyOn02 to nDlyOn12. 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 nDlyOff12, 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

FB_BA_StepCtrl12 2:

FB_BA_StepCtrl12 3: 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;
  bEvt09           : BOOL;
  nDlyOn09         : UDINT;
  nDlyOff09        : UDINT;
  bEvt10           : BOOL;
  nDlyOn10         : UDINT;
  nDlyOff10        : UDINT;
  bEvt11           : BOOL;
  nDlyOn11         : UDINT;
  nDlyOff11        : UDINT;
  bEvt12           : BOOL;
  nDlyOn12         : UDINT;
  nDlyOff12        : UDINT;
END_VAR

Name

Type

Description

bEn

BOOL

Function block enable

bEvt01…012

BOOL

Switch-on command for steps 1 to 12.

nDlyOn01…12

UDINT

Start-up delay for output bQ01…12 [s]

nDlyOff01…12

UDINT

Switch-off delay for output bQ01…12 [s]

FB_BA_StepCtrl12 4: Outputs

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;
  nActvEvt           : UDINT;
  nRemTiDlyOn        : UDINT;
  nRemTiDlyOff       : UDINT;
END_VAR

Name

Type

Description

bQ01...bQ12

BOOL

Step 1 to 12 On

bUp

BOOL

Control chain is in ascending state.

bDwn

BOOL

Control chain is in descending state.

nActvEvt

UDINT

Active step, display 0...12, "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