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

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

Advertisement

The data type of search method Mode is enumerated type _eSEARCH_MODE. The meaning of the
enumerators are as follows:
Enumerator
_LINEAR
_BIN_ASC
_BIN_DESC
For a linear search, the search is performed in order from the first element of In[].
The following example is for when Size is UINT#5, MN is INT#1000, MX is INT#2000, Condition is
_EQ_BOTH and Mode is _LINEAR.
LD
abc[0]
UINT#5
abc[0].m
INT#1000
INT#2000
_EQ_BOTH
_LINEAR
def[0]
Condition=_EQ_BOTH
Mode=_LINEAR
Size=UINT#5
For an ascending binary search, the array elements in the input parameter that is passed to In[] must be
in ascending order before this instruction is executed. Then a binary search is performed by executing
this instruction.

NY-series Instructions Reference Manual (W560)

Meaning
Linear search
Ascending binary search
Descending binary search
RecRangeSearch
EN
ENO
ghi
In
Size
Num
jkl
Member
MN
MX
Condition
Mode
InOutPos
def[0]
MN
INT#1000
MX
INT#2000
0000
In[0]=abc[0]
3456
Member m
0000
0000
In[1]=abc[1]
2345
0000
0000
In[2]=abc[2]
1234
0000
0000
In[3]=abc[3]
3456
0000
0000
In[4]=abc[4]
1234
0000
ST
ghi:=RecRangeSearch(abc[0], UINT#5, abc[0].m, INT#1000,
INT#2000, _EQ_BOTH, _LINEAR, def[0], jkl);
Member = abc[0].m
Out = ghi
Num = jkl
InOutPos[0] =
def[0]
2 Instruction Descriptions
TRUE
Matches
UINT#2
UINT#2
2
2-515

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents