Skip to main content

7.7.3 MIN

Function

Take the minimum value function and assign the smallest value in IN1...INn to OUT

LD graphics

Alt text

Parameter description

Interface variableDeclarationData typeDescription
IN1Var_InputANY_ELEMENTARYComparison number 1
IN2Var_InputANY_ELEMENTARYComparison number 2
Function nameReturn valueANY_ELEMENTARYOutput 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:

alt text

  • 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);