Mitsubishi MELSEC Q Series Programming Manual page 235

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

Advertisement

D/
(1) Divides BIN 32-bit data designated by
the result in the device designated by
S1
b31
b16
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
Remainder :
(3) The values for
(BIN 32 bits).
(4) Judgment whether values for
basis of the most significant bit (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.
• Attempt to divide
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]
S1
S2
S2
b15
b0
b31 b16
b15
123456 (BIN)
:
Stored at the lower 32 bits.
Stored at the upper 32 bits (Stored only when using a word device).
and
can be designated at between
S1
S2
,
,
S1
S2
by 0.
S2
and BIN 32-bit data designated by
S1
.
D
D
D
D
b0
b31 b16
b15
b0
b31 b16
4 (BIN)
2147483648 and 2147483647
and
+2 are positive or negative is made on the
D
D
[List Mode]
Instruction
Step
[List Mode]
Instruction
Step
D*(P),D/(P)
, and stores
S2
D
b15
b0
74066 (BIN)
(Error code: 4100)
Device
Device
6-33
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