FB_BA_Hys_02

FB_BA_Hys_02 1:

The template represents a sliding limit value monitoring with two switching points.

FB_BA_Hys_02 2:

The initialization of the template takes place within the method FB_Init.

Block diagram

FB_BA_Hys_02 3:

Syntax

FUNCTION_BLOCK FB_BA_Hys_01 EXTENDS FB_BA_View
VAR_INPUT
  bEn      : BOOL;
  fIn      : REAL;
  fOn      : REAL;
  fOff     : REAL;
END_VAR
VAR_OUTPUT
  bQ       : BOOL;
  bDst     : BOOL;
END_VAR
VAR_INPUT CONSTANT
  On       : FB_BA_AV_Op;
  Off      : FB_BA_AV_Op;
  Q        : FB_BA_BV;
END_VAR
VAR
  Swi2P    : FB_BA_Swi2P;
END_VAR

FB_BA_Hys_02 4: Inputs

Name

Type

Description

bEn

BOOL

General enable of the function block.

fIn

REAL

Actual value

fOn

REAL

Dynamic switch-on point

fOff

REAL

Dynamic switch-off point

FB_BA_Hys_02 5: Outputs

Name

Type

Description

bQ

BOOL

Output of the current state of the hysteresis function.

bDst

BOOL

Display of a fault or the BV object is active.

bDst is only active if the property bEventDetectionEnable of the BV object was set to TRUE.

The monitoring of the binary feedback indicates a fault.

FB_BA_Hys_02 6: Inputs CONSTANT

Name

Type

Description

On

FB_BA_AV_Op

AV object for input of the upper limit of the hysteresis function.

Off

FB_BA_AV_Op

AV object for input of the lower limit of the hysteresis function.

Q

FB_BA_BV

The binary object indicates the current state of the hysteresis function.

Variables

Name

Type

Description

Swi2P

FB_BA_Swi2P

The function block Swi2P is the core of the hysteresis function.

Requirements

Development environment

Necessary function

TwinCAT from v3.1.4024.35

TF8040 | TwinCAT Building Automation from V5.2.1.0