Nj-Series Instructions Reference Manual (W502 - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

2 Instruction Descriptions
Bit strings
InOutPos[]
(array)
Out
Num
Function
These instructions search Size elements in an array of structures In[]. The search range is therefore
from In[0] to In[Size
One of the members to search in the elements of In[] is passed as an argument to Member. The ele-
ment number of the element with the maximum or minimum value is assigned to InOutPos[0] and the
number of elements that were found is assigned to Num. If more than one element was found, the ele-
ment number of the lowest element with the maximum or minimum value in In[] is assigned to InOut-
Pos[0].
Always attach the element number to input parameter that is passed to In[], e.g., array[3].
RecMax
The RecMax instruction searches for the maximum value. The maximum value of the member to
search is assigned to search result Out.
RecMin
The RecMin instruction searches for the minimum value. The minimum value of the member to search
is assigned to search result Out.
The following example shows the RecMax instruction when Size is UINT#5.
LD
abc[0]
UINT#5
abc[0].m
def
2-500
OK
OK OK OK OK OK OK OK OK OK OK
OK
1]. The instruction searches member to search Member in the structures.
RecMax
EN
ENO
In
ghi
Size
Num
jkl
Member
InOutPos
def
Integers
ST
ghi:=RecMax(abc[0], UINT#5, abc[0].m, def, jkl);

NJ-series Instructions Reference Manual (W502)

Times, durations,
dates, and text strings

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents