Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions
Function
These instructions compare comparison value In2 with the specified elements in an array (In1[0] to
In1[Size −1]). The comparison results are stored in comparison results array AryOut[] in the elements
with the corresponding element numbers (AryOut[0] to AryOut[Size −1]).
The value of AryOut[i] is as follows for each instruction:
Instruction
AryCmpEQV
AryCmpNEV
The following example shows the AryCmpEQV instruction when In2 is INT#10 and Size is UINT#3.
LD
abc[1]
INT#10
UINT#3
def[2]
In1[0]=abc[1]
In1[1]=abc[2]
Size=UINT#3
In1[2]=abc[3]
Precautions for Correct Use
• Use the same data type for In1[] and In2. If they are different, a building error will occur.
• Use an AryOut[] array that is at least as large as the value of Size.
• If In1[] contains real numbers and In2 is a real number, error may cause unexpected processing
results. This can occur, for example, when they contain non-terminating decimal numbers.
• If the value of Size is 0, the value of Out will be TRUE and AryOut[] will not change.
• Return value Out is not used when the instruction is used in ST.
• An error occurs in the following case. ENO will be FALSE, and AryOut[] will not change.
• If the In1[] or AryOut[] array is smaller than the value of Size.
2-120
If In1[i] = In2, the result is TRUE. Otherwise, it is FALSE.
If In1[i] ≠ In2, the result is TRUE. Otherwise, it is FALSE.
AryCmpEQV
EN
ENO
In1
In2
Size
AryOut
def[2]
10
In2=INT#10
20
In2=INT#10
30
In2=INT#10
Value of AryOut[i]
ST
AryCmpEQV(abc[1], INT#10, UINT#3, def[2]);
AryOut[0]=def[2]
AryOut[1]=def[3]
AryOut[2]=def[4]

NY-series Instructions Reference Manual (W560)

TRUE
FALSE
FALSE

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents