Mitsubishi MELSEC Q Series Programming Manual page 245

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

Advertisement

Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• The
or
S1
• Attempt to divide
Program Example
(1) The following program multiplies, when X20 is turned ON, the BCD data at X0 to XF by the
BCD data at D8 and stores the operation result at D0 to D1.
[Ladder Mode]
[Operation]
XF
9
7
5
Multiplicand
(2) The following program divides 5678 by the BCD data 1234, stores the result at D502 and
D503, and at the same time outputs the quotient to Y30 to Y3F.
[Ladder Mode]
[Operation]
5
6
7
BCD data is outside the 0 to 9999 range.
S2
by 0.
S2
D8
X0
3
8
6
4
2
Multiplier
8
/
1
2
3
4
[List Mode]
Instruction
Step
D1 (Upper 4 digits)
D0 (Lower 4 digits)
8
4
2
8
5
4
Multiplication result
[List Mode]
Instruction
Step
D502
D503
0
0
0
4
0
7
Quotient
Remainder
Y3F
Y30
0
0
0
4
Quotient
B*(P),B/(P)
(Error code: 4100)
(Error code: 4100)
Device
2
6
Device
4
2
6-43
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