Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
9 Applied Instructions (Arithmetic and Logical Operation)
9.3 MULP / Multiplication
176
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
2. 32-bit operation(DMUL, DMULP)
The data specified by is multiplied by the data specified by in the binary format, and the
multiplication result is transferred to 64-bit (four word devices).
The most significant bit of each piece of data indicates the sign (positive: 0 or negative: 1), and data is
multiplied algebraically.
(5,500×(-8,540)=-46,970,000)
When a constant (K) is specified in or , it is automatically converted into the binary format.
When a digit (K1 to K8) is specified for the device specified by , 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.
Extension function(FXU and FX2C PLCs)
The FXU PLC of V2.30 or earlier does not support the extension function.
When executing an instruction with M8023 ON, a binary float operation takes place, for example, (D1, D0) ×
(D3, D2) = (D5, D4).
In this case, K, H and D are valid as the object device for and and D is valid for .
The source data needs to be converted into binary float value in advance by FLT instruction.
Note, however, that constants K and H are automatically converted into binary float values.
Related device
1. Relationship between the flag operation and the sign
*1. Supported only by FX3S, FX3G, FX3GC, FX3U and FX3UC PLCs.
Available in the FX
3U and FX3UC PLCs of Ver. 2.30 or later.
Cautions
1) Some restrictions to applicable devices
S1:The FX
3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S2:The FX
3U and FX3UC PLCs only are applicable.
S3:Available only for a 16-bit operation. Not available for a 32-bit operation.
2) Instructions of pulse operation type are not provided in the FX
0S, FX0 or FX0N PLC.
To execute pulse operation, make the instruction execution condition pulse type.
3) When a 32-bit operation (DMUL or DMULP) is used, "Z" cannot be specified to the device specified by
.
4) In monitoring the operation results by a programming tool, 64-bit data as the operation results cannot be
monitored at one time even if a word device is used.
In such a case, the FX
3S, FX3G, FX3GC, FX3U and FX3UC PLCs can use floating point operation.
For the floating point operation, refer to Chapter 18.
Device Name Description
M8304
*1
Zero
ON : When the operation result is 0
OFF : When the operation result is not 0
Command input
Multiplication
data 2
Device storing
the multiplication
result
Multiplication
data 1
DMUL
EN
s1
s2
ENO
d
BIN
[ +3, +2, +1, ]
BIN BIN
[ +1, ] × [ +1, ]
32 bits
ds1
s2
s1
s2
d d d
32 bits 64 bits
(D51, D50) (D103, D102, D101, D100)
K100 × K150 K15000
D100 is output to Y017 to Y000
D101 is output to Y037 to Y020
D102 is output to Y057 to Y040
D103 is output to Y077 to Y060
Command input
D100D50
DMUL
EN
s1
s2
ENO
d
DMOV
EN
s
ENO
d
K8Y000
DMOV
EN
s
ENO
d
K8Y040
D100
D102
K150