2 Instruction Descriptions
2-310
NJ-series Instructions Reference Manual (W502)
MAX and MIN
* 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.
MAX: Finds the largest of two to five values.
MIN: Finds the smallest of two to five values.
Instruction Name FB/FUN Graphic expression ST expression
MAX Maximum FUN Out:=MAX(In1, In2, ···, InN);
MIN Minimum FUN Out:=MIN(In1, In2, ···, InN);
Variables
Name Meaning I/O Description Valid range Unit Default
In1 to InN Data to
process
Input Data to process, where N is
2 to 5
Depends on data type. --- 0*
Out Search
result
Output Search result Depends on data type. --- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1 to InN OKOKOKOKOKOKOKOKOKOK
Out OKOKOKOKOKOKOKOKOKOK
(@)MAX
EN ENO
In1 Out
InN
⋅⋅⋅
⋅⋅⋅
(@)MIN
EN ENO
In1 Out
InN
⋅⋅⋅
⋅⋅⋅