Fnc 23 - Div / Division - Mitsubishi FX3G Series Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G Series:
Table of Contents

Advertisement

FX
/FX
/FX
/FX
3G
3U
3GC
3UC
Programming Manual - Basic & Applied Instruction Edition
10.4
FNC 23 – DIV / Division
Outline
This instruction executes division by two values to obtain the result (A ÷ B = C ... ).
1. Instruction format
FNC 23
D
DIV
2. Set data
Operand type
S
1
S
2
D
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T
S
1
S
2
D
1:This function is supported only in FX
2: Available only in 16-bit operations (Not available in 32-bit operations)
Explanation of function and operation
1. 16-bit operation (DIV and DIVP)
S
indicates the dividend,
1
transferred to
Command
input
FNC 23
DIV
• The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is divided algebraically.
36 ÷ (−5) = −7 (quotient) ... 1 (remainder)
• Two devices in total starting from
sure that these two devices are not used for another control.
• When a constant (K) is specified as
272
Series
→ For the floating point division instruction EDIV (FNC123), refer to Section 18.11.
Mnemonic
16-bit Instruction
P
7 steps DIV
DIVP
Data for division or word device number storing data (dividend)
Data for division or word device number storing data (divisor)
Head word device number storing the division result (quotient and remainder)
Digit Specification
3U
S
indicates the divisor, the quotient is transferred to
2
D
+1.
S
S
1
2
D
S
1
10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
C D R U \G
/FX
PLCs.
3UC
Dividend
Divisor
D
BIN
BIN
) ÷ (
S
S
(
1
2
16 bits
16 bits
are occupied to store the operation result (quotient and remainder). Make
or
, it is automatically converted into binary format.
S
2
10.4 FNC 23 – DIV / Division
Mnemonic
32-bit Instruction
DDIV
13 steps
DDIVP
Con-
Real
Index
stant
Number
V
Z Modify K H
1
1
1
2
D
, and the remainder is
Quotient
Remainder
BIN
BIN
) → (
D
D
) ... (
+1)
16 bits
16 bits
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Data type
16- or 32-bit binary
16- or 32-bit binary
32- or 64-bit binary
Others
Charac-
Pointer
ter String
E
" "
P

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3gc seriesFx3uc series

Table of Contents