278
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
10 Arithmetic and Logical Operation (
+
,
−
,
×
,
÷
) – FNC 20 to FNC 29
10.4 FNC 23 – DIV / Division
Program examples
1. 16-bit operation
2. 32-bit operation
Function Changes According to Versions
Compatible Versions
Item Function Summary
FX3G FX3U FX3UC
Ver. 1.00 or later Ver. 2.30 or later Ver. 2.30 or later
Zero Flag
Turns M8304 ON when the operation result of DIV instruc-
tion is 0.
Carry Flag
Turns M8306 ON when the operation result of DIV instruc-
tion overflows.
16-bit operation : Only when the maximum negative
value(-32,768) is divided by -1.
32-bit operation : Only when the maximum negative
value
(-2,147,483,648) is divided by -1.
X000
D
FNC 23
DIV
D 0 D 2 D 4
S
1
S
2
Dividend Divisor Quotient Remainder
(D 0)
÷
(D 2)
→
(D 4) ... (D 5)
100 33 3 1
X001
FNC 23
DDIV
D 0 D 2 D 4
S
1
S
2
D
Dividend Divisor Quotient Remainder
(D 1,D 0)
÷
(D 3,D 2)
→
(D 5,D 4) ... (D 7,D 6)
100,000 3333 30 10