EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 240

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
238
6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
DB+(P), DB-(P) [When three data are set]
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).
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.
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).
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.
(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
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S1) 
(S2) 
(D) 
Command
Command
P
S1 S2
D
S1 S2
D
DB+, DB-
DB+P, DB-P
DB+/DBindicates an instruction symbol of .
+
10234
5
67
(Upper 4 digits) (Lower 4 digits)
6
5
789123
(Upper 4 digits) (Lower 4 digits)
8
5
023690
(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
10654 32199 000000 00654 321
10234 567
(Upper 4 digits) (Lower 4 digits)
65789123
(Upper 4 digits) (Lower 4 digits)
5 4 6
(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
2134 56792134 5678 99 999999

Table of Contents

Related product manuals