Delta DVP-ES2 User Manual
Page 417
3 . I n s t r u c t i o n S e t
3 - 3 0 1
API Mnemonic Operands
Function
119
D EBIN P
Scientific to float conversion
Controllers
ES2/EX2 SS2 SA2
SE
SX2
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
PULSE 16-bit 32-bit
ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2
Operands:
S: Source device D: Conversion result
Explanation:
1.
The instruction converts the decimal floating point value in S to a binary floating point value
and stores the results in the register specified by D.
2. For
example,
S = 1234, S +1 = 3. The decimal floating point value will be: 1.234 x 10
6
3.
D must be binary floating point format. S and S +1 represent the real number and exponent of
the floating point number.
4.
EBIN instruction is the specific instruction used to convert decimal floating point value to binary
floating point value
5.
Range of real number: -9,999 ~ +9,999. Range of exponent: - 41 ~ +35. Range of PLC decimal
floating point value. If the conversion result is 0, zero flag M1020 = ON.
Program Example 1:
When X1 = ON, the decimal floating point value in (D1, D0) will be converted to binary floating point
and the conversion result is 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.
Use FLT instruction (API 49) to convert BIN integer into binary floating point value before
performing floating point operation. The value to be converted must be BIN integer and use
DEBIN instruction to convert the decimal floating point value into a binary one.
2.
When X0 = ON, move K314 to D0 and K-2 to D1 to generate decimal floating point value (3.14
= 314 Ч 10
-2
).