161
5-17-6
DOUBLE BCD ADD – ADDL(54)
Au
: First augend word (BCD)
IR, SR, AR, DM, HR, TC, LR
Ad
: First addend word (BCD)
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
Operand Data Areas
R
: First result word
IR, AR, DM, HR, LR
ADDL(54)
Au
Ad
R
@ADDL(54)
Au
Ad
R
When the execution condition is OFF, ADDL(54) is not executed. When the
execution condition is ON, ADDL(54) adds the contents of CY to the 8-digit
value in Au and Au+1 to the 8-digit value in Ad and Ad+1, and places the re-
sult in R and R+1. CY will be set if the result is greater than 99999999.
Au + 1
Au
Ad + 1
Ad
R + 1
R
+
CY
CY
ER:
Au and/or Ad is not BCD.
Indirectly addressed DM word is non-existent. (Content of
*
DM word
is not BCD, or the DM area boundary has been exceeded.)
CY:
ON when there is a carry in the result.
EQ
:
ON when the result is 0.
When 00000 is ON, the following program adds two 12-digit numbers, the
first contained in LR 20 through LR 22 and the second in DM 0012. The re-
sult is placed in LR 10 through HR 13. In the second addition (using
ADD(30)), any carry from the first addition is included. The carry from the
second addition is placed in HR 13 by using @ADB(50) (see
Section 5-17-1
)
with two all-zero constants to indirectly place the content of CY into HR 13.
Description
Flags
Example
BCD Calculations
Section 5-17
Содержание SYSMAC C1000H
Страница 1: ...Cat No W140 E1 04 Programmable Controllers SYSMAC C1000H C2000H...
Страница 2: ...C1000H C2000H Programmable Controllers Operation Manual Revised May 2003...
Страница 3: ...iv...
Страница 5: ...vi...
Страница 395: ...Cat No W140 E1 04 Note Specifications subject to change without notice Printed in Japan Authorized Distributor...
Страница 396: ...Cat No W140 E1 04 SYSMAC C1000H C2000H Programmable Controllers OPERATION MANUAL...