Name :Limiting operations

Symbol :LIMIT

Illustrate:

        The function of this type of module is to limit the input parameter IN. WHEN IN IS IN THE INTERVAL [MIN,MAX], THE OUTPUT PARAMETER IS EQUAL TO THE INPUT PARAMETER IN, WHEN IN > MAX, THE OUTPUT PARAMETER IS EQUAL TO MAX, WHEN IN < MIN, THE OUTPUT PARAMETER IS EQUAL TO MIN, IF MAX < MIN, OUT=MIN.

Image:

Parameter:

Parameter | Statement | Type | Description
--- | --- | --- | ---
IN | Input | BOOL/BYTE/WORD/DWORD/INT/SINT/DINT/UINT/USINT/UDINT/REAL/TIME/STRING |
    The first input value
MN | Input | BOOL/BYTE/WORD/DWORD/INT/SINT/DINT/UINT/USINT/UDINT/REAL/TIME/STRING |
    The second input value
MX | Input | BOOL/BYTE/WORD/DWORD/INT/SINT/DINT/UINT/USINT/UDINT/REAL/TIME/STRING |
    Third, enter the value
OUT | Output | BOOL/BYTE/WORD/DWORD/INT/SINT/DINT/UINT/USINT/UDINT/REAL/TIME/STRING |
    Output value

Example:

LD:

ST:

TagOut:=LIMIT(IN:=TagIn,MN:=TagMn,MX:=TagMx);

Interpretation:

parameter | operand | value
--- | --- | ---
IN1 | TagIn | Enter a value：100
MN | TagMn | Enter a value：50
MX | TagMx | Enter a value：200
OUT | TagOut | Output value：100

        IN1, MN, and MX input the corresponding type of data, and LIMIT outputs the limiting value.