Special offers from our partners!
Find Replacement BBQ Parts for 20,308 Models. Repair your BBQ today.
6-41
DB+(P),DB-(P)
1
2
3
4
4
6
7
8
6.2 Arithmetic Operation Instructions
6.2.6 BCD 8-digit addition and subtraction operations (DB+(P),DB-(P))
DB-
(1) Subtracts the BCD 8-digit data designated by and the BCD 8-digit data designated by ,
and stores the result of the subtraction at the device designated by .
(2) 0 to 99999999 (BCD 8 digits) can be assigned to , and .
(3) The following will result if an underflow is generated by the subtraction operation:
The carry flag in this case does not go ON.
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored into SD0.
• The , or BCD data is outside the 0 to 99999999 range. (Error code: 4100)
Program Example
(1) The following program adds the BCD data at D3 and D4 to the BCD data at Z1 and Z2 when
X20 goes ON, and stores the result at R10 and R11.
[Ladder Mode] [List Mode]
S1
S2
D
10 234567
(Upper 4 digits) (Lower 4 digits)
65789123
(Upper 4 digits) (Lower 4 digits)
546
(Upper 4 digits) (Lower 4 digits)
+1+1 +1
Digits exceeding the designated
number of digits are assumed to be 0.
S1 S1 S2
D D
S2
555 55
S1
S2
D
21 34567921345678 99 999999
S1
S2
D
Step
Instruction
Device