FB_BA_FixedLimitExt

FB_BA_FixedLimitExt 1:

The template represents a limit switch with dynamic limit values.

A tolerance range is defined around the value fIn to be monitored.

The tolerance range results from a high limit value HighLimitValue and a low limit value LowLimitValue.

If the value fIn exceeds the upper limit value of the tolerance range, then the output bHighLimit is set.

A response delay of the output bHighLimit can be parameterized with the time variable TiDly.

The binary object HighLimitOn is used to display bHighLimit and can be used as a fault message object by changing the parameterization.

If the value fIn falls below the lower limit value of the tolerance range, then the output bLowLimit is set.

A response delay of the output bLowLimit can be parameterized with the time variable TiDly.

The binary object LowLimitOn is used to display bLowLimit and can be used as a fault message object by changing the parameterization.

FB_BA_FixedLimitExt 2:

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

Block diagram

FB_BA_FixedLimitExt 3:

Syntax

FUNCTION_BLOCK FB_BA_FixedLimitExt EXTENDS FB_BA_View
VAR_INPUT
  bEn               : BOOL;
  fIn               : REAL;
  fHighVal          : REAL;
  fLowVal           : REAL;
END_VAR
VAR_OUTPUT
  bHighLimit        : BOOL;
  bLowLimit         : BOOL;
END_VAR
VAR_INPUT CONSTANT
  HighLimitValue    : FB_BA_AV_Op;
  LowLimitValue     : FB_BA_AV_Op;
  TiDly             : FB_BA_AV_Op;
  HighLimitOn       : FB_BA_BV;
  LowLimitOn        : FB_BA_BV;
END_VAR
VAR
  FixedLimit        : FB_BA_FixedLimitCtrl;
END_VAR

FB_BA_FixedLimitExt 4: Inputs

Name

Type

Description

bEn

BOOL

General enable of the template.

fIn

REAL

The analog value to be monitored is connected to the input, e.g. a differential pressure sensor.

fHighVal

REAL

The upper limit value of the tolerance range is connected to the input.

fLowVal

REAL

The lower limit value of the tolerance range is connected to the input.

FB_BA_FixedLimitExt 5: Outputs

Name

Type

Description

bHighLimit

BOOL

The output indicates that the upper limit value of the tolerance range has been exceeded.

bLowLimit

BOOL

The output indicates that the value has fallen below the lower limit of the tolerance range.

FB_BA_FixedLimitExt 6: Inputs CONSTANT

Name

Type

Description

HighLimitValue

FB_BA_AV_Op

Analog value object for entering the upper limit value of the tolerance range.

LowLimitValue

FB_BA_AV_Op

Analog value object for entering the lower limit value of the tolerance range.

TiDly

FB_BA_AV_Op

Analog value object for entering the response delay of the outputs bHighLimit and bLowLimit.

HighLimitOn

FB_BA_BV

The binary object is used to display bHighLimit and can be used as a fault message object by changing the parameterization.

LowLimitOn

FB_BA_BV

The binary object is used to display bHighLimit and can be used as a fault message object by changing the parameterization.

Variables

Name

Type

Description

FixedLimit

FB_BA_FixedLimitCtrl

Core of the template.

Requirements

Development environment

Necessary function

TwinCAT from v3.1.4024.35

TF8040 | TwinCAT Building Automation from V5.0.0.0