Omron CS1G/H-CPUxxH Instructions Manual page 587

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Floating-point Math Instructions
000000
15
1 0 1 0 1 0 0 0 0 1 1 1 0 0 1 0
D00000
0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1
D00001
000000
15
1 0 1 0 1 0 0 0 0 1 1 1 0 0 1 0
D00000
0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1
D00001
3-15-23 ASCII TO FLOATING-POINT: FVAL(449)
Purpose
566
FSTR
D00000
D00010
D00100
0
Conversion
0.327457
Storage
D00010
conditions
D00011
D00012
Total number of characters
0 . 3 2 7 4 5 7
Fractional part
Spaces
D00100
20 (Space)
20 (Space)
D00101
30 (0)
2E (.)
D00102
33 (3)
32 (2)
D00103
37 (7)
00
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).
FSTR
D00000
D00010
D00100
Conversion
0
0.327457
D00010
Storage
conditions
D00011
D00012
Total number of characters
3 . 2 7 4 5 7 E - 0 1
Fractional
Spaces
Rounded off
part
D00100
20 (Space)
20 (Space)
D00101
33 (3)
2E (.)
D00102
32 (2)
37 (7)
D00103
35 (5)
45 (E)
D00104
2D (−)
30 (0)
D00105
31 (1)
00
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.
Decimal notation
0000(Hex)
Total characters = 7 characters
0007(Hex)
0003(Hex)
Fractional digits = 3 digits (characters)
Rounded off
Scientific notation
0001(Hex)
000B(Hex)
Total characters = 11 characters
0003(Hex)
Fractional digits = 3 digits (characters)
Section 3-15

Advertisement

Table of Contents
loading

Table of Contents