
804
20 SELECTION FUNCTIONS
20.2 Selecting Maximum/Minimum Value
20.2
Selecting Maximum/Minimum Value
MAX(_E), MIN(_E)
• MAX(_E): These functions output the maximum value of an input value.
• MIN(_E): These functions output the minimum value of an input value.
Setting data
■
Descriptions, types, and data types
Processing details
■
Operation processing
• MAX(_E)
Ex.
Data type is INT
• MIN(_E)
Ex.
Data type is INT
• A data value of the BOOL, INT, DINT, WORD, DWORD, REAL, STRING, or TIME type can be input to (s1) to (s28).
• The number of pins for (s) can be changed in the range of 2 to 28.
Ladder diagram
Structured text
[Without EN/ENO]
[With EN/ENO]
[Without EN/ENO]
d:=MAX(s1,s2);
d:=MIN(s1,s2);
[With EN/ENO]
d:=MAX_E(EN,ENO,s1,s2);
d:=MIN_E(EN,ENO,s1,s2);
Argument
Description
Type
Data type
EN
Execution condition (TRUE: Execution, FALSE: Stop)
Input variable
BOOL
s1 to s28
Input
Input variable
ANY_SIMPLE
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
Output variable
BOOL
d
Output
Output variable
ANY_SIMPLE
These functions output the maximum value of the BOOL, INT, DINT, WORD, DWORD, DWORD, REAL, STRING, or TIME type data input to (s1) to (s28) in
the same data type as (s) from (d).
These functions output the minimum value of the BOOL, INT, DINT, WORD, DWORD, DWORD, REAL, STRING, or TIME type data input to (s1) to (s28) in
the same data type as (s) from (d).
s1
d
s2
EN
ENO
d
s1
s2
MAX
_IN1
_IN2
OUT
1234
5678
INT
INT
5678
INT
(s1) to (s28)
(d)
MAX
_IN1
_IN2
OUT
1234
5678
INT
INT
5678
INT
(s1) to (s28)
(d)
MIN
_IN1
_IN2
OUT
1234
5678
INT
INT
5678
INT
(s1) to (s28)
(d)
MIN
_IN1
_IN2
OUT
1234
5678
INT
INT
5678
INT
(s1) to (s28)
(d)
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......