Fnc 23 - Div / Division - Mitsubishi Electric FX3G SERIES Programming Manual

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

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
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
P
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 C D R U \G
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)
indicates the dividend,
S
1
transferred to
D
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
→ For the floating point division instruction EDIV (FNC123), refer to Section 18.11.
Mnemonic
16-bit Instruction
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
/FX
3U
3UC
indicates the divisor, the quotient is transferred to
S
2
+1.
S
S
D
1
2
are occupied to store the operation result (quotient and remainder). Make
D
S
or
1
10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29
Operation Condition
32-bit Instruction
Continuous
13 steps
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Index
Unit
V
Z Modify K H
1
1
1
2
PLCs.
Dividend
Divisor
Quotient
BIN
BIN
BIN
S
) ÷ (
S
) → (
D
(
1
2
16 bits
16 bits
16 bits
S
, it is automatically converted into binary format.
2
10.4 FNC 23 – DIV / Division
Mnemonic
Operation Condition
Continuous
DDIV
Operation
Pulse (Single)
DDIVP
Operation
Data type
16- or 32-bit binary
16- or 32-bit binary
32- or 64-bit binary
Others
Con-
Real
Charac-
stant
Number
ter String
E
" "
, and the remainder is
D
Remainder
BIN
D
) ... (
+1)
16 bits
1
2
3
4
5
Pointer
P
6
7
8
9
10
279

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents