Chapter 4. Ladder Diagram (LD) Programming
GFK-2950C
February 2018
123
4.6.4
Convert BCD4, UINT, DINT, or REAL to INT
BDC4, UINT, and DINT
When this function receives power flow, it converts the input data into the equivalent single-
precision signed integer (INT) value, which it outputs to Q. This function does not change the original
input data. The output data can be used directly as input for another program function, as in the
examples.
The function passes power flow when power is received, unless the data is out of range.
REAL
When REAL_TO_INT receives power flow, it rounds the input REAL data up or down to the nearest
single-precision signed integer (INT) value, which it outputs to Q. REAL_TO_INT does not change the
original REAL data.
Note:
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 or NaN (Not
a Number).
Warning
Converting from REAL to INT may result in
example, REAL 7.4E15, which equals 7.4 × 10
15
, converts
to INT OVERFLOW.
Tip:
To truncate a REAL value and express the result as an INT, i.e., to remove the fractional part
of the REAL number and express the remaining integer value as an INT, use TRUNC_INT.
Operands
Parameter Description
Allowed Operands
Optional
IN
The value to convert to INT.
All except S, SA, SB, and SC
No
Q
The INT equivalent value of the original value in IN.
All except S, SA, SB, and SC
No
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...