Convert Bcd4, Bcd8, Uint, Int, Dint, And Lreal To Real - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

4.6.7

Convert BCD4, BCD8, UINT, INT, DINT, and LREAL to REAL

When this function receives power flow, it converts the input data into the equivalent 32-bit floating-
point (REAL) value, which it outputs to Q. The conversion to REAL does not change the original input
data.
The output data can be used directly as input for another program function.
The function passes power flow when power is received, unless the conversion would result in a
value that is out of range.
Operands
Parameter Description
IN
The value to convert to REAL.
Q
The REAL equivalent value of the original input value in IN. All except S, SA, SB, and SC
GFK-2950C
Converting from BCD8 to REAL may result in the loss of
significant digits.
This is because a BCD8 value is stored in a DWORD,
which uses 32 bits to store a value, whereas a REAL (32-
bit IEEE floating point number) uses 8 bits to store the
exponent and the sign and only 24 bits to store the
mantissa.
Converting from DINT to REAL may result in the loss of
significant digits for numbers with more than 7
significant base-10 digits.
This is because a DINT value uses 32 bits to store a
value, which is the equivalent of up to 10 significant
base-10 digits, whereas a REAL (32-bit IEEE floating
point number) uses 8 bits to store the exponent and
the sign and only 24 bits to store the mantissa, which is
the equivalent of 7 or 8 significant base-10 digits. When
the REAL result is displayed as a base-10 number, it
may have up to 10 digits, but these are converted from
the rounded 24-bit mantissa, so that the last 2 or 3
digits may be inaccurate.
February 2018
Chapter 4. Ladder Diagram (LD) Programming
Warning
Warning
Allowed Operands
All except S, SA, SB, and SC
Optional
No
No
129

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents