458
18 Applied Instructions (Floating Point)
18.5 DEVAL / Character String to Floating Point Conversion
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Program example
1) This is a program for converting the character string stored after R0 when the X000 is turned ON, into
binary floating decimal point, and storing in D0, D1.
2) This is a program for converting the character string stored after D10 when the X000 is turned ON, into
binary floating decimal point, and storing in D100, D101.
Operation in overflow, underflow, zero mode
Condition Operation
Absolute value of conversion result
< 2
-126
The value of is the smallest value (2
-126
) of 32-bit real number, and borrow flag (M8021) is
ON.
Absolute value of conversion result
≥ 2
128
The value of is the largest value (2
128
) of 32-bit real number, and carry flag (M8022) is ON.
The conversion result is really zero
(when the mantissa part is "0")
Zero flag (M8020) is ON.
b15 b8 b7 b0
R1
To be ignored.
D1
-1.23452
20H(space)
31H(1)
32H(2)
34H(4)
2DH(-)
30H(0)
2EH(.)
33H(3)
32H(2)
00H
35H(5)
31H(1)
To be cut off.
2 3 410 15 2
R0
R3
R2
R5
R4
D0
X000
DEVALP
EN ENO
d
s
R0 D0
[Structured ladder/FBD] [ST]
DEVALP(X000,R0,D0);
b15 b8 b7 b0
D11
To be ignored.
D101
1.2345E-2
20H(space)
2EH(.)
33H(3)
35H(5)
20H(space)
31H(1)
32H(2)
34H(4)
2DH(-) 45H(E)
To be ignored.
D10
D13
D12
D16
D14
32H(2) 30H(0)
D15
D100
3 4 521 0E 2
00H
X000
DEVALP
EN ENO
d
s
D10 D100
[Structured ladder/FBD] [ST]
DEVALP(X000,D10,D100);