EasyManua.ls Logo

Omron NJ501-1500

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
Loading...
2 Instruction Descriptions
2-10
NJ-series Instructions Reference Manual (W502)
Array variable names are followed by “[]” and “(array)” is specified. For these variables, specify an ele-
ment of the array (i.e., specify the subscript) as the parameter.
An example is shown below. Here, the table shows that In1[] is a BYTE array.
The data type table indicates the arrays for which structures and unions can be used as elements, as
shown in the following example. For these variables, specify an element of the array (i.e., specify the
subscript) as the parameter.
The table indicates any variables for which you can specify either an array or an array element as the
parameter.
In the following example, you can specify a parameter with a basic data type, or you can specify an
array or an array element. To specify an array, specify only the array as the parameter. To specify an
array element, specify an element of the array (i.e., specify the subscript) as the parameter.
The errors that can occur for an instruction are given in the Precautions for Correct Use section. The fol-
lowing three errors, however, can be detected for any instruction. They are not listed in the Precautions
for Correct Use sections.
Reading or writing elements that exceed the range of an array variable.
Example: Setting a[4] for an input variable for the array variable a[0..3].
Passing parameters that are not variables to instructions for which array variables are defined for
input, output, or in-out variables.
Assigning a text string that is longer than the defined number of bytes to a STRING variable.
Assigning a text string that does not end in a NULL character to a STRING variable.
Array Specifications
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
In1[] (array) OK
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
In1[] (array) Arrays of structures or unions can also be specified.
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
In1 An array or array element can also be specified.
Others
Errors Detected for All Instructions

Table of Contents

Related product manuals