EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #162 background imageLoading...
Page #162 background image
2 Instruction Descriptions
2-114
NJ-series Instructions Reference Manual (W502)
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:
The following example shows the AryCmpLEV instruction when In2 is INT#20 and Size is UINT#3.
• Use the same data type for In1[] and In2.
• 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.
Function
Instruction Value of AryOut[i]
AryCmpLTV If In1[i] < In2, the result is TRUE. Otherwise, it is FALSE.
AryCmpLEV If In1[i] <= In2, the result is TRUE. Otherwise, it is FALSE.
AryCmpGTV If In1[i] > In2, the result is TRUE. Otherwise, it is FALSE.
AryCmpGEV If In1[i] >= In2, the result is TRUE. Otherwise, it is FALSE.
Precautions for Correct Use
AryCmpLEV(abc[1], INT#20, UINT#3, def[2]);
LD ST
abc[1]
INT#20
def[2] def[2]
UINT#3
AryCmpLEV
EN ENO
In1
In2
Size
AryOut
In1[0]=abc[1]
In1[1]=abc[2]
In1[2]=abc[3]
In2=INT#20
In2=INT#20
In2=INT#20
AryOut[0]=def[2]
AryOut[1]=def[3]
AryOut[2]=def[4]
Size=UINT#3
10
20
30
TRUE
TRUE
FALSE

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals