DVP-ES2/EX2/EC5/SS2/SA2/SX2/SE&TP Operation Manual - Programming
API
Mnemonic Operands Function
119 D
EBIN P
Scientific to float conversion
Type
OP
Bit Devices Word devices Program Steps
X Y M S K H KnX
KnY
KnM
KnS
T C D E F
DEBIN, DEBINP: 9 steps
SS2
SX2
SS2
SX2
SS2
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
D1
D2D3
[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
ExponentReal number