Limits

B82_LIMITS

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

LIB\CORE

V1.2

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.

Input TypeDescription Default value
IN REALInput signal 0
MAXIMUMREALUpper signal limit1
MINIMUMREALLower signal limit0
MAXON BOOLEnable upper limitTrue
MINON BOOLEnable lower limitTrue
OutputTypeDescription
OUT REALLimited output signal
SIGN BOOLSign of the output signal

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

  • When minon=true, the signal x is limited by the lower bound minimum.
  • When minon=false, the low limit is not used.
  • When maxon=true, the signal x is limited by the upper bound maximum.
  • When maxon=false, the high limit is not used.

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

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


Function B82 with upper limit maximum=100.


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.

  • © Energocentrum Plus, s.r.o. 2017 - 2024