7.5 Data Processing Instructions
7.5.10 Maximum value search of 16-/32-bit data
7-85
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
MAX,
DM
A
X
MAX, DMAX
7.5.10
Maximum value search of 16-/32-bit data
MAX, DMAX
Function
MAX(P)
(1) Searches for the maximum value from the n points of 16-bit BIN data in the device specified
for
, and stores the searched maximum value to the device specified for
.
Searches from the device specified for
and counted from
, stores the location of device
number which is stored in the maximum value of the first search to
+1 and stores the
number of maximum values to
+2.
MAX(P)
DMAX(P)
P: Executing condition
:
indicates any of the following
instructions.
MAX
MAXP
DMAX
DMAXP
Input argument,
EN:
Executing condition
:Bit
s:
Start number of the device in which the maximum value is
searched
:ANY16/32
n:
Number of search data
:ANY16
Output argument,
ENO:
Execution result
:Bit
d:
Search result of the maximum value
:ANY16/32
Setting
data
Internal device
R, ZR
J
\
U
\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
−
−
−
n
−
−
−
−
Universal
UD
High
Performance
Structured ladder
ST
MA
X
EN
ENO
s
d
n
MA
X
(EN,
s
,
n
, d);
ENO:=
s
d
s
d
s
s
d
d
1234 (
B
IN)
n
5678 (
B
IN)
5678 (
B
IN)
-5214 (
B
IN)
5555 (
B
IN)
5678 (
B
IN)
2
2
L
ocat
i
on
M
ax
i
mum
va
l
ue
Q
uant
i
t
y
s
s
d
d
d
s
s
s
+1
+1
+2
+2
+(
n
-2)
+(
n
-1)
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......