7-227
EVAL(P)
1
2
3
4
6
6
7
8
7.11 Character string processing instructions
7.11.12 Conversion from character string to floating decimal point data (EVAL(P))
Program Example
(1) The following program converts the character string stored in the area starting from R0 to a
32-bit floating decimal point type real number, and stores the result at D0 and D1 when X20
is turned ON.
[Ladder Mode] [List Mode]
[Operation]
(2) The following program converts the character string stored in the area starting from D10 to a
32-bit floating decimal point type real number, and stores the result at D100 and D101 when
X20 is turned ON.
[Ladder Mode] [List Mode]
[Operation]
Instruction Device
Step
R1
2DH (-)20H (space)
30H (0)31H (1)
b15 b8b7 b0
R2 2EH (.)32H (2)
33H (3)34H (4)R3
35H (5)32H (2)
31H (1)
R4
R5 00H
Ignored These are cut
D1
52
D0
R0
-1.234
1.2 3 452 10-
Instruction Device
Step
D11
20
H
(space)20
H
(space)
31
H
(1)2E
H
(.)
b15 b8b7 b0
D12 32
H
(2)33
H
(3)
34
H
(4)35
H
(5)
D13
45
H
(E)2D
H
(-)
30
H
(0)
D14
D15 32
H
(2)
D16 00
Ignored
1.2345E0-2
Ignored
D101 D100
D10
1.2345E-2