Chapter 6 Instruction Details
XBC E-Type Main Unit
6-165
Ver. 1
6.28.5 ADDU, ADDUP, DADDU, DADDUP
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)
ADDU(P)
DADDU(P)
S1 O O O O O O O - O -
- O O O O O
4~6
-
O
O
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
WORD/DWORD
S2
Data to be added to S1
WORD/DWORD
D
Address to save operation result in
WORD/DWORD
[Flag Set]
Flag
Description
Device
Number
Zero
To be set if operation result is Zero.
F111
Carry
To be set if operation result is Overflow
F112
1) ADDU (Unsigned Binary Add)
(1) Saves the result of word data S1 and S2 added up in D.
(2) Performs Unsigned Operation.
(3) If operation result is over 65,535(hFFFF), Carry Flag will be set.
2) DADDU (Unsigned Binary Double Add)
(1) Saves the result of word data (S1+1,S1) and (S2+1,S2) added up in (D+1,D).
(2) Performs Unsigned Operation.
(3) If operation result is over 4,294,967,295 (hFFFFFFFF), Carry Flag will be set.
3) Program Example
(1) For P1000=’1234’ and P1100=’5’, Input Signal P00000 is changed from Off to On status, the Unsigned
addition result ‘1239’ is saved in P1200.
ADDU P1000 P1100 P1200
P00000
(D)ADDU
P S1 S2
(D)ADDUP
S1 S2
means
ADDU/DADDU
D
D
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...