2 Instruction Descriptions
2-110
NJ-series Instructions Reference Manual (W502)
AryCmpEQV and AryCmpNEV
These instructions compare a value to the values of the elements of an array.
* If you omit an input parameter, the default value is not applied. A building error will occur.
AryCmpEQV: Determines if the elements are equal.
AryCmpNEV: Determines if the elements are not equal.
Instruction Name FB/FUN Graphic expression ST expression
AryCmpEQV Array Value Com-
parison Equal
FUN AryCmpEQV(In1, In2, Size,
AryOut);
AryCmpNEV Array Value Com-
parison Not Equal
FUN AryCmpNEV(In1, In2, Size,
AryOut);
Variables
Name Meaning I/O Description Valid range Unit Default
In1[] (array) Comparison
array
Input
Array containing the ele-
ments to compare
Depends on data type.
---
*
In2 Comparison
value
Value to compare
Size Number of
comparison
elements
Number of elements to com-
pare
Depends on data type. 1
AryOut[]
(array)
Comparison
results array
In-out Comparison results array Depends on data type.
--- ---
Out Return value Output Always TRUE TRUE only --- ---
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[] (array) OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK
In2 Must be same data type as the elements of In1[].
Size OK
AryOut[]
(array)
OK
Out OK
(@)AryCmpEQV
EN ENO
In1 Out
In2
Size
AryOut
(@)AryCmpNEV
EN ENO
In1 Out
In2
Size
AryOut