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

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

Advertisement

Using the same example as before, the order of the array elements and the processing results will be
as shown below for an ascending binary search.
Mode=_BIN_ASC
In[0]=abc[0]
In[1]=abc[1]
In[2]=abc[2]
Size=UINT#5
In[3]=abc[3]
In[4]=abc[4]
For a descending binary search, the array elements in the input parameter that is passed to In[] must be
in descending order before this instruction is executed. Then a binary search is performed by executing
this instruction.
Using the same example as before, the order of the array elements and the processing results will be
as shown below for a descending binary search.
Mode=_BIN_DESC
In[0]=abc[0]
In[1]=abc[1]
Size=UINT#5
In[2]=abc[2]
In[3]=abc[3]
In[4]=abc[4]
Additional Information
• In[] can be a member of a higher-level structure.
Example: In[0]=str0.str1[0]
• In[] can be an array with two or more dimensions. If In[] is a two-dimensional array, the element num-
ber in the first dimension of the element that matches the search conditions is assigned to InOut-
Pos[0] and the element number in the second dimension is assigned to InOutPos[1].

NY-series Instructions Reference Manual (W560)

Key
INT#1234
0000
1234
0000
0000
1234
0000
0000
Member = abc[0].m
2345
0000
0000
3456
Member m
0000
0000
3456
0000
Key
Member=abc[0].m
INT#1234
0000
Member m
3456
0000
0000
3456
0000
0000
2345
0000
0000
1234
0000
0000
1234
0000
2 Instruction Descriptions
Matches
Out = ghi
TRUE
InOutPos[0] =
def[0]
UINT#0
UINT#2
Num = jkl
Matches
Out = ghi
TRUE
InOutPos[0] =
def[0]
UINT#3
UINT#2
Num = jkl
2
2-511

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents