2 Instruction Descriptions
2-86
NJ-series Instructions Reference Manual (W502)
NE (<>)
The NE (<>) instruction determines if the contents of two variables are not equivalent.
* If you omit an input parameter, the default value is not applied. A building error will occur.
The NE (<>) instruction determines if the contents 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.
The following example is for when In1 equals In2 (both have a value of INT#5). The value of variable
abc will be FALSE.
Instruction Name FB/FUN Graphic expression ST expression
NE (<>) Not Equal FUN Out:=(In1<>In2);
Variables
Name Meaning I/O Description Valid range Unit Default
In1 and In2 Comparison
data
Input Values to compare Depends on data type.
--- *
Out Comparison
result
Output Comparison result Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1 and In2 OKOKOKOKOKOKOKOKOKOKOKOKOKOKOK
Enumerations can also be specified.
Out OK
Function
(@)<>
EN
In1
In2
(@)NE
EN
In1
In2
Out
Out
abc:=(INT#5<>INT#5);
LD ST
INT#5
INT#5
abc
NE
EN
In1
In2