FB_BA_Hys_01

FB_BA_Hys_01 1:

The template represents a hysteresis function with fixed switching points.

FB_BA_Hys_01 2:

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

Block diagram

FB_BA_Hys_01 3:

Syntax

FUNCTION_BLOCK FB_BA_Hys_01 EXTENDS FB_BA_View
VAR_INPUT
  bEn      : BOOL;
  fIn      : 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_01 4: Inputs

Name

Type

Description

bEn

BOOL

General enable of the function block.

fIn

REAL

Actual value

FB_BA_Hys_01 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_01 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