Omron CJ - REFERENCE MANUAL 10-2009 Reference Manual page 543

Table of Contents

Advertisement

Sample program
Converting ASCII Text in Decimal Notation to Floating-point Data
When CIO 0.00 is ON in the following example, FVAL(449) converts the specified decimal-notation
ASCII text number in the source words starting at D0 to floating-point data and writes the result to
destination words D100 and D101.
Converting ASCII Text in Scientific Notation
When CIO 0.00 is ON in the following example, FVAL(449) converts the specified scientific-notation
ASCII text number in the source words starting at D0 to floating-point data and writes the result to
destination words D100 and D101.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
0.00
FVAL
D0
D100
The 7th and higher digits are ignored.
(The sign, decimal point, and leading
zeroes/spaces are not counted.)
Ignored
0 1 . 2 3 4 5 2 1
Conversion
D0
2D ( )
20 (Space)
D1
30 (0)
31 (1)
D2
2E (.)
32 (2)
D3
33 (3)
34 (4)
D4
35 (5)
32 (2)
D5
31 (1)
00
0.00
FVAL
D0
D100
Ignored
Ignored
1 . 2 3 4 5 E - 0 2
Conversion
D0
2D ( )
20 (Space)
D1
31 (1)
2E (.)
D2
32 (2)
33 (3)
D3
34 (4)
35 (5)
D4
45 (E)
2D ( )
D5
30 (0)
32 (2)
D6
00
00
D100
D101
15
0
0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0
1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0
Storage
15
0
0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0
D100
1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0
D101
15
0
0 1 0 0 0 0 1 0 1 0 1 0 1 1 1 1
1 0 1 1 1 1 0 0 0 1 0 0 1 0 1 0
Storage
15
0
0 1 0 0 0 0 1 0 1 0 1 0 1 1 1 1
1 0 1 1 1 1 0 0 0 1 0 0 1 0 1 0
3. Instructions
3
505

Advertisement

Table of Contents
loading

Table of Contents