Maximum Value Search For 16-Bit Data, Maximum Value Search For 32-Bit Data - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Maximum value search for 16-bit data, maximum value search for
32-bit data
MAX(P), DMAX(P)
High
Basic
Process
performance
MAX, DMAX
MAXP ,DMAXP
(S): Start device where the data to be searched is stored (BIN 16/32 bits)
(D): Start device 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
Internal device
data
Bit
(S)
(D)
n
Processing details
■MAX
• Searches in the n points of 16-bit BIN data, from the device designated by (S), for the maximum value and stores the
searched maximum value at the device designated by (D).
• Starts the search from the device designated by (S) and stores the location, specified in the number of points counted from
(S), of the device where the maximum value is found first at (D)+1 and stores the number of the found minimum values at
(D)+2.
S
1234 (BIN)
S
+1
5678 (BIN)
S
+2
5678 (BIN)
S
-5214 (BIN)
+(n-2)
5555 (BIN)
S
+(n-1)
■DMAX
• Searches in the n points of 32-bit BIN data, from the device designated by (S), for the maximum value and stores the
searched maximum value at the device designated by (D) and (D)+1.
• Starts the search from the device designated by (S) and stores the location, specified in the number of points counted from
(S), of the device where the maximum value is found first at (D)+2 and stores the number of the found minimum values at
(D)+3.
S
S
54321000 (BIN)
+1,
4321000 (BIN)
S
+3,
S
+2
3254000 (BIN)
S
S
+4
+5,
+6
54321000 (BIN)
S
S
+7,
+9,
S
+8
12345678 (BIN)
S
7 APPLICATION INSTRUCTIONS
440
7.5 Data Processing Instructions
Redundant Universal
LCPU
Command
Command
R, ZR
Word
D
n
D
+1
D
+2
D
n
D
D
J\
Bit
Word
5678 (BIN)
Maximum value
Location
2
Quantity
2
D
+1,
54321000 (BIN)
+2
1
+3
2
indicates an instruction symbol of MAX/DMAX.
S
D
P
S
D
U\G
Zn
Maximum value
Location
Quantity
n
n
Constant
Others
K, H

Advertisement

Table of Contents
loading

Table of Contents