Mitsubishi MELSEC Q Series Programming Manual page 243

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

DB-
(1) Subtracts 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
(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
,
S1
S2
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]
S1
+1
S1
S2
+1
(Upper 4 digits) (Lower 4 digits)
(Upper 4 digits) (Lower 4 digits)
5
6
7 8 9 1 2 3
0
1
Digits exceeding the designated
number of digits are assumed to be 0.
1
2
3 4 5 6 7 8
1
2
or BCD data is outside the 0 to 99999999 range. (Error code: 4100)
D
and the BCD 8-digit data designated by
S1
S2
D
+1
(Upper 4 digits) (Lower 4 digits)
2 3 4 5 6 7
5
5 5 5
4
,
and
S1
S2
D
3 4 5 6 7 9
9
9
9 9 9 9 9 9
[List Mode]
Step
Instruction
DB+(P),DB-(P)
S2
.
D
D
5 5
6
.
Device
6-41
1
,
2
3
4
4
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents