Delta DVP-ES2 User Manual Page 194

  • Download
  • Add to my manuals
  • Print
  • Page
    / 702
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 193
DVP-ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming
3-78
API Mnemonic Operands Function
22
D MUL P
Multiplication
Controllers
ES2/EX2 SS2
SA2
SE
SX2
Bit Devices Word devices Program Steps Type
OP
X Y M S K H KnX KnY KnM KnS T C D E F
S
1
* * * * * * * * **
S
2
* * * * * * * * **
D
* * * * * **
MUL, DMULP: 7 steps
DMUL, DMULP: 13 steps
PULSE 16-bit 32-bit
ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 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 hte 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)
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.
6. 32-bit BIN multiplication
b31..b16
X
=
+1
b31 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
If D is specified with a word device, it can specify K1~K8 to store a 32-bit result. Users can
use 2 consecutive 32-bit registers to store 64-bit data.
Page view 193
1 2 ... 189 190 191 192 193 194 195 196 197 198 199 ... 701 702

Comments to this Manuals

No comments