2 Instruction Descriptions
2-490
NJ-series Instructions Reference Manual (W502)
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.
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.
Member = abc[0].m
Out = ghi
InOutPos[0] = def
Num = jkl
MX
MN
Matches
Member m
0000
1234
0000
0000
1234
0000
0000
2345
0000
0000
3456
0000
0000
3456
0000
TRUE
UINT#0
UINT#2
INT#2000
INT#1000
Size=UINT#5
In[0]=abc[0]
In[1]=abc[1]
In[2]=abc[2]
In[3]=abc[3]
In[4]=abc[4]
Mode=_BIN_ASC
Condition=_EQ_BOTH
Member = abc[0].m
Out = ghi
InOutPos[0] = def
Num = jkl
MX
MN
Member m
Matches
0000
3456
0000
0000
3456
0000
0000
2345
0000
0000
1234
0000
0000
1234
0000
TRUE
UINT#2
UINT#3
2000
1000
Size=UINT#5
In[0]=abc[0]
In[1]=abc[1]
In[2]=abc[2]
In[3]=abc[3]
In[4]=abc[4]
INT#2000
INT#1000
Mode=_LINEAR
Condition=_EQ_BOTH