Mitsubishi Electric MELSEC-Q/L Programming Manual page 240

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

Advertisement

DB+(P), DB-(P) [When three data are set]
DB+, DB-
DB+P, DB-P
(S1): Data to be added to/subtracted from or head number of the devices where the data to be added to/subtracted from is stored (BCD 8 digits)
(S2): 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 addition/subtraction operation result is stored (BCD 8 digits)
Setting
Internal device
data
Bit
(S1)
(S2)
(D)
Processing details
■DB+
• Adds the BCD 8-digit data designated by (S1) and the BCD 8-digit data designated by (S2), and stores the result of the
addition at the device designated by (D).
S1
S1
+1
(Upper 4 digits) (Lower 4 digits)
5
6
7 8 9 1 2 3
+
• 0 to 99999999 (BCD 8 digits) can be assigned to (S1), (S2) 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 (S1) and the BCD 8-digit data designated by (S2), and stores the result of the
subtraction at the device designated by (D).
+1
S1
S1
(Upper 4 digits) (Lower 4 digits)
5
6
7 8 9 1 2 3
• 0 to 99999999 (BCD 8 digits) can be assigned to (S1), (S2) 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
238
6.2 Arithmetic Operation Instructions
Command
Command
R, ZR
Word
S2
S2
+1
(Upper 4 digits) (Lower 4 digits)
(Upper 4 digits) (Lower 4 digits)
0
1
2 3 4 5 6 7
5
Digits exceeding the designated number
of digits are assumed to be 0.
0
1
6 5 4 3 2 1
0
+1
S2
S2
D
(Upper 4 digits) (Lower 4 digits)
(Upper 4 digits) (Lower 4 digits)
0
1
2 3 4 5 6 7
5
Digits exceeding the designated
number of digits are assumed to be 0.
1
2
3 4 5 6 7 9
9
indicates an instruction symbol of
J\
Bit
Word
D
D
+1
8
0 2 3 6 9 0
0
6 5 4 3 2 1
+1
D
5 5 5
4
5 5
6
9
9 9 9 9 9 9
DB+/ DB
S1
S2
D
P
S1
S2
D
U\G
Zn
Constant
K, H
.
Others

Advertisement

Table of Contents
loading

Table of Contents