Mitsubishi MELSEC-Q/L Programming Manual page 199

Table of Contents

Advertisement

D/
(1) Divides BIN 32-bit data designated by
designated by
.
D
S1
b31
567890 (BIN)
(2) With a word device, the division operation result is stored in 64 bits and both the quotient and remainder are stored. With
a bit device, only the quotient is stored as the operation result in 32 bits.
Quotient
:
Stored at the lower 32 bits.
Remainder :
Stored at the upper 32 bits (Stored only when using a word device).
(3) The values for
and
S2
S1
(4) Judgment whether values for
(b31).
(Sign is attached to both the quotient and remainder.)
• 0: Positive
• 1: Negative
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and the corresponding error
code is stored into SD0.
Error
code
4100
The divisor is 0.
Program Example
(1) The following program multiplies the BIN data at D7 and D8 by the BIN data at D18 and D19 when X5 is ON, and stores
the result at D1 to D4.
[Ladder Mode]
(2) The following program outputs the value resulting when the data at X8 to XF is multiplied by 3.14 to Y30 to Y3F when X3
is ON.
[Ladder Mode]
and BIN 32-bit data designated by
S1
S1
S2
S2
b16
b15
b0
b31 b16
b15
123456 (BIN)
can be designated at between -2147483648 and 2147483647 (BIN 32 bits).
,
,
and
+2 are positive or negative is made on the basis of the most significant bit
S1 S2
D
D
Error details
[List Mode]
Step
[List Mode]
Step
, and stores the result in the device
S2
D
D
D
b0
b31 b16
b15
b0
b31 b16
4 (BIN)
74066 (BIN)
Q00J/
Q00/
QnH
Q01
Instruction
Device
Device
Instruction
D*, D*P, D/, D/P
D
b15
b0
QnPH QnPRH
QnU
LCPU
197
1
2
3
4
6
7
8

Advertisement

Table of Contents
loading

Table of Contents