Table of Contents

Limits

Block name

B82_LIMITS

ST call

PROGRAM TEST2_B82
 VAR 
 FB : LIB.CORE.V1_2.B82_LIMITS;
 IN_V:REAL;
 MAXIMUM_V:REAL:=20;
 MINIMUM_V:REAL:=0;
 OUT_V:REAL;
 END_VAR
FB(IN:=IN_V, MAXIMUM:=MAXIMUM_V, MINIMUM:=MINIMUM_V);
OUT_V:=FB.OUT;
END_PROGRAM

Library

LIB\CORE

Version

V1.2

Description

The block is limitating the input signal by upper and lower bounds. Using one limit only is possible, the other limit is infinite or -infinite.

Inputs

Input TypeDescription Default value
IN REALInput signal 0
MAXIMUMREALUpper signal limit1
MINIMUMREALLower signal limit0
MAXON BOOLEnable upper limitTrue
MINON BOOLEnable lower limitTrue

Outputs

OutputTypeDescription
OUT REALLimited output signal
SIGN BOOLSign of the output signal

Function

The block limits the input signal x by upper and lower limit.

Output sign is the sign of the output y. If y>= 0 then sign=true, otherwise sign=false.

Function in case of incorrect setting

When minon=maxon=true and maximum<minimum then y=maximum (lower value of both).

Application example


Function B82 with upper limit maximum=100.

Older version


VersionĀ  V1.0 was defined as a function. V1.1 is defined as a function block, therefore it can bes added to graphs and it can be set tu manual mode. Functionality remains without change.