Mitsubishi Electronics FX3G Video Gaming Accessories User Manual


 
274
FX3G/FX3U/FX3UC 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
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.
Related devices
1. Relationship between flag operation and numeric value
*1. Available in all FX3G PLCs and FX3U/FX3UC PLCs Ver. 2.30 or later.
Device Name Description
M8304*1 Zero
ON: When the operation result is 0.
OFF: When the operation result is a number other than 0.
D
D
When command contact turns ON
S2
S1
×
K15(H000F)
K53(H0035)
K795(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 K8Y040
D102 is output to Y057 to Y040
D103 is output to Y077 to Y060