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 #531 background imageLoading...
Page #531 background image
2-483
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Stack and Table Instructions
2
RecSearch
The RecSearch instruction searches Size elements in the array of structures In[]. The search range is
therefore from In[0] to In[Size
−
1]. The instruction searches member to search Member in the structures
for members that match the search key Key.
One of the members to search in the elements of In[] is passed as an argument to Member.
If any matching elements are found, the value of search result Out changes to TRUE. The element
number of the matching element is assigned to InOutPos[0] and the number of matching elements is
assigned to Num. If there is more than one matching element, the element number of the lowest match-
ing element in In[] is assigned to InOutPos[0]. If there are no matching elements, the value of Out will be
FALSE and InOutPos[0] and Num will be 0.
Always attach the element number to input parameter that is passed to In[], e.g., array[3].
The data type of search method Mode is enumerated type _eSEARCH_MODE. The meanings of the
enumerators are as follows:
For a linear search, the search is performed in order from the first element of In[].
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
In[] (array) Specify an array of structures.
Size OK
Member OK OK OK OK OK OK OK OK OK OK OK
Specify the same data type as the search member of In[]
Key Must be the same data type as Member.
Mode Refer to Function for the enumerators of the enumerated type _eSEARCH_MODE.
InOutPos[]
(array)
OK
Out OK
Num OK
Function
Enumerator Meaning
_LINEAR Linear search
_BIN_ASC Ascending binary search
_BIN_DESC Descending binary search

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