Mitsubishi MELSEC QCPU Programming Manual page 186

Programmable logic controller
Table of Contents

Advertisement

6 BASIC INSTRUCTIONS
DB -
(1) Subtracts the BCD 8-digit data designated by
and stores the result of the subtraction at the device designated by
(2) The values for
(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 Errors]
(1) In the following cases an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored at SD0.
• The
,
S1
[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]
6 - 35
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
+1
S1
S1
S2
(Upper 4 digits)(Lower 4 digits)
(Upper 4 digits)(Lower 4 digits)
5
6
7 8 9 1 2 3
+
0
1
,
, and
can be between 0 to 99999999 (BCD 8 digits).
D
S1
S2
-
1
2
3 4 5 6 7 8
1
2
, or
BCD data is outside the 0 to 99999999 range. (Error code: 4100)
D
S2
and the BCD 8-digit data designated by
S1
+1
+1
S2
D
(Upper 4 digits)(Lower 4 digits)
2 3 4 5 6 7
5
5 5 5
Digits higher than those which were
designated will be read as 0.
3 4 5 6 7 9
9
9
9 9 9 9 9 9
[List Mode]
Instruction
Steps
MELSEC-Q/QnA
.
D
D
4
5 5
6
Device
,
S2
6 - 35

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qnacpuMelsec q modeMelsec q series

Table of Contents