MAX
Gives the maximum of two integer values.

Arguments | |||
---|---|---|---|
IN1 | IN1 | DINT | Any signed integer value |
IN2 | IN2 | DINT | (cannot be REAL) |
MAX | Q | DINT | Maximum of both input values |
Example
(* FBD Program using "MIN" and "MAX" Function *)

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