LIM_ALRMPLCopen motion icon

Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Detects High and Low limits of a signal with hysteresis.

Inputs

H : REAL    Value of the High limit
X : REAL    Input signal
L : REAL    Value of the Low limit
EPS : REAL  Value of the hysteresis

Outputs

QH : BOOL   TRUE if the signal exceeds the High limit
Q : BOOL    TRUE if the signal exceeds one of the limits (equals to QH OR QL)
QL : BOOL   TRUE if the signal exceeds the Low limit

Remarks

In FFLD language, the input rung (EN) is used for enabling the block. The output rung is the QH output.

ST Language

(* MyAlarm is a declared instance of LIM_ALRM function block *)
MyAlarm (H, X, L, EPS);
QH := MyAlarm.QH;
Q := MyAlarm.Q;
QL := MyAlarm.QL;

FBD Language

Lim_alrmFbd.gif (1526 octets)

FFLD Language

(* The block is not called if EN is FALSE *)
Lim_alrmLd.gif (1739 octets)

IL Language:

(* MyAlarm is a declared instance of LIM_ALRM function block *)
Op1: CAL MyAlarm (H, X, L, EPS)
     FFLD  MyAlarm.QH
     ST  QH
     FFLD  MyAlarm.Q
     ST  Q
     FFLD  MyAlarm.QL
     ST  QL

See also

ALARM_A   ALARM_M