E L C P r o g r a m m i n g M a n u a l
F o r m o r e i n f o r m a t i o n v i s i t :
w w w. e a t o n . c o m
M N 0 5 0 0 3 0 0 3 E
3 - 3 0 4
API Mnemonic
Operands
Function
122
D EMUL P
S
1
, S
2
, D
Floating Point 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
*
DEMUL, DEMULP: 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.
S
1
×
S
2
=
D
. The floating point value in the registers specified by
S
1
is multiplied by the floating
point value in the registers specified by
S
2
and the result is stored in the registers specified by
D
. All data will be operated in floating point format and the result will also be stored in floating
point format.
2.
If the source operands
S
1
or
S
2
are a constant K or H, the integer value will automatically be
converted to binary floating point to perform the multiplication operation.
3.
S
1
and
S
2
can specify the same register number (the same address can be used as
S
1
and
S
2
).
If in this case and continuous execution of the DEMUL instruction is used, the data in the
register will be multiplied one time in every program scan as long as the condition contact =
ON. Therefore, the pulse instruction (DEMULP) is recommended.
4.
Flags: M1020 Zero flag, M1021 Borrow flag and M1022 Carry flag
If the absolute value of the result is larger than the maximum floating point value, the carry flag
M1022= ON.
If absolute value of the results is less than the minimum floating point value, the borrow flag
M1021= ON.
If the conversion result is 0, zero flag M1020= ON.
Program Example1:
When X1= ON, the binary floating point value in D1/D0 is multiplied by the binary floating point value
in D11/D10 and the result is stored in D21/D20.
D0
DEMUL
X1
D10
D20
Содержание 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...