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

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

Advertisement

Floating-point Math Instructions
Example: 1.23456
Floating-point
S
data
S+1
642
• The content of C+1 (Total characters) specifies the number of ASCII char-
acters after conversion including the sign symbol, numbers, decimal point
and spaces.
• The content of C+2 (Fractional digits) specifies the number of digits (char-
acters) 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.
Decimal notation (C=0000 hex)
1.23456
2D 20 20 31 2E 32 33 34 35 36
( ) (SP)(SP) (1) (,) (2) (3) (4) (5) (6)
(SP represents a space.)
15
87
0
D:
2D
20
20
31
2E
32
33
34
00
00
ASCII characters are stored in order.
(Leftmost byte
rightmost byte)
Scientific notation (C=0001 hex)
1.23E+00
2D 20 31 2E 32 33 45 2B 30 31
( ) (SP) (1) (,) (2) (3) (E) (+) (0) (0)
15
87
0
2D
20
31
2E
32
33
45
2B
30
30
00
00
ASCII characters are stored in order.
(Leftmost byte
rightmost byte)
Conversion to
ASCII text
Rounded off
Stored in destination words beginning with D.
Total characters = 8 (C+1 = 0008 hex)
Fractional digits = 3 (C+2 = 0003 hex)
Conversion to
ASCII text
(SP represents a space.)
Stored in destination words beginning with D.
Total characters = 10 (C+1 = 000A hex)
Fractional digits = 2 (C+2 = 0002 hex)
Section 3-15

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents