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

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

4.6.6

Convert BCD8, UINT, INT, REAL or LREAL to DINT

BCD8, UINT, and INT
When this function receives power flow, it converts the data into the equivalent signed double-
precision integer (DINT) value, which it outputs to Q. The conversion to DINT does not change the
original 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 data is out of range.
REAL and LREAL
When REAL_TO_DINT or LREAL_TO_DINT receives power flow, it rounds the input data to the nearest
double-precision signed integer (DINT) value, which it outputs to Q. These functions do not change
the original REAL or LREAL 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 an out-of-range DINT
value.
Tip:
To truncate a REAL value and express the result as a DINT, i.e., to remove the fractional part
of the REAL number and express the remaining integer value as a DINT, use TRUNC_DINT.
Operands
Parameter Description
IN
The value to convert to DINT.
Q
The DINT equivalent value of the original input value in IN. All except S, SA, SB, and SC
GFK-2950C
Converting from LREAL or REAL to DINT may result in
Overflow. For example, REAL 5.7E20, which equals 5.7 ×
10
20
, converts to DINT OVERFLOW.
February 2018
Chapter 4. Ladder Diagram (LD) Programming
Warning
Allowed Operands
All except S, SA, SB, and SC
Optional
No
No
127

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents