3 . I n s t r u c t i o n S e t
M N 0 5 0 0 3 0 0 3 E 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
3 - 3 0 7
API Mnemonic
Operands
Function
124
D EXP P
S, D
Floating Point Exponent Operation
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C
D
E
F
S
*
*
*
D
*
DEXP, DEXPP: 9 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
: operand source address
D
: operand result address
Description:
1.
The DEXP instruction calculates e
S
, where the exponent is
S
2. e
[
S
+1,
S
]
=[
D
+1,
D
]
3.
Both S and D must be 32 bit floating point values and therefore each value uses two
consecutive D-registers.
4.
S
can
be a positive or negative value.
5. When
operand
D
= e
S
, e=2.71828 and
S
is a floating point value.
6.
Error flags: M1067 and M1068. Error codes: D1067 and D1068.
7.
Flags: M1020 Zero flag, M1021 Borrow flag and M1022 Carry flag.
If the absolute value of the result is larger than the maximum allowable floating point value, the
carry flag M1022= ON.
If the absolute value of the result is less than the minimum allowable floating point value, the
borrow flag M1021= ON.
If the conversion result is 0, zero flag M1020= ON.
Program Example:
1.
When M0= ON, convert (D0, D1) to binary floating point and save the result in register (D10,
D11).
2.
When M1= ON, use (D10, D11) as the exponent to perform the operation: e
S
. The result is a
binary floating point value that is saved in register (D20, D21).
3.
When M2= ON, convert (D20, D21) from binary floating point to decimal floating point and
save the result in register (D30, D31).
M0
RST
M1081
M1
DEXP
D10
D20
M2
DEBCD
D20
D30
DFLT
D0
D10
Содержание 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...