![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268685.webp)
646
Floating-point Math Instructions
Section 3-15
Converting to ASCII Text in Scientific Notation
When CIO 000000 is ON in the following example, FSTR(448) converts the
floating-point data in D00001 and D00000 to scientific-notation ASCII text and
writes the ASCII text to the destination words beginning with D00100. The
contents of the control words (D00010 to D00012) specify the details on the
data format (scientific notation, 11 characters total, 3 fractional digits).
3-15-26 ASCII TO FLOATING-POINT: FVAL(449)
Purpose
Converts a number expressed in ASCII text (decimal or scientific notation) to
a 32-bit floating-point value (IEEE754-format) and outputs the floating-point
value to the specified words.
This instruction is supported by CS1-H, CJ1-H, CJ1M, and CS1D CPU Units
only.
2E (.)
32 (2)
00
1 0 1 0 1 0 0 0 0 1 1 1 0 0 1 0
0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1
FSTR
D00000
D00010
D00100
000000
15
0
D00000
D00001
0000(Hex)
0007(Hex)
0003(Hex)
D00010
D00011
D00012
0.327457
30 (0)
33 (3)
37 (7)
D00100
D00101
D00102
D00103
0 . 3 2 7 4 5 7
20 (Space)
20 (Space)
Decimal notation
Total characters = 7 characters
Fractional digits = 3 digits (characters)
Conversion
Rounded off
Storage
conditions
Spaces
Total number of characters
Fractional part
2E (.)
37 (7)
45 (E)
30 (0)
00
1 0 1 0 1 0 0 0 0 1 1 1 0 0 1 0
0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1
FSTR
D00000
D00010
D00100
000000
15
0
D00000
D00001
0001(Hex)
000B(Hex)
0003(Hex)
D00010
D00011
D00012
0.327457
33 (3)
32 (2)
35 (5)
2D (
−
)
31 (1)
D00100
D00101
D00102
D00103
D00104
D00105
3 . 2 7 4 5 7 E - 0 1
20 (Space)
20 (Space)
Scientific notation
Total characters = 11 characters
Fractional digits = 3 digits (characters)
Conversion
Rounded off
Storage
conditions
Spaces
Total number of characters
Fractional
part
Summary of Contents for SYSMAC CS1D-CPU**
Page 3: ...iv...
Page 29: ...xxx...
Page 185: ...146 List of Instructions by Function Code Section 2 4...
Page 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Page 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Page 1391: ...1352 ASCII Code Table Appendix A...