
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)
Содержание MELSEC iQ-F FX5 series
Страница 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Страница 2: ......
Страница 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Страница 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Страница 438: ...436 7 APPLICATION INSTRUCTION 7 7 Real Number Instruction Operation error There is no operation error ...
Страница 705: ...15 TYPE CONVERSION FUNCTIONS 15 13 Converting DWORD to WORD 703 15 Operation error There is no operation error ...
Страница 707: ...15 TYPE CONVERSION FUNCTIONS 15 14 Converting DWORD to INT 705 15 Operation error There is no operation error ...
Страница 722: ...720 15 TYPE CONVERSION FUNCTIONS 15 26 Converting DINT to WORD Operation error There is no operation error ...
Страница 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Страница 855: ...26 COUNTER FUNCTION BLOCKS 26 3 Counter Function Block 853 26 Operation error There is no error ...
Страница 887: ......