EasyManua.ls Logo

Delta VFD015CB21A-21 - Page 334

Delta VFD015CB21A-21
363 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 14 PLC Function |C200 Series
14-49
API
22 D
MUL
P
S1 S2 D
BIN Multiplication
Bit Devices Word Devices
X Y M K H KnX KnY KnM T C D
S
1
S
2
D
Operands:
In 16-bit instruction, D occupies 2 consecutive devices.
16-bit command (7 STEPS)
MUL
MULP
32-bit command (13 STEPS)
Flag signal: None
Explanation
1.
S
1
: Multiplicand S
2
: Multiplication D: Product
2. This instruction multiplies S
1
by S
2
in BIN format and stores the result in D.
Be careful with the positive/negative signs of S
1
, S
2
and D when doing 16-bit
and 32-bit operations.
16-bit command:
S1
D
b15..........b0
X
b15..........b0
S2
=
b31..........b16b15..............b0
D+1
b15 is a symbol bit b15 is a symbol bit
b31 is a symbol bit (b15 of D+1)
Symbol bit = 0 refers to a positive value.
Symbol bit = 1 refers to a negative value.
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.
Example
The 16-bit D0 is multiplied by the 16-bit D10 and brings forth a 32-bit product. The
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
D0 D10
D20
MUL
D0 D10
K8M0
MUL
Call 1(800)985-6929 for Sales
deltaacdrives.com
sales@deltaacdrives.com
Call 1(800)985-6929 for Sales
deltaacdrives.com
sales@deltaacdrives.com

Related product manuals