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 - 2 9 9
API Mnemonic
Operands
Function
118
D EBCD P
S, D
Floating to Scientific Conversion
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
*
DEBCD, DEBCDP: 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
: Data source
D
: Destination result
Description:
1.
Convert the binary floating point value in the register specified by
S
to a decimal floating point
value and store the result in the register specified by
D
.
2.
ELC controllers utilize the binary floating point format. The DEBCD instruction is the instruction
used to convert binary floating point to decimal floating point.
3.
Flag: M1020 Zero flag, M1021 Borrow flag, 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 Example:
When X0= ON, the binary floating point value in D1/D0 will be converted to decimal floating point
and the result stored in D3/D2.
D0
DE BCD
X0
D2
D0
D1
D2
D3
Binary
Floating Point
23 bits for real number, 8 bits for exponent
1 bit for symbol bit
[D2] * 10
[D3]
Decimal
Floating Point
Exponent Real number
Real number Exponent
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...