2-87
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Comparison Instructions
2
NE (<>)
• The functions of the NE instruction and the <> instruction are exactly the same. Use the form that is
easier to use.
• Use the NEascii instruction (page 2-93) to determine if text strings are not equal.
• If the data types of In1 and In2 are different, the smaller one is expanded to a data type that includes
the ranges of both of the data types.
• You cannot compare bit string data (BYTE, WORD, DWORD, or LWORD) with integers (SINT, INT,
DINT, LINT, USINT, UDINT, ULINT). You cannot compare bit string data with real number data (REAL
and LREAL).
• Signed integers (SINT, INT, DINT, and LINT) cannot be compared to unsigned integers (USINT, UINT,
UDINT, and ULINT).
• You can compare enumerations only to other enumerations.
• If In1 and In2 are real numbers, error may cause unexpected processing results. This can occur, for
example, when they contain non-terminating decimal numbers.
• Two values that are positive infinity or two values that are negative infinity are equivalent.
• If the value of either In1 or In2 is nonnumeric data, the value of Out is FALSE.
• If this instruction is used in a ladder diagram, the value of Out changes to FALSE if an error occurs in
the previous instruction on the rung.
Additional Information
Precautions for Correct Use