EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #511 background imageLoading...
Page #511 background image
2-463
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Conversion Instructions
2
SizeOfAry
SizeOfAry
The SizeOfAry instruction gets the number of elements in an array.
* If you omit the input parameter, the default value is not applied. A building error will occur.
The SizeOfAry instruction gets the number of elements in array In[]. For the input parameter, use an
array name, such as array, and not an array element name, such as array[0].
The following figure shows a programming example.
Instruction Name FB/FUN Graphic expression ST expression
SizeOfAry Get Number of
Array Elements
FUN Out:=SizeOfAry(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In[] (array) Array Input Array Depends on data type.
--- *
Out Number of
elements
Output Number of elements Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In[] (array)
OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK
Arrays of enumerations or structures can also be specified.
Out OK
Function
(@)SizeOfAry
EN ENO
In Out
def:=SizeOfAry(abc);
LD ST
def
abc ARRAY[0..3] OF INT
abc
SizeOfAry
EN ENO
In
Variable
Data type
In[0]=abc[0]
In[1]=abc[1]
In[2]=abc[2]
In[3]=abc[3]
Out=def
UINT#4
Number of array elements

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals