7.7.3 MIN
Function
Take the minimum value function and assign the smallest value in IN1...INn to OUT
LD graphics
Parameter description
| Interface variable | Declaration | Data type | Description |
|---|---|---|---|
| IN1 | Var_Input | ANY_ELEMENTARY | Comparison number 1 |
| IN2 | Var_Input | ANY_ELEMENTARY | Comparison number 2 |
| Function name | Return value | ANY_ELEMENTARY | Output minimum value |
warning
- The parameter types of parameters IN1, IN2 and OUT must be the same, otherwise the function cannot be executed
- MIN is an extensible function, and inputs can be added by clicking the "+" in the graph
- ANY_ELEMENTARY includes all basic types (bit strings, integers, floating point numbers, characters and strings, times and dates)
- LD example is shown in the following animation:

- ST example is shown in the following code:
OUT:=MIN(IN1:=10,IN2:=100);
OUT2:=MIN(IN1:=10,IN2:=100,IN3:=1000,IN4:=10000,IN5:=50000);