Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
462
18 Applied Instructions (Floating Point)
18.7 DEBIN / Scientific Notation to Floating Point Conversion
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 32-bit operation (DEBIN, DEBINP)
The decimal floating decimal point of the device specified by is converted into binary floating decimal
point, and is transferred to the device specified by .
Cautions
1) Some restrictions to applicable devices.
S1: The FX
3U and FX3UC PLCs only are applicable.
Program example
By using the DEBIN instruction, the numeric value including the decimal point can be directly converted into
the binary floating decimal point.
Example: Binary floating decimal point conversion of 3.14
3.14=314×10
-2
(Decimal floating decimal point)
As for program example of floating decimal point operation, refer to section 11.10.
Command
input
Decimal floating
decimal point
Binary floating
decimal point
[ +1, ] [ +1, ]
DEBIN
EN ENO
d
s
ds s d
Device for storing the decimal
floating decimal point data
Device for storing the converted
binary floating decimal point data
After execution
Lower position
b15 b14b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Higher position
b31 b30b29 b28 b27 b26b25 b24 b23b22 b21 b20 b19b18 b17 b16
Before
execution
Mantissa partExponential part
+1
×10
+1
Higher position Lower position
b15 b14b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0b31 b30b29 b28 b27 b26b25 b24 b23b22 b21 b20 b19b18 b17 b16
After
execution
+1
Mantissa part (23 bits)Exponential part (8 bits)
Sign (1 bit)
d
s s
d
s
s
[Structured ladder/FBD]
X002
D0
MOVP
EN
s
ENO
K314
MOVP
EN
s
ENO
K-2
D0
D1
DEBIN
EN
s
ENO
d
d
d
D10
K314 D0
K-2 D1
314×10
-2
[D0] [D1]
(D1,D0)(D11,D10)
314×10
-2
Binary floating decimal point
[ST]
MOVP(X002,K314,D0);
MOVP(X002,K-2,D1);
DEBIN(Y002,D0,D10);