Floating Point Numbers - GE PACSystems RXi User Manual

Distributed io controller
Table of Contents

Advertisement

Type
Name
BCD-8
Eight-Digit
BCD
MIXED
Mixed
ASCII
ASCII
Note:
7.8.2

Floating Point Numbers

Floating point numbers are stored in one of two IEEE 754 standard formats that uses
adjacent 16-bit words: 32-bit single precision or 64-bit double precision.
The REAL data type represents single precision floating point numbers. The LREAL data
type represents double precision floating point numbers. REAL and LREAL variables are
typically used to store data from analog I/O devices, calculated values, and constants.
Types of Floating Point Variables
Data Type
REAL
LREAL
Note:
Internal Format of REAL Numbers
32
Register use by a single floating point number is diagrammed below. For example, if the
floating point number occupies registers R5 and R6, R5 is the least significant register and
R6 is the most significant register.
GFK-2816F
Description
Uses two consecutive 16-bit data memory locations (32
consecutive bits). Each BCD digit uses 4 bits per digit to
represent numbers from 0 to 9. The complete valid
range of the 8-digit BCD data type is 0 to 99999999.
Available only with the MUL and DIV functions. The
MUL function takes two integer inputs and produces a
double integer result. The DIV function takes a double
integer dividend and an integer divisor to product an
integer result.
Eight-bit encoded characters. A single word reference is
required to make two (packed) ASCII characters. The
first character of the pair corresponds to the low byte of
the reference word. The remaining 7 bits in each section
are converted.
Using functions that are not explicitly bit-typed will affect transitions for all bits in the written
byte/word/dword. For information about using floating point numbers, refer to Section 7.8.2,
Floating Point Numbers.
Limited to 6 or 7 significant digits, with a range of approximately
-45
±1.401298x10
Limited to 17 significant digits, with a range of approximately
±2.2250738585072020x10
The programming software allows 32-bit and 64-bit arguments (DWORD, DINT,
REAL
) to be placed in discrete memories such as %I, %M, and %R in the
, and LREAL
PACSystems target.
Bits 17-32
Precision and Range
38
through ±3.402823x10
.
-308
to ±1.7976931348623157x10
17
16
23-bit mantissa
8-bit exponent
1-bit sign (Bit 32)
August 2015
Chapter 7. CPU Program Data
Data Format
Register 2
Register 1
8
7 6
5
4
3 8
1
32
29
25
21 17
16
13
9
5
(8 BCD digits)
16
16
32
=
32
16
=
308
.
Bits 1-16
1
16
1
137

Advertisement

Table of Contents
loading

This manual is also suitable for:

Icrxictl000

Table of Contents