Multiplying 32-Bit Binary Data - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Multiplying 32-bit binary data

D*(P)(_U) instruction and DMUL(P)(_U) instruction can be used for multiplication of 32-bit binary data.
D*(P)(_U)
These instructions multiply the 32-bit binary data in the device specified by (s1) and the 32-bit binary data in the device
specified by (s2), and store the result in the device specified by (d).
Ladder diagram
(s1)
(s2)
(d)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s1)
D*(P)
Multiplicand data or the head device where the
data to be multiplied by another is stored
D*(P)_U
(s2)
D*(P)
Multiplier data or the head device where the
data by which another is to be multiplied is
D*(P)_U
stored
(d)
D*(P)
Head device for storing the operation result
D*(P)_U
■Applicable devices
Operand
Bit
X, Y, M, L,
U\G T, ST,
SM, F, B, SB
(s1)
(s2)
(d)
Processing details
• These instructions multiply the 32-bit binary data in the device specified by (s1) by the 32-bit binary data in the device
specified by (s2), and store the multiplication result in the device specified by (d).
(s1)
(s1)+1
(s2)+1
···
···
···
b31
b16 b15
b0
b31
b16 b15
123456 (BIN)
567890 (BIN)
×
• When (d) is a bit device, only the lower 32 bits of the multiplication result are stored and the upper 32 bits cannot be
specified. If the upper 32 bits data of the multiplication operation result are required, temporarily store the result in a word
device, and transfer the data stored in word device ((d)+2) and ((d)+3) to the specified bit devices.
Ex.
Multiplication result when (d) is a bit device
• K1 ... Lower 4 bits (b0 to b3)
• K4 ... Lower 16 bits (b0 to b15)
• K8 ... Lower 32 bits (b0 to b31)
Range
-2147483648 to +2147483647
0 to 4294967295
-2147483648 to +2147483647
0 to 4294967295
Word
T, ST, C, D,
U\G
C, LC
W, SD, SW, R
(s2)
(d)+2
(d)+3
···
···
···
b0
b63
b48 b47
b32
b31
70109427840 (BIN)
Structured text
Not supported
Data type
32-bit signed binary
32-bit unsigned binary
32-bit signed binary
32-bit unsigned binary
64-bit signed binary
64-bit unsigned binary
Double word Indirect
specification
Z
LC
LZ
(d)
(d)+1
···
···
b16 b15
b0
6.2 Arithmetic Operation Instructions
Data type (label)
ANY32
ANY32_U
ANY32
ANY32_U
ANY32_S_ARRAY
(Number of elements:
2)
ANY32_U_ARRAY
(Number of elements:
2)
Constant
Others
K, H
E
$
6 BASIC INSTRUCTIONS
183
6

Advertisement

Table of Contents
loading

Table of Contents