253
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
10 Arithmetic and Logical Operation (
+
,
−
,
×
,
÷
) – FNC 20 to FNC 29
10.3 FNC 22 – MUL / Multiplication
1
In
troduct
io
n
2
Ov
e
rv
ie
w
3
In
st
ru
ct
ion
Li
st
4
D
evi
ce
s
in
De
ta
il
5
Speci
fied t
h
e
D
evi
ce &
C
onst
a
nt
6
Bef
o
re
Pr
ogr
a
m
m
ing
7
Bas
ic
In
st
ru
cti
o
n
8
FNC0
0
-FNC0
9
P
ro
g
ra
m F
lo
w
9
FNC1
0
-FNC1
9
M
ov
e
&
C
om
par
e
10
FNC
20-
FNC
2
9
Ar
ith.
&
Logi
c
O
per
at
io
n
• When a digit (K1 to K8) is specified for [
+1,
]
A digit can be specified in the range from K1 to K8.
For example, when K2 is specified, only low-order 8 bits can be obtained out of the product (32 bits).
2. 32-bit operation (DMUL and DMULP)
The contents of [
+1,
] are multiplied by [
+1,
] in the binary format, and the
multiplication result is transferred to 64-bit [
+3,
+2,
+1,
] (four word devices).
• The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data are multiplied
algebraically.
5500
×
(
−
8540) =
−
46,970,000
• When a constant (K) is specified in [
+1,
] or [
+1,
], it is automatically converted
into the binary format.
• When a digit (K1 to K8) is specified for [
+3,
+2,
+1,
]
The result is obtained only for low-order 32 bits, and is not obtained for high-order 32 bits.
Transfer the data to word devices once, then execute the operation.
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.
D
D
When command contact turns ON
S2
S1
×
K15(H000F)
K53(H0035)
K759(H031B)
0
0
0
…
0
0
1
1
0
0
0
1
1
0
1
1
Operation result is output to K2Y000.
D
Y027 Y026 Y025
…
Y013 Y012 Y011 Y010 Y007 Y006 Y005 Y004 Y003 Y002 Y001 Y000
Not output
Sign bit (0: Positive, 1: Negative)
Command
input
FNC 22
MUL
K53
K15
K2Y000
D
S2
S1
S
1
S
1
S
2
S
2
D
D
D
D
Command
input
FNC 22
DMUL
BIN
→
[ +3, +2, +1, ]
64 bits
S1
S2
D
D
D
D
D
BIN BIN
[ +1, ]
×
[ +1, ]
32 bits 32 bits
S1
S2
S1
S2
S
1
S
1
S
2
S
2
D
D
D
D
D
S2
S1
Command
input
FNC 22
DMUL
D50
K150
D100
(D51,D50) (D103,D102,D101,D100)
K100
×
K150
→
K15000
FNC 12
DMOV
D100
K8Y000
D100 is output to Y017 to Y000
D101 is output to Y037 to Y020
FNC 12
DMOV
D102
K8Y000
D102 is output to Y057 to Y040
D103 is output to Y077 to Y060
D
D
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......