Chapter 6 Instruction and Flag List
XBC E-Type Main Unit
6-216
Ver. 1
6.32.13 SUM, SUMP, DSUM, DSUMP
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)
SUM(P)
DSUM(P)
S
O O O O O O O
-
O
-
-
-
O O O O
4~6
O
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
[Flag Setting]
Flag
Description
Device Number
Error
To be set if N exceeds applicable device’s range, or overflow occurs during operation.
F110
Zero
To be set if operation result is 0.
F111
Carry
To be set if overflow occurs during operation.
F112
1) SUM (Word Summary)
(1) Saves the result of the sum up to N data starting from word data S in D.
(2) Sum will be performed by Signed operation.
(3) If operation result is Zero, Zero Flag will be set.
(4) If overflow occurs during operation, Carry Flag and Error Flag will be set.
(5) The operated value will be saved in result despite the overflow. Thus, Carry Flag should be checked since
unintentional value could be saved in result.
(6) If N=0, the instruction will not be executed.
Operand
Description
Data Type
S
Data address to start SUM operation
INT/DINT
D
Address to save operation result.
INT/DINT
N
Number of words to execute SUM operation starting from S
WORD
(D)SUM
means (D)SUM
P S
D
(D)SUMP
S
D
N
N
n
Address to start operation
123
10
500
123
20
-123
123
123
899
D
S
S + 1
S + 2
S + 3
S + (n-4)
S + (n-3)
S + (n-2)
S + (n-1)
Sum
Содержание XBC-DN10E
Страница 1: ......
Страница 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...
Страница 52: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 24 Ver 1 3 7 2 XBC DR10E 4 point relay output...
Страница 54: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 26 Ver 1 3 7 3 XBC DN10E 4 point transistor output...
Страница 56: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 28 Ver 1 3 7 4 XBC DR14E 6 point relay output...
Страница 58: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 30 Ver 1 3 7 5 XBC DN14E 6 point transistor output...
Страница 60: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 32 Ver 1 3 7 6 XBC DR20E 8 point relay output...
Страница 62: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 34 Ver 1 3 7 7 XBC DN20E 8 point transistor output...
Страница 64: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 36 Ver 1 3 7 8 XBC DR30E 12 point relay output...
Страница 66: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 38 Ver 1 3 7 9 XBC DN30E 12 point transistor output...