API
MUL
22
D
P
Bit Devices
X
Y
M
K
*
S
1
*
S
2
D
Operands:
In 16-bit instruction, D occupies 2 consecutive devices.
E xplanation
1.
2.
When D serves as a bit device, it can designate K1 ~ K4 and construct a 16-bit result,
occupying consecutive 2 groups of 16-bit data.
The 16-bit D0 is multiplied by the 16-bit D10 and brings forth a 32-bit product. The
Example
higher 16-bit are stored in D21 and the lower 16-bit are stored in D20. On/Off of the
most left bit indicates the positive/negative status of the result value.
X0
S1
S2
D
Word Devices
H KnX KnY KnM T
*
*
*
*
*
*
*
*
*
*
*
*
*
: Multiplicand S
: Multiplication
S
2
1
This instruction multiplies S
Be careful with the positive/negative signs of S
and 32-bit operations.
16-bit command:
S1
b15..........b0
b15..........b0
X
b15 is a symbol bit
b15 is a symbol bit
Symbol bit = 0 refers to a positive value.
Symbol bit = 1 refers to a negative value.
MUL
MUL
Chapter 16 PLC Function |C2000 Series
BIN Multiplication
16-bit command (7 STEPS)
MUL
C
D
*
*
32-bit command (13 STEPS)
*
*
-
*
*
Flag signal: None
D: Product
by S
in BIN format and stores the result in D.
1
2
S2
D
b31..........b16b15..............b0
=
b31 is a symbol bit (b15 of D+1)
D0
D10
D20
D0
D10 K8M0
16-58
MULP
-
-
, S
and D when doing 16-bit
1
2
+1
D
-