Multiplying 16-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 16-bit binary data

*(P)(_U) instruction and MUL(P)(_U) instruction can be used for multiplication of 16-bit binary data.
*(P)(_U)
These instructions multiply the 16-bit binary data in the device specified by (s1) by the 16-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)
*(P)
Multiplicand data or the device where the data
to be multiplied by another is stored
*(P)_U
(s2)
*(P)
Multiplier data or the device where the data by
which another is to be multiplied is stored
*(P)_U
(d)
*(P)
Head device for storing the operation result
*(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 16-bit binary data in the device specified by (s1) by the 16-bit binary data in the device
specified by (s2), and store the multiplication result in the device specified by (d).
(s1)
···
b15
b0
b15
1234 (BIN)
5678 (BIN)
×
• When (d) is a bit device, lower-order bit is specified first.
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)
Operation error
Error code
Description
(SD0/SD8067)
2820
The range of the device specified by (d) exceeds said device range.
Word
T, ST, C, D,
C, LC
W, SD, SW, R
(s2)
(d)
(d)+1
···
···
···
b0
b31
b16 b15
7006652 (BIN)
Structured text
Not supported
Range
-32768 to +32767
0 to 65535
-32768 to +32767
0 to 65535
Double word Indirect
U\G
Z
LC
LZ
b0
Data type
Data type (label)
16-bit signed binary
ANY16
16-bit unsigned binary
ANY16_U
16-bit signed binary
ANY16
16-bit unsigned binary
ANY16_U
32-bit signed binary
ANY32
32-bit unsigned binary
ANY32_U
Constant
specification
K, H
E
$
6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
6
Others
177

Advertisement

Table of Contents
loading

Table of Contents