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 1 2
API Mnemonic
Operands
Function
128
D POW P
S
1
, S
2
, D
Floating Point Power 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
1
*
*
*
S
2
*
*
*
D
*
DPOW, DPOWP: 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
: base address.
S
2
: exponent.
D
: result
Description:
6.
Perform the power operation to binary floating point
S
1
to the power of
S
2
and save the result
to
D
.
POW [
S
1
+1,
S
1
]^[
S
2
+1,
S
2
]=
D.
That is,
S
1
to the power of
S
2
.Only a positive number is valid
for
S
1
. Result
D
needs to use two consecutive D-registers to accommodate the 32-bit floating
point value.
S
1
and
S
2
also need to be converted to floating point before executing the DPOW
instruction.
7.
Error flags: M1067 and M1068, read D1067 and D1068.
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) and (D2, D3) to binary floating point and save the results in
register (D10, D11) and (D12, D13).
2.
When M1= ON, use (D10, D11) and (D12, D13) to perform the power operation and save the
result in 32-bit register (D20, D21).
3.
When M2= ON, convert (D20, D21) binary floating point 32-bit registers to decimal floating
point and save the result in register (D30, D31).
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...