Chapter 6 Instruction and Flag List
XBC E-Type Main Unit
6-212
Ver. 1
6.32.11 MAX, MAXP, DMAX, DMAXP
Instruction
Area Available
Step
Flag
P M K
F
L
T
C
S
Z D.x R.x
Con
st
U
N
D
R
Error
(F110)
Zero
(F111)
Carry
(F112)
MAX(P)
DMAX(P)
S
O O O O O O O
-
O
-
-
-
O O O O
4~6
O
O
-
D
O O O
-
O O O
-
O
-
-
-
O O O O
N
O O O
-
O O O
-
O
-
-
O O O O O
Operand
Description
Data Type
S
Data address to start MAX operation
INT/DINT
D
Address to save operation result.
INT/DINT
N
Number of words to execute MAX operation starting from S
WORD
[Flag Setting]
Flag
Description
Device Number
Error
To be set if N exceeds applicable device’s range.
F110
Zero
To be set if operation result is 0.
F111
1) MAX (Maximum)
(1) Searches from word data S up to N range for the maximum value to save in D.
(2) Comparison in size will be performed by signed operation.
(3) If operation result is Zero, Zero Flag will be set.
(4) If N=0, the instruction will not be executed.
(D)MAX
means (D)MAX
P S
D
(D)MAXP
S
D
N
N
Searching range
( n )
Head No. of object to search
123
10
500
123
20
-123
123
123
500
Maximum value
D
S
S + 1
S + 2
S + 3
S + (n-4)
S + (n-3)
S + (n-2)
S + (n-1)
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...