2 - 67
2 Standard Functions
NX-series Safety Control Unit Instructions Reference Manual (Z931)
Comparison Instructions
2
NE
NE
This function determines if the values of two variables are not equivalent.
If you omit an input or output parameter, a building error will occur.
An error will not occur if the output terminal is not used or if it is connected to an input terminal on the
next instruction.
This function determines if the values of two variables In1 and In2 are not equivalent.
If they are not equivalent, the comparison result Out is TRUE. If they are equivalent, Out is FALSE.
• You can compare In1 and In2 even if they have different data types, such as a safety data type and a
standard data type, as long as the notations and sizes of the data types are the same. You cannot
compare data with data types that have different notations or sizes, such as WORD and INT. You can
compare integer data, such as INT data with SAFEINT data and DINT data with SAFEDINT data.
• The input condition depends on whether the output is safety data or standard data. If the condition is
not met, a building error will occur.
• If you set a safety data type variable for the output terminal, set a safety data type variable for the two
input terminals as well.
• If you set a standard data type variable for the output terminal, you can set either a safety data type
variable or a standard data type variable for the input terminal.
Instruction Name FB/FUN Graphic expression
NE Not Equal FUN
Variables
Name I/O Description Valid range Default
In1 or In2 Comparison
data
Input Values to com-
pare
Depends on data type. ---
Out Comparison
result
Output Comparison
result
Depends on data type. ---
Boolean Bit strings Integers Durations
BOOL
SAFEBOOL
BYTE
SAFEBYTE
WORD
SAFEWORD
DWORD
SAFEDWORD
INT
SAFEINT
DINT
SAFEDINT
TIME
SAFETIME
In1 or In2 OK OK OK OK OK OK OK OK OK OK OK OK OK OK
Out OK OK
Function
Precautions for Correct Use
NE