Mitsubishi FX3U Series Programming Manual page 258

Hide thumbs Also See for FX3U Series:
Table of Contents

Advertisement

FX
/FX
Series Programmable Controllers
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
2. 32-bit operation (DDIV and DDIVP)
[
+1,
S
S
1
1
[
+1,
D
D
Command
input
FNC 23
DDIV
Dividend
S
[
1
• Four devices in total starting from
remainder). Make sure that these four devices are not used for another control.
• The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data are divided
algebraically.
5500 ÷ (−540) = −10 (quotient) ... 100 (remainder)
• When a constant (K) is specified in [
the binary format.
Cautions
1. Operation result
• The most significant bit of the quotient and remainder indicates the sign (positive: 0, negative: 1)
respectively.
• The quotient is negative when either the dividend or divisor is negative.
The remainder is negative when the dividend is negative.
2. Device specified as
• The remainder is not obtained when a bit device is specified with digit specification.
• In a 32-bit operation (by DSUB or DSUBP), Z cannot be specified as
Error
• When the divisor
Program examples
1. 16-bit operation
X000
FNC 23
DIV
2. 32-bit operation
X001
FNC 23
DDIV
256
] indicates the dividend, [
]), and the remainder is transferred to [
S
S
1
2
Divisor
BIN
BIN
] ÷ [
S
S
S
+1,
+1,
1
2
32 bits
32 bits
D
S
D
is "0", an operation error is caused and the instruction is not executed.
S
2
S
S
1
2
D 0
D 2
S
S
1
2
D 0
D 2
10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29
+1,
] indicates the divisor, the quotient is transferred to
S
S
2
2
+3,
D
D
Quotient
BIN
→ [
D
D
]
+1,
] ... [
2
32 bits
are occupied to store the operation result (quotient and
+1,
] or [
S
S
1
1
2
D
Dividend
Divisor
(D 0) ÷ (D 2) → (D 4)
D 4
100
33
D
Dividend
Divisor
(D 1,D 0) ÷ (D 3,D 2) → (D 5,D 4) ... (D 7,D 6)
D 4
100,000
3333
10.4 FNC 23 – DIV / Division
+2].
D
Remainder
BIN
D
D
+3,
+2]
32 bits
+1,
], it is automatically converted into
S
2
.
D
Quotient
Remainder
...
(D 5)
3
1
Quotient
Remainder
30
10

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3uc seriesMelsec-f

Table of Contents