EasyManuals Logo

Omron CX-PROGRAMMER V8.1 User Manual

Omron CX-PROGRAMMER V8.1
231 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 #64 background imageLoading...
Page #64 background image
39
Function Block Specifications
Section 2-1
An array can be set only for internal variables or input-output variables.
Any data type except for STRING can be specified for an array variable,
as long as it is an internal variable.
When entering an array variable name in the algorithm of a function block
definition, enter the array index number in square brackets after the vari-
able name. The following three methods can be used to specify the index.
(In this case the array variable is a[].)
Directly with numbers (for ladder or ST language programming)
Example: a[2]
With a variable (for ladder or ST language programming)
Example: a[n], where n is a variable
Note INT, DINT, LINT, UINT, UDINT, or ULINT can be used as the vari-
able data type.
With an equation (for ST language programming only)
Example: a[b+c], where b and c are variables
Note Equations can contain only arithmetic operators (+, , *, and /).
An array is a collection of data elements that are the same type of data. Each
array element is specified with the same variable name and a unique index.
(The index indicates the location of the element in the array.)
A one-dimensional array is an array with just one index number.
Example: When an internal variable named SCL is set as an array variable
with 10 elements, the following 10 variables can be used:
SCL[0], SCL[1], SCL[2], SCL[3], SCL[4], SCL[5], SCL[6], SCL[7], SCL[8], and
SCL[9]
Note Use an array variable when specifying the first or last of multiple words in an
instruction operand to enable reusing the function block if an internal variable
with a AT property cannot be set for the operand and an external variable can-
not be set. When using an array setting for an input-output variable, specify
the address of the first word for the input parameter (CX-Programmer version
7.0 or higher). When using an array setting for an internal variable, prepare an
array variable with the number of elements for the required size, and after set-
DINT/UDINT/DWORD 1,024
LINT/ULINT/LWORD 512
Data type Number of elements
SCL
0
1
2
3
4
5
6
7
8
9
Specify SCL[3] to access this data element.
WORD variable
WORD variable
WORD variable
WORD variable
WORD variable
WORD variable
WORD variable
WORD variable
WORD variable
WORD variable
Settings for variable SCL as an array
variable with element numbers 0 to 9.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-PROGRAMMER V8.1 and is the answer not in the manual?

Omron CX-PROGRAMMER V8.1 Specifications

General IconGeneral
BrandOmron
ModelCX-PROGRAMMER V8.1
CategorySoftware
LanguageEnglish

Related product manuals