2 Instruction Descriptions
2-84
NJ-series Instructions Reference Manual (W502)
EQ (=)
The EQ (=) instruction determines if the contents of two or more variables are all equivalent.
* If you omit the input parameter that connects to InN, the default value is not applied, and a building error will occur. For
example, if N is 3 and the input parameters that connect to In1 and In2 are omitted, the default values are applied, but if the
input parameter that connects to In3 is omitted, a building error will occur.
The EQ (=) instruction determines if the contents of from two to five variables In1 to InN are all equiva-
lent. The comparison result Out is TRUE only when all values are equivalent. Otherwise, the value of
Out is FALSE.
The following example is for when In1 is INT#3, In2 is INT#5 and In3 is INT#10. The value of variable
abc will be FALSE.
Instruction Name FB/FUN Graphic expression ST expression
EQ (=) Equal FUN Out:=(In1=In2) & (In2=In3)
& ··· &
(InN-1=InN);
Variables
Name Meaning I/O Description Valid range Unit Default
In1 to InN Comparison
data
Input Values to compare, N = 2 to
5
Depends on data type.
--- 0*
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 to InN OKOKOKOKOKOKOKOKOKOKOKOKOKOKOK
Enumerations can also be specified.
Out OK
Function
(@)=
EN
In1
:
InN
:
(@)EQ
EN
In1
:
InN
:
Out
Out