7-89
MAX(P),DMAX(P)
1
2
3
4
6
6
7
8
7.5 Data processing instructions
7.5.10 Maximum value search for 16- and 32-bit data (MAX(P),DMAX(P))
7.5.10 Maximum value search for 16- and 32-bit data
(MAX(P),DMAX(P))
MAX(P),DMAX(P)
Function
MAX
(1) Searches in the n points of 16-bit BIN data, from the device designated by , for the
maximum value and stores the searched maximum value at the device designated by .
Starts the search from the device designated by and stores the location, specified in the
number of points counted from , of the device where the maximum value is found first at
+1 and stores the number of the found minimum values at +2.
: Head number of the devices where a maximum value is searched (BIN 16/32 bits)
: Head number of the devices where the maximum value search result will be stored (BIN 16/32 bits)
n : Number of data blocks to be searched (BIN 16 bits)
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
K, H
Other
Bit Word Bit Word
–– –– ––
–– –– ––
n ––
Basic
Process
High
performance
Redundant
Universal
n
Command
Command
P
S D
S D
MAX, DMAX
MAXP ,DMAXP
n
indicates an instruction symbol of MAX/DMAX.
S
D
S
D
S
D
S
S
D D
1234 (BIN)
n
5678 (BIN)
5678 (BIN)
-5214 (BIN)
5555 (BIN)
5678 (BIN)
2
2
Location
Maximum value
Quantity
S
S
D
D
D
S
S
S
+1
+1
+2
+2
+(n-2)
+(n-1)