MAX and MIN
MAX:
Finds the largest of two to five values.
MIN:
Finds the smallest of two to five values.
Instruction
MAX
Maximum
MIN
Minimum
Variables
Name
Meaning
In1 to InN
Data to
process
Out
Search
result
* If you omit the input parameter that connects to InN, the default value is not applied, and a building error will occur. For
example, if N is 3 and the input parameters that connect to In1 and In2 are omitted, the default values are applied, but if the
input parameter that connects to In3 is omitted, a building error will occur.
Bit strings
In1 to InN
Out
NY-series Instructions Reference Manual (W560)
Name
FB/FUN
FUN
FUN
I/O
Description
Input
Data to process, where N is
2 to 5
Output
Search result
OK OK OK OK OK OK OK OK OK OK
OK OK OK OK OK OK OK OK OK OK
Graphic expression
(@)MAX
EN
ENO
In1
Out
InN
(@)MIN
EN
ENO
In1
Out
InN
Valid range
Depends on data type.
Depends on data type.
Integers
2 Instruction Descriptions
ST expression
Out:=MAX(In1, In2, ···, InN);
Out:=MIN(In1, In2, ···, InN);
Unit
Default
---
0*
---
---
Times, durations,
dates, and text strings
2
2-345