Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 550

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Floating-point Math Instructions
Description
Area
Index Registers
---
Indirect addressing
,IR0 to ,IR15
using Index Registers
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –()IR15
,IR0 to ,IR15
FSTR(448) expresses the 32-bit floating-point number in S+1 and S
(IEEE754-format) in decimal notation or scientific notation according to the
control data in words C to C+2, converts the number to ASCII text, and out-
puts the result to the destination words starting at D.
The following diagram shows the contents of the 3 control words.
0000 hex: Decimal format
0001 hex: Scientific notation
Data format
0002 to 0018 hex (2 to 24 characters, see note)
Total characters
Fractional digits
0000 to 0007 hex (see note)
Note: There are limits on the total number of characters
and the number of fractional digits. See Limits on the
Number of ASCII Characters on page 519 for details.
• The content of C (Data format) specifies whether to express the number
in S+1, S in decimal notation or scientific notation.
• Decimal notation
Expresses a real number as an integer and fractional part.
Example: 124.56
• Scientific notation
Expresses a real number as an integer part, fractional part, and expo-
nent part.
Example: 1.2456E-2 (1.2456 10
• 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.
S
C
-2
)
Section 3-14
D
517

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents