FB_BA_Hys_03

FB_BA_Hys_03 1:

The template represents a sliding limit value monitoring with two switching points which, in contrast to FB_BA_Hys_02, are subject to switch-on and switch-off delays.

The switch-on and switch-off thresholds as well as the time delays are entered via analog objects.

FB_BA_Hys_03 2:

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

Block diagram

FB_BA_Hys_03 3:

Syntax

FUNCTION_BLOCK FB_BA_Hys_03 EXTENDS FB_BA_View
VAR_INPUT
  bEn                             : BOOL;
  fIn                             : REAL;
END_VAR
VAR_OUTPUT
  bPresentValue                   : BOOL;
  bEvent                          : BOOL;
END_VAR
VAR_INPUT CONSTANT
  On                              : FB_BA_AV_Op;
  Off                             : FB_BA_AV_Op;
  DlyOn                           : FB_BA_AV_Op;
  DlyOff                          : FB_BA_AV_Op;
  Q                               : FB_BA_BV;
END_VAR
VAR
  Swi2P                           : FB_BA_Swi2P;
END_VAR

FB_BA_Hys_03 4: Inputs

Name

Type

Description

bEn

BOOL

General enable of the function block.

fIn

REAL

Process value

FB_BA_Hys_03 5: Outputs

Name

Type

Description

bPresentValue

BOOL

Output of the current state of the hysteresis function.

bEvent

BOOL

Display of a fault or the BV object is active.

bEvent 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_03 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.

DlyOn

FB_BA_AV_Op

AV object for entering the switch-on delay in seconds.

DlyOff

FB_BA_AV_Op

AV object for entering the switch-off delay in seconds.

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