1014
23 SELECTION FUNCTIONS
23.2 Selecting Maximum/Minimum Value
23.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.
*1 The input variable "s" can be changed in the range of 2 to 28.
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, FBD/LD
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(IN1) to s28(IN28)
Input
Input variable
ANY_ELEMENTARY
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
Output variable
BOOL
d(MAX(_E) / MIN(_E))
Output
Output variable
ANY_ELEMENTARY
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
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......