![Omron CJ1G-CPUxx Instructions Manual Download Page 590](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491590.webp)
569
Floating-point Math Instructions
Section 3-15
Flags
Examples
Converting ASCII Text in Decimal Notation to Floating-point Data
When CIO 000000 is ON in the following example, FVAL(449) converts the
specified decimal-notation ASCII text number in the source words starting at
D00000 to floating-point data and writes the result to destination words
D00100 and D00101.
15
0
7
8
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
0
7
8
(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.
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...