Chapter 4. Ladder Diagram (LD) Programming
GFK-2950C
February 2018
129
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.
Warning
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.
Warning
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.
Operands
Parameter Description
Allowed Operands
Optional
IN
The value to convert to REAL.
All except S, SA, SB, and SC No
Q
The REAL equivalent value of the original input value in IN. All except S, SA, SB, and SC No
Содержание PACSystems RX7i
Страница 357: ......
Страница 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451...