![background image](http://html1.mh-extra.com/html/eaton/elc-pb/elc-pb_programming-manual_4017452238.webp)
3 . I n s t r u c t i o n S e t
M N050 03003E F or mo re infor ma tio n vi sit:
w w w. e a t o n . c o m
3-69
API Mnemonic
Operands
Function
22
D MUL P
S
1
, S
2
, D
Multiplication
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
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P 32 16 P 32 16
P
Operands:
S
1
: Multiplicand
S
2
: Multiplier
D
: Multiplication result
Description:
1.
The contents of the two source devices (
S
1
,
S
2
) are multiplied together and the result is
stored at the destination device (
D
).
2.
MSB = 0, positive; MSB = 1, negative.
3. If
operands
S
1
,
S
2
use index register F, then only 16-bit instruction is available.
4. If
operand
D
uses index register E, then the 32-bit instruction must be used.
5. 16-bit
instruction
b15................ b00
X
=
b15................ b00
b31............ b16 b15............. b00
+1
b15 is a symbol bit
b15 is a symbol bit
b31 is a symbol 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 value
D(D+1)
If
D
is specified with a bit address, it must use K1 ~ K4 to store a 16-bit result. The result of
the MUL instruction is always a 32-bit value. So, the D-register address used for the
destination (D) for this instruction always uses 2 consecutive D registers. .
6. 32-bit
instruction
b31.. b16
X
=
+1
b31 is a symbol bit
b31 is a symbol bit
b63 is a symbol bit(b15 of D+3)
b31=0,S1(S1+1) are positive value
b31=1,S1(S1+1) are negative value
b31=0,S2(S2+1) are positive value
b31=1,S2(S2+1)
are negative value
b63=0, D~(D+3) are positive value
b63=1, D~(D+3) are 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 bit address, it must utilize K1~K8 to store a 32-bit result. If
D
is
specified with a word address and the controller is a ELC-PB, ELCB-PB, it will only store the
low 32-bit data. The ELC-PC/PA/PH/PV, ELCM-PH/PA will store 64-bit data. 4 consecutive
16-bit registers will be used to store 64-bit data.
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...