Omron SYSMAC CP Series Instruction & Reference Manual page 288

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

2 Instructions
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 des-
tination 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 des-
tination words D100 and D101.
2-252
0.00
FVAL
D0
D100
The 7th and higher digits are ignored.
(The sign, decimal point, and leading
zeroes/spaces are not counted.)
Ignored
Conversion
20 (Space)
D0
D1
31 (1)
32 (2)
D2
34 (4)
D3
32 (2)
D4
00
D5
D100
D101
0.00
FVAL
D0
D100
Ignored
Ignored
1 . 2 3 4 5 E - 0 2
Conversion
20 (Space)
D0
D1
D2
D3
D4
D5
D6
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
1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0
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
D100
1 0 1 1 1 1 0 0 0 1 0 0 1 0 1 0
D101
CP1E CPU Unit Instructions Reference Manual(W483)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents