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

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

Advertisement

Floating-point Math Instructions
Flags
Examples
648
Name
Label
Error Flag
ER
Equals Flag
=
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.
000000
Ignored
0 1 . 2 3 4 5 2 1
D00000
2D ( )
D00001
30 (0)
D00002
2E (.)
D00003
33 (3)
D00004
35 (5)
D00005
31 (1)
Converting ASCII Text in Scientific Notation
When CIO 000000 is ON in the following example, FVAL(449) converts the
specified scientific-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.
Operation
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
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.
ON if the conversion result is 0.
OFF in all other cases.
FVAL
D00000
D00100
The 7th and higher digits are ignored.
(The sign, decimal point, and leading
zeroes/spaces are not counted.)
Conversion
20 (Space)
15
31 (1)
0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0
32 (2)
34 (4)
1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0
32 (2)
00
Storage
15
0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0
D00100
1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0
D00101
Section 3-15
after conversion.
0
0

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SYSMAC CJ - REFERENCE MANUAL 08-2008 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents

Save PDF