Mitsubishi MELSEC Q Series Programming Manual page 464

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

MAX(P),DMAX(P)
DMAX
(1) Searches in the n points of 32-bit BIN data, from the device designated by
maximum value and stores the searched maximum value at the device designated by
and
Starts the search from the device designated by
number of points counted from
+2 and stores the number of the found minimum values at
D
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• The n-bit range from the
• The device specified by
(For the Universal model QCPU, LCPU.)
Program Example
(1) The following program subtracts, when X1C is turned ON, the data stored at D100 to D103
from the data stored at R0 to R3, and searches in the results of subtraction for the maximum
value, then, stores it at D200 to D202.
[Ladder Mode]
[Operation]
b15
D100
D101
D102
D103
7-90
+1.
D
S
54321000 (BIN)
+1,
S
4321000 (BIN)
+3,
S
+2
S
3254000 (BIN)
S
+4
S
+5,
54321000 (BIN)
S
+6
S
+7,
+9,
+8
S
S
12345678 (BIN)
, or device exceeds the range of that device.
S
exceeds the range of the corresponding device.
D
b0
b15
R0
4321 (BIN)
5000 (BIN)
R1
5432 (BIN)
4000 (BIN)
R2
4444 (BIN)
4000 (BIN)
R3
5000 (BIN)
6000 (BIN)
D0
4
and stores the location, specified in the
S
, of the device where the maximum value is found first at
S
D
+1,
D
54321000 (BIN)
n
D
+2
D
+3
[List Mode]
Step
Instruction
b0
b15
D150
-679 (BIN)
D151
1432 (BIN)
D152
444 (BIN)
D153
-1000 (BIN)
, for the
S
D
+3.
D
Maximum value
1
Location
2
Quantity
(Error code: 4101)
(Error code: 4101)
Device
b0
D200
Maximum value
1432
D201
Location
2
D202
1
Quantity

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents