EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 556

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
523
Floating-point Math Instructions Section 3-14
Storage of ASCII Text 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.
Flags
00
S
ASCII Character Storage
Up to 00 hex
(25 characters max.)
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.
15 078
00
SP SP
(20)
(20)
00
Decimal notation
Digit
25 characters max.
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.
Positive number: Space (20 hex) or Plus sign (2B hex)
Negative number: Minus sign (2D hex)
Integer part
Sign
Fractional part
Decimal
point
Sign
15 078
(20)
00
SP
E
(20)
. (2E)
E (45)
00
Scientific notation
25 characters max.
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.
Positive number: Space (20 hex) or Plus sign (2B hex)
Negative number: Minus sign (2D hex)
Positive: + (2B hex)
Negative: - (2D hex)
Exponential part
Sign
Fractional part
Decimal
point
Integer part
Sign
E (45)
Sign
Digit
Digit
Digit
Sign
Digit Digit
Name Label Operation
Error Flag ER ON if the digits (integer and fractional parts) in the source
data starting at S are not 30 to 39 hex (0 to 9).
ON if the first two digits of the exponential part do not con-
tain 45 and 2B hex (E+) or 45 and 2D hex (E-). (integer
and fractional parts) in the source data starting at S are
not 30 to 39 hex (0 to 9).
ON if there are two or more exponential parts in the
source data.
ON if the data is +
or after conversion.
ON is the are 0 characters in the text data.
ON if a byte containing 00 hex is not found within the first
25 characters.
OFF in all other cases.
Equals Flag = ON if the conversion result is 0.
OFF in all other cases.

Table of Contents

Related product manuals