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 0
API Mnemonic
Operands
Function
119
D
EBIN
P
S, D
Scientific to Floating 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
*
DEBIN, DEBINP: 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 a decimal floating point value in the register specified by
S
to a binary floating point
value and store the result in the register specified by
D
.
2. For
example,
S
=1234,
S
+1= 3 will become
S
=1.234 x 10
6
3.
D
must be in binary floating point format.
S
and
S
+1 represent the real number and the
exponent of the floating point number respectively.
Program Example 1:
When X1= ON, the decimal floating point
value in D1/D0 will be converted to binary
floating point stored in D3/D2.
D0
DE BIN
X1
D2
D0
D1
D2
D3
[D0] * 10
[D1]
Decimal
Floating Point
Binary
Floating Point
23 bits for real number
8 bits for exponent
1 bit for sign bit
Exponent Real number
Exponent
Real number
Program Example 2:
1.
Before performing this floating point operation, you must use the FLT instruction to convert BIN
integer to binary floating point. The source data should be a BIN integer. The DEBIN
instruction can be used to convert a floating point value to a binary floating point value.
2.
When X0= ON, move K314 to D0 and move K-2 to D1 to generate decimal floating point
format (3.14 = 314
×
10
-2
).
K314
MOVP
X0
D0
D0
DEBIN
D2
K-2
MOVP
D1
K314 D0 [D1]
K-2 D1 [D0]
314 x10
(D1 D0) (D3 D2)
,
,
314 x10
-2
Binary
Floating Point
Содержание 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...