Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 535

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
Function
FSTR(448) expresses the 32-bit floating-point number in S+1 and S (IEEE754-format) in decimal
notation or scientific notation according to the control data in words C to C+2, converts the number to
ASCII text, and outputs the result to the destination words starting at D.
• The content of C (Data format) specifies whether to express the number in S+1, S in decimal notation
or scientific notation.
• Decimal notation
Expresses a real number as an integer and fractional part.
Example: 124.56
• Scientific notation
Expresses a real number as an integer part, fractional part, and exponent part.
Example: 1.2456E-2 (1.2456 10
• The content of C+1 (Total characters) specifies the number of ASCII characters after conversion
including the sign symbol, numbers, decimal point and spaces.
• The content of C+2 (Fractional digits) specifies the number of digits (characters) below the decimal
point.
The ASCII text is stored in D and subsequent words in the following order: leftmost byte of D, rightmost
byte of D, leftmost byte of D+1, rightmost byte of D+1, etc.
Example: -1.23456
S
S+1
498
-2
)
Decimal notation (C=0 hex)
-1.23456
(SP represents a space.)
15
D:
2D
Floating-point
20
data
2E
33
00
ASCII characters are stored in order.
(Leftmost byte
Scientific notation (C=0001 hex)
- 1.23E+00
15
ASCII characters are stored in order.
(Leftmost byte
Conversion to
ASCII text
2D 20 20 31 2E 32 33 34 35 36
( ) (SP)(SP) (1) (,) (2) (3) (4) (5) (6)
Rounded off
Stored in destination words beginning with D.
87
0
Total characters = 8 (C+1 = 8 hex)
20
Fractional digits = 3 (C+2 = 3 hex)
31
32
34
00
rightmost byte)
Conversion to
ASCII text
2D 20 31 2E 32 33 45 2B 30 31
( ) (SP) (1) (,) (2) (3) (E) (+) (0) (0)
(SP represents a space.)
Stored in destination words beginning with D.
87
0
Total characters = 10 (C+1 = A hex)
2D
20
Fractional digits = 2 (C+2 = 2 hex)
31
2E
32
33
45
2B
30
30
00
00
rightmost byte)
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?

Questions and answers

Table of Contents