FB_BA_ContStp

FB_BA_ContStp 1:

The function block FB_BA_ContStp determines the resulting control steps of a multi-level aggregate, depending on the continuous input signal fIn.

nActiveStep

nNumOfStep

fSwiOn

fSwiOff

nRemTiDlyOn

nRemTiDlyOff

bQ01

bQ02

bQ03

bQ04

bQ05

bQ06

bQ07

bQ08

0

0

fSwiOn01

fSwiOn01 - fHys01

nDlyOn01

 

FALSE

FALSE

FALSE

FALSE

FALSE

FALSE

FALSE

FALSE

1

> = 1

fSwiOn02

fSwiOn01 - fHys01

nDlyOn02

nDlyOff01

TRUE

FALSE

FALSE

FALSE

FALSE

FALSE

FALSE

FALSE

2

> = 2

fSwiOn03

fSwiOn02 - fHys02

nDlyOn03

nDlyOff02

TRUE

TRUE

FALSE

FALSE

FALSE

FALSE

FALSE

FALSE

3

> = 3

fSwiOn04

fSwiOn03 - fHys03

nDlyOn04

nDlyOff03

TRUE

TRUE

TRUE

FALSE

FALSE

FALSE

FALSE

FALSE

4

> = 4

fSwiOn05

fSwiOn04 - fHys04

nDlyOn05

nDlyOff04

TRUE

TRUE

TRUE

TRUE

FALSE

FALSE

FALSE

FALSE

5

> = 5

fSwiOn06

fSwiOn05 - fHys05

nDlyOn06

nDlyOff05

TRUE

TRUE

TRUE

TRUE

TRUE

FALSE

FALSE

FALSE

6

> = 6

fSwiOn07

fSwiOn06 - fHys06

nDlyOn07

nDlyOff06

TRUE

TRUE

TRUE

TRUE

TRUE

TRUE

FALSE

FALSE

7

> = 7

fSwiOn08

fSwiOn07 - fHys07

nDlyOn08

nDlyOff07

TRUE

TRUE

TRUE

TRUE

TRUE

TRUE

TRUE

FALSE

8

8

fSwiOn08

fSwiOn08 - fHys08

 

nDlyOff08

TRUE

TRUE

TRUE

TRUE

TRUE

TRUE

TRUE

TRUE

FB_BA_ContStp 2:

FB_BA_ContStp 3: Inputs

VAR_INPUT
  bEn         : BOOL;
  fIn         : REAL;
  fSwiOn01    : REAL;
  fSwiOn02    : REAL;
  fSwiOn03    : REAL;
  fSwiOn04    : REAL;
  fSwiOn05    : REAL;
  fSwiOn06    : REAL;
  fSwiOn07    : REAL;
  fSwiOn08    : REAL;
END_VAR

Name

Type

Description

bEn

BOOL

General enable of the function block. If bEn is FALSE, all message outputs bQ0N are also FALSE.

fIn

REAL

Continuous input value from which the switching states are derived.

fSwiOn0N

REAL

Switch-on point step 0N.

FB_BA_ContStp 4: Inputs CONSTANT PERSISTENT

VAR_INPUT CONSTANT PERSISTENT
  fHys01       : REAL := 5;
  fHys02       : REAL := 5;
  fHys03       : REAL := 5;
  fHys04       : REAL := 5;
  fHys05       : REAL := 5;
  fHys06       : REAL := 5;
  fHys07       : REAL := 5;
  fHys08       : REAL := 5;
  nDlyOn01     : UDINT;
  nDlyOff01    : UDINT;
  nDlyOn02     : UDINT;
  nDlyOff02    : UDINT;
  nDlyOn03     : UDINT;
  nDlyOff03    : UDINT;
  nDlyOn04     : UDINT;
  nDlyOff04    : UDINT;
  nDlyOn05     : UDINT;
  nDlyOff05    : UDINT;
  nDlyOn06     : UDINT;
  nDlyOff06    : UDINT;
  nDlyOn07     : UDINT;
  nDlyOff07    : UDINT;
  nDlyOn08     : UDINT;
  nDlyOff08    : UDINT;
  nNumOfStp    : UDINT := 4;
END_VAR

Name

Type

Description

fHys0N

REAL

Absolute value hysteresis step 0N.

nDlyOn0N

UDINT

Start-up delay step 0N.

nDlyOff0N

UDINT

Switch-off delay step 0N.

nNumOfStp

UDINT

Input of the number of steps required. The input is limited to a range from 0 to 8.

FB_BA_ContStp 5: Outputs

VAR_OUTPUT
  bQ01           : BOOL;
  bQ02           : BOOL;
  bQ03           : BOOL;
  bQ04           : BOOL;
  bQ05           : BOOL;
  bQ06           : BOOL;
  bQ07           : BOOL;
  bQ08           : BOOL;
  nActiveStep    : UDINT;
  fSwiOn         : REAL;
  fSwiOff        : REAL;
  nRemTiDlyOn    : UDINT;
  nRemTiDlyOff   : UDINT;
END_VAR

Name

Type

Description

bQ0N

BOOL

Shows state step 0N. The step can only be active when the preceding steps are TRUE.
TRUE = ON; FALSE = OFF

nActiveStep

UDINT

Indicates how many steps are switched on.

fSwiOn

REAL

Indicates the next switch-on point.

fSwiOff

REAL

Indicates the next switch-off point.

nRemTiDlyOn

UDINT

If the switch-on point for switching to the next step is reached, the remaining time of the start-up delay is displayed here.

nRemTiDlyOff

UDINT

If the switch-off point for switching down to the next step is reached, the remaining time of the switch-off delay is displayed here.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.22

Tc3_BA2 from v5.2.5.0