Mitsubishi MELSEC Q Series Programming Manual page 241

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

Advertisement

(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
or
S
Program Example
(1) The following program adds the BCD data 12345600 and 34567000, stores the result at
D887 and D888, and at the same time outputs them to from Y30 to Y4F.
[Ladder Mode]
[List Mode]
Instruction
Step
(2) The following program subtracts the BCD data 98765432 from 12345678, stores the result
at D100 and D101, and at the same time outputs it from Y30 to Y4F.
[Ladder Mode]
[List Mode]
Step
Instruction
1
2
3 4 5 6 7 8
1
2
3 4 5 6 7 9
BCD data is outside the 0 to 99999999 range.
D
Device
Device
and
.
D
S
9
9
9 9 9 9 9 9
Stores 12345600 in BCD to D887 and D888.
Adds 34567000 in BCD to the value in D887 and D888,
and stores the result to D887 and D888.
Outputs the data in D887 and D888 to Y30 to Y4F.
Stores 98765432 in BCD to D100 and D101.
Subtracts the value in D100 and D101 from 12345678
in BCD, and stores the result to D100 and D101.
Outputs the data in D100 and D101 to T30
to Y4F.
DB+(P),DB-(P)
1
2
3
4
(Error code: 4100)
4
6
7
8
6-39

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents