Name :Take the minimum value

Symbol :MIN

Illustrate:

        The function of this type of module is to assign the smaller of input parameter 1 and input parameter 2 to the output parameter OUT.

Image:

Parameter:

Parameter | Statement | Type | Description
--- | --- | --- | ---
IN1 | Input | BOOL/BYTE/WORD/DWORD/INT/SINT/DINT/UINT/USINT/UDINT/REAL/TIME/STRING |
    The first input value
IN2 | Input | BOOL/BYTE/WORD/DWORD/INT/SINT/DINT/UINT/USINT/UDINT/REAL/TIME/STRING |
    The second input value
OUT | Output | BOOL/BYTE/WORD/DWORD/INT/SINT/DINT/UINT/USINT/UDINT/REAL/TIME/STRING |
    Output value

Example:

LD:

ST:

TagOut:=MIN(IN1:=TagIn1,IN2:=TagIn2);

Interpretation:

parameter | operand | value
--- | --- | ---
IN1 | TagIn1 | Enter a value：100
IN2 | TagIn2 | Enter a value：1
OUT | TagOut | Output value：1

        IN1 and IN2 input the corresponding types of data, and MIN outputs the minimum value of the two.