Chapter 4. Ladder Diagram (LD) ProgrammingGFK-2950C February 2018 2134.12.2 Equal, Not Equal, Greater or Equal, Greater Than, Less or Equal,Less ThanOther data types:_INT_REAL_LREAL_UINTWhen the relational function receives power flow, it compares input IN1 to input IN2. Theseoperands must be the same data type. If inputs IN1 and IN2 are equal, the function passes power tothe right, unless IN1 and/or IN2 is NaN (Not a Number). The following relational functions can beused to compare two numbers:Function Definition Relational StatementEQ Equal IN1=IN2NE Not Equal IN1≠IN2GE Greater Than or Equal IN1≥IN2GT Greater Than IN1>IN2LE Less Than or Equal IN1≤IN2LT Less Than IN1Note: If an Overflow occurs with a _UINT operation, the result wraps around – refer to the sectionon Overflow.If the _DINT or _INT operations are fed the largest possible value with any sign, they cannotdetermine if it is an overflow value. The power flow output of the previous operation wouldneed to be checked. If an overflow occurred on a previous DINT, or INT operation, the resultwas 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 typesthe same. The relational functions require data to be one of the following types: DINT, INT,REAL, LREAL, or UINT.OperandsParameter Description Allowed Operands OptionalIN1 The first value to be compared; the value on the left side of therelational statement.All except S, SA, SB, SC NoIN2 The second value to be compared; the value on the right side ofthe relational statement. IN2 must be the same data type asIN1.All except S, SA, SB, SC NoQ The power flow. If the relational statement is true, Q isenergized, unless IN1 or IN2 is NaN.Power flow No