Download Print this page

Selecting Maximum/Minimum Value - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

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.
Ladder diagram, FBD/LD
[Without EN/ENO]
s1
d
s2
*1 The input variable "s" can be changed in the range of 2 to 28.
Setting data
■Descriptions, types, and data types
Argument
EN
s1(IN1) to s28(IN28)
ENO
d(MAX(_E) / MIN(_E))
Processing details
■Operation processing
• MAX(_E)
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).
Ex.
Data type is INT
(s1) to (s28)
(s1) to (s28)
1234
1234
INT
INT
_IN1
_IN1
_IN2
_IN2
5678
5678
INT
INT
• MIN(_E)
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).
Ex.
Data type is INT
(s1) to (s28)
(s1) to (s28)
1234
1234
INT
INT
_IN1
_IN1
_IN2
_IN2
5678
5678
INT
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.
23 SELECTION FUNCTIONS
1014
23.2 Selecting Maximum/Minimum Value
*1
[With EN/ENO]
EN
ENO
s1
d
s2
Description
Execution condition (TRUE: Execution, FALSE: Stop)
Input
Output status (TRUE: Normal, FALSE: Abnormal)
Output
(d)
(d)
MAX
MAX
5678
5678
OUT
OUT
INT
INT
(d)
(d)
MIN
MIN
5678
5678
OUT
OUT
INT
INT
*1
Structured text
[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);
Type
Input variable
Input variable
Output variable
Output variable
Data type
BOOL
ANY_ELEMENTARY
BOOL
ANY_ELEMENTARY

Hide quick links:

Advertisement

loading