Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 687

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Floating-point Math Instructions
Storage of ASCII Text
Scientific notation
15
87
0
Conversion of ASCII text number
2D
20
to 32-bit floating-point data
20
31
2E
32
33
34
45
2B
30
32
00
00
SP SP 1 . 2 3 4 E + 0 2
(2D)(20)(20)(31)(2E)(32)(33)(34)(45)(2D)(31)(38)
Spaces are
ignored during
conversion
The following diagrams show how the ASCII text number is converted to float-
ing-point data. Different conversion methods are used for numbers stored with
decimal notation and scientific notation.
ASCII Character Storage
S
FVAL(449) converts the ASCII characters
starting with the leftmost byte of S and
continuing until a byte containing 00 hex is
reached. There must be a byte containing
00 hex within the first 25 bytes.
00
Decimal notation
15
8
7
0
Sign
(20)
Integer part
Digit
(20)
Sign
SP SP
00
Positive number: Space (20 hex) or Plus sign (2B hex)
Negative number: Minus sign (2D hex)
Scientific notation
15
8
7
0
Sign
(20)
Integer part
Digit
(20)
Sign
. (2E)
Digit
SP
Digit
Sign
E (45)
Digit
Digit
00
Positive number: Space (20 hex) or Plus sign (2B hex)
Negative number: Minus sign (2D hex)
32-bit floating-point data
2
1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1
1.234 10
1 1 0 0 0 0 1 0 1 1 1 1 0 1 1 0
Sign
Exponent
15
D
1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1
D+1
1 1 0 0 0 0 1 0 1 1 1 1 0 1 1 0
Up to 00 hex
(25 characters max.)
25 characters max.
Fractional part
00
Decimal
The 7th and higher digits are ignored.
point
(The sign, decimal point, and exponent
characters are not counted as digits.)
Any spaces (20 hex) or zeroes (30 hex)
before the first digit are ignored.
25 characters max.
Exponential part
Fractional part
Sign
E
Decimal
point
The 7th and higher digits are ignored.
(The sign, decimal point, and exponent
characters are not counted as digits.)
Any spaces (20 hex) or zeroes (30 hex)
before the first digit are ignored.
Section 3-15
Stored in D and D+1.
0
00
Positive: + (2B hex)
Negative: - (2D hex)
E (45)
647

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents