2-491
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Stack and Table Instructions
2
RecRangeSearch
• 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].
• If In[] is a three-dimensional array, the element number in the first dimension of the element that
matches the search conditions is assigned to InOutPos[0], the element number in the second dimen-
sion is assigned to InOutPos[1], and the element number in the third dimension is assigned to InOut-
Pos[2].
• Make the data types of Member, MN, and MX the same as the data type of the members that are
searched in In[].
• When an element in the array is passed to In[], all elements below the passed element are pro-
cessed.
• If Member is a real number, depending on the value of Member, the desired results may not be
achieved due to error.
• If MN or MX is a real number, do not specify nonnumeric data for MN or MX.
• If the value of Size is 0, the value of Out is FALSE and the value of Num is 0. InOutPos[] does not
change.
• The correct result is not obtained if the value of Mode is _BIN_ASC or _BIN_DESC and the elements
of In[] are not in ascending or descending order. Place the elements in ascending or descending
order before executing this instruction.
• An error occurs in the following cases. ENO will be FALSE, and Out, InOutPos[], and Num will not
change.
• The data types of the member to search in In[], MN, and MX are different.
• MN is greater than MX.
• The value of Condition is outside of the valid range.
• The value of Mode is outside of the valid range.
• The value of Size exceeds the array area of In[].
• Member is not a member of In[].
• The array size of InOutPos[] is smaller than the number of dimensions of In[].
• Member is not integer or real number data.
• MN, MX, and Member have different data types.
• In[] is not an array of structures.
Additional Information
Precautions for Correct Use