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

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

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).
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
IN
The value to convert to INT.
Q
The INT equivalent value of the original value in IN.
GFK-2950C
Converting from REAL to INT may result in Overflow. For
example, REAL 7.4E15, which equals 7.4 × 10
to INT OVERFLOW.
February 2018
Chapter 4. Ladder Diagram (LD) Programming
Warning
Allowed Operands
All except S, SA, SB, and SC
All except S, SA, SB, and SC
15
, converts
Optional
No
No
123

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents