Chapter 4. Ladder Diagram (LD) Programming
GFK-2950C
February 2018
213
4.12.2
Equal, Not Equal, Greater or Equal, Greater Than, Less or Equal,
Less Than
Other data types:
_INT
_REAL
_LREAL
_UINT
When the relational function receives power flow, it compares input IN1 to input IN2. These
operands must be the same data type. If inputs IN1 and IN2 are equal, the function passes power to
the right, unless IN1 and/or IN2 is NaN (Not a Number). The following relational functions can be
used to compare two numbers:
Function Definition
Relational Statement
EQ
Equal
IN1=IN2
NE
Not Equal
IN1≠IN2
GE
Greater Than or Equal
IN1≥IN2
GT
Greater Than
IN1>IN2
LE
Less Than or Equal
IN1≤IN2
LT
Less Than
IN1<IN2
Note:
If an
occurs with a _UINT operation, the result wraps around
–
refer to the section
If the _DINT or _INT operations are fed the largest possible value with any sign, they cannot
determine if it is an overflow value. The power flow output of the previous operation would
need to be checked. If an overflow occurred on a previous DINT, or INT operation, the result
was the largest possible value with the proper sign and no power flow.
Tip:
To compare values of different data types, first use conversion functions to make the types
the same. The relational functions require data to be one of the following types: DINT, INT,
REAL, LREAL, or UINT.
Operands
Parameter Description
Allowed Operands
Optional
IN1
The first value to be compared; the value on the left side of the
relational statement.
All except S, SA, SB, SC No
IN2
The second value to be compared; the value on the right side of
the relational statement. IN2 must be the same data type as
IN1.
All except S, SA, SB, SC No
Q
The power flow. If the relational statement is true, Q is
energized, unless IN1 or IN2 is NaN.
Power flow
No
Summary of Contents for PACSystems RX7i
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451...