Mitsubishi Electronics FX3G User Manual

Page of 964
277
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
10 Arithmetic and Logical Operation (
+, −, ×, ÷) – FNC 20 to FNC 29
10.3 FNC 22 – MUL / Multiplication
1
Introdu
ction
2
Ov
ervi
ew
3
Instruction 
Li
st
4
D
evices 
in Det
ai
l
5
Specifi
ed the
De
vice
 &
 
C
onst
ant
6
Bef
ore
 
Pr
og
ra
mmi
ng
7
Bas
ic 
Instruction
8
FN
C00-FN
C0
9
Program Fl
ow
9
FNC
10-FN
C19
Mov
e & Com
pare
10
FNC
20-FNC
29
Arith. & Lo
gi
Operati
on
Cautions
1. Devices specified in 
• In a 32-bit operation (by DMUL or DMULP), Z cannot be specified in 
.
2. When monitoring the operation result in a programming tool
Even if word devices are used, the operation result (64 bits) cannot be monitored at one time.
In such a case, floating point operation is recommended.
→ For the floating point operation, refer to Chapter 18.
Program examples
1. 16-bit operation
2. 32-bit operation
Function Changes According to Versions
The function of the FNC 22 instruction varies depending on the PLC version shown in the table below.
Compatible Versions
Item
Function Summary
FX
3S
FX
3G
FX
3GC
FX
3U
FX
3UC
Ver. 1.00 
or later
Ver. 1.00 
or later
Ver. 1.40 
or later 
Ver. 2.30 
or later
Ver. 2.30 
or later 
Zero Flag
Turns M8304 ON when the operation result of MUL instruc-
tion is 0.
   
D
   
D
X000
FNC 22
MUL
D  0
D  2
D  4
S1 
S2 
 (D 0) 
× (D 2) → (D 5,D 4)
    8         9              72
X001
FNC 22
DMUL
D  0
D  2
D  4
S1 
S2 
(D 1,D 0) 
× (D 3,D 2) → (D 7,D 6,D 5,D 4)
   1756           327                  574,212