EasyManua.ls Logo

Delta DVP-EX2 - Page 199

Delta DVP-EX2
1006 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...
DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming
3-78
API
Mnemonic Operands Function
Controllers
ES2/EX2/
EC5
SS2
SA2
SE
SX2
22 D MUL P
Multiplication
Type
OP
Bit Devices Word devices Program Steps
X Y M S K H KnX
KnY
KnM
KnS
T C D E F
MUL, MULP: 7 steps
DMUL, DMULP: 13 steps
S
1
*
*
*
*
*
*
*
*
*
*
S
2
*
*
*
*
*
*
*
*
*
*
D
*
*
*
*
*
*
*
PULSE
16-bit
32-bit
ES2/EX2
/EC5
SS2
SA2
SE
SX2
ES2/EX2
/EC5
SS2
SA2
SE
SX2
ES2/EX2
/EC5
SS2
SA2
SE
SX2
Operands:
S
1
: Multiplicand S
2
: Multiplicator D: Product
Explanations:
1. This instruction multiplies S
1
by S
2
in BIN format and stores the result in D. Care should be
taken on positive/negative signs of S
1
, S
2
and D when doing 16-bit and 32-bit operations.
2. MSB = 0, positive; MSB = 1, negative.
3. If operands S
1
, S
2
use index F, then only 16-bit instruction is available.
4. If operand D use index E, then only 16-bit instruction is available.
5. 16-bit BIN multiplication
b15................ b00
X =
b15................ b00 b31............ b16 b15.............b00
+1
b15 is the sign bit b15 is the sign bit
b31 is the sign bit(b15 of D+1)
b15=0,S1 is a positive value
B15=1,S1 is a negative value
b15=0,S2 is a positive value
b15=1,S2 is a negative value
b31=0,D(D+1) is a positive value
b31=1, is a negative valueD(D+1)
S
1
D
D
S
2
16-bit value x 16-bit value = 32-bit value
If D is specified with a bit device, it can designate K1 ~ K4 to store a 16-bit result. Users can
use consecutive 2 16-bit registers to store 32-bit data.
If the product of a 16-bit multiplication must be a 16-bit value (16-bit value x 16-bit value =
16-bit value), users have to use API 114 MUL16/MUL16P. Please refer to the explanation of
API 114 MUL16/MUL16P for more information.
6. 32-bit BIN multiplication
b31..b16
X
=
+1
b
31 is the sign bit b31 is the sign bit
b63 is the sign bit(b15 of D+3)
B31=0,S1(S1+1) is a positive value
b31=1,S1(S1+1) is a negative value
b31=0,S2(S2+1) is a positive value
b31=1,S2(S2+1) is a negative value
b63=0, D~(D+3) is a positive value
b63=1, D~(D+3) is a negative value
b15..b00
b31..b16 b15..b00
+1
b63. b48 b47. b32 b31. b16 b15. b00
+3 +2 +1

Table of Contents

Related product manuals