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 | Type | Description | Default value |
---|---|---|---|
IN | REAL | Input signal | 0 |
MAXIMUM | REAL | Upper signal limit | 1 |
MINIMUM | REAL | Lower signal limit | 0 |
MAXON | BOOL | Enable upper limit | True |
MINON | BOOL | Enable lower limit | True |
Output | Type | Description |
---|---|---|
OUT | REAL | Limited output signal |
SIGN | BOOL | Sign of the output signal |
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.
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.