![background image](http://html1.mh-extra.com/html/ls-industrial-systems/xbc-dn10e/xbc-dn10e_user-manual_1943831335.webp)
Chapter 6 Instruction and Flag List
XBC E-Type Main Unit
6-218
Ver. 1
6.32.14 AVE, AVEP, DAVE, DAVEP
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)
AVE(P)
DAVE(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 AVE operation
INT/DINT
D
Address to save AVE operation result
INT/DINT
N
Number of words to execute AVE operation starting from S
INT/DINT
[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) AVE (Word Average)
(1) Saves the average resulted from the sum up to N word data starting from S divided by N in D.
(2) Value to be saved in word data D is of INT.
(3) If operation result is Zero, Zero Flag will be set.
(4) The decimals will be omitted if the sum of N data is not exactly divided by N.
(D)AVE
means AVE
P S
D
(D)AVEP
S
D
N
N
n
Address to start operation
123
10
500
123
20
-123
123
123
112
Average
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...