FB_BA_SlidingLimitCtrl

FB_BA_SlidingLimitCtrl 1:

The function block FB_BA_SlidingLimitCtrl is used to monitor a sliding setpoint.
The input bEn is used for general enabling of the function block.

To check the function of a control system, the actual value is compared with the setpoint of the controlled system.
If the deviation between the setpoint and the actual value is within the tolerance range fHys, then the control system is OK. If the actual value deviates from the setpoint by an amount outside this tolerance range over an extended period, the timer nDelay is started. After the timer has expired, if the control deviation remains, either the output bLowLimit or bHighLimit TRUE of the function block outputs a message.

FB_BA_SlidingLimitCtrl 2:

FB_BA_SlidingLimitCtrl 3: Inputs

VAR_INPUT
  bEn          : BOOL;
  fW           : REAL;
  fX           : REAL;
  fHys         : REAL;
  nDelay       : UDINT;
ENDVAR

Name

Type

Description

bEn

BOOL

General enable of the function block. If bEn is FALSE, the message outputs bHighLimit and bLowLimit are also FALSE.

fW

REAL

Setpoint

fX

REAL

Actual value

fHys

REAL

Hysteresis

nDelay

UDINT

Response delay [s] of the outputs bHighLimit/bLowLimit.
The input of the time is limited to the global parameter BAComn_Global.udiMaxSecInMilli from the Tc3_BA2_Common library (see BAComn_Global).

FB_BA_SlidingLimitCtrl 4: Outputs

VAR_OUTPUT
  bHighLimit         : BOOL;
  bLowLimit          : BOOL;
  fHighLimit         : REAL;
  fLowLimit          : REAL;
  nRemTiDelay        : UDINT;
END_VAR

Name

Type

Description

bHighLimit

BOOL

Upper limit value reached.

bLowLimit

BOOL

Lower limit value reached.

fHighLimit

REAL

Output of the upper limit value. fHighLimit = fW + (fHys / 2)

fLowLimit

REAL

Output of the lower limit value. fLowLimit = fW - (fHys / 2)

nRemTiDelay

UDINT

Remaining time after exceeding a limit value until one of the outputs bHighLimit or bLowLimit is set. The default comes from nDelay.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.22

Tc3_BA2 from v5.2.5.0