![Omron CJ1G-CPUxx Instructions Manual Download Page 587](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491587.webp)
566
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-23 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 the CS1-H, CJ1-H, CJ1M, and CS1D CPU
Units only.
20 (Space)
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
20 (Space)
30 (0)
33 (3)
37 (7)
D00100
D00101
D00102
D00103
0 . 3 2 7 4 5 7
Decimal notation
Total characters = 7 characters
Fractional digits = 3 digits (characters)
Conversion
Rounded off
Storage
conditions
Spaces
Total number of characters
Fractional part
20 (Space)
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
20 (Space)
33 (3)
32 (2)
35 (5)
2D (
−
)
31 (1)
D00100
D00101
D00102
D00103
D00104
D00105
3 . 2 7 4 5 7 E - 0 1
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 CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...