
Chapter 6 Instruction Details
XBC E-Type Main Unit
6-161
Ver. 1
6.28 BIN Operation Instruction
6.28.1 ADD, ADDP, DADD, DADDP
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
ADD(P)
DADD(P)
S1 O O O O O O O - O -
- O O O O O
4~6
-
-
-
S2 O O O O O O O - O -
- O O O O O
D O O O - O O O - O -
-
- O O O O
Operand
Description
Data Type
S1
Data to be added to S2
INT/DINT
S2
Data to be added to S1
INT/DINT
D
Address to save operation result in
INT/DINT
1) ADD (Signed Binary Add)
(1) Saves the result of word data S1 and S2 added up in D.
(2) Performs Signed Operation. If operation result is over 32,767(h7FFF) or below -32,768 (hFFFF), Carry
Flag will not be set.
5678 (BIN)
b15
b0
D
1234 (BIN)
b15
b0
S
+
6912 (BIN)
b15
b0
D
2) DADD (Signed Binary Double Add)
(1) Saves the result of word data S1 and S2 added up in D.
(2) Performs Signed Operation.
(3) If operation result is over 2,147,483,647 (h7FFFFFFF) or below -2,147,483,648(hFFFFFFFF), Carry
Flag will not be set.
+
b0
567890 (BIN)
b15
D
b16
b31
D+1
b0
123456 (BIN)
b15
S
b16
b31
S+1
b0
691346 (BIN)
b15
D
b16
b31
D+1
3) Program Example
(1) For P1000=‘1234’ , P1100=‘1111’, Input Signal P00000 is changed from Off to On status, the added
result of ‘2345’ is saved In P1200.
ADD P1000 P1100 P1200
P00000
(D)ADD
P S1 S2
(D)ADDP
S1 S2
means
ADD/DADD
D
D
Содержание 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...