![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_742030685.webp)
645
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
Содержание SYSMAC CS Series
Страница 2: ......
Страница 4: ...iv ...
Страница 30: ...xxx ...
Страница 186: ...146 List of Instructions by Function Code Section 2 4 ...
Страница 194: ...154 3 35 4 MOVE BIT MOVBC 568 1273 3 35 5 BIT COUNTER BCNTC 621 1275 3 35 6 GET VARIABLE ID GETID 286 1277 ...
Страница 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Страница 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Страница 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Страница 1392: ...1352 ASCII Code Table Appendix A ...
Страница 1404: ...1364 Revision History ...