Bcd 8-Digit Addition And Subtraction Operations - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

BCD 8-digit addition and subtraction operations

DB+(P), DB-(P) [When two data are set]
High
Basic
Process
performance
DB+, DB-
DB+P, DB-P
(S): Data for adding/subtracting or head number of the devices where the data for adding/subtracting is stored (BCD 8 digits)
(D): Head number of the devices where the data to be added to/subtracted from is stored (BCD 8 digits)
Setting
Internal device
data
Bit
(S)
(D)
Processing details
■DB+
• Adds the BCD 8-digit data designated by (D) and the BCD 8-digit data designated by (S), and stores the result of the
addition at the device designated by (D).
D
D
(Upper 4 digits)(Lower 4 digits)
0
9
8 7 1 0 6 8
• 0 to 99999999 (BCD 8 digits) can be assigned to (S) and (D).
• If the result of the addition operation exceeds 99999999, the upper bits will be ignored. The carry flag (SM700) in this case
does not turn ON.
9
9
0 0 0 0 0 0
■DB-
• Subtracts the BCD 8-digit data designated by (D) and the BCD 8-digit data designated by (S), and stores the result of the
subtraction at the device designated by (D).
D
+1
D
(Upper 4 digits) (Lower 4 digits)
8 7 1 0 6 8
0
9
• 0 to 99999999 (BCD 8 digits) can be assigned to (S) and (D).
• The following will result if an underflow is generated by the subtraction operation: The carry flag (SM700) in this case does
not turn ON.
1
2
3 4 5 6 7 8
6 BASIC INSTRUCTIONS
236
6.2 Arithmetic Operation Instructions
Redundant Universal
LCPU
Command
Command
R, ZR
Word
S
S
(Upper 4 digits)(Lower 4 digits)
(Upper 4 digits)(Lower 4 digits)
0
0
3 2 3 4 5 6
Digits exceeding the designated number
of digits are assumed to be 0.
0
1
6 5 4 3 2 1
0
S
+1
S
(Upper 4 digits) (Lower 4 digits)
(Upper 4 digits) (Lower 4 digits)
3 2 3 4 5 6
0
0
0
Digits exceeding the designated number
of digits are assumed to be 0.
1
2
3 4 5 6 7 9
9
J\
Bit
Word
D
D
1
0
1 9 4 5 2 4
0
6 5 4 3 2 1
D
+1
D
9 5 4 7 6 1 2
9
9 9 9 9 9 9
indicates an instruction symbol of
S
D
P
S
D
U\G
Zn
Constant
K, H
.
DB+/DB-
Others

Advertisement

Table of Contents
loading

Table of Contents