MIN (minimum)
Calculates the minimum of two integer values.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
MIN

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
EN | Input | BOOL | When set to true, the instruction is enabled.
|
IN1 | Input | DINT | Any signed integer value. |
IN2 | Input | DINT | Cannot be Real. |
MIN | Output | DINT | Minimum of both input values. |
ENO | Output | BOOL | Enables output. Applies to ladder diagram programs. |
MIN examples
MIN function block diagram example

MIN ladder diagram example

MIN structured text example

(* ST Equivalence: *) new_value := MAX (MIN (max_value, value), min_value); (* bounds the value to the [min_value..max_value] set *)
Results

Provide Feedback