Instruction Support And Operand Restrictions - Omron WS02-CXPC1-V9 - V9 Operation Manual

Table of Contents

Advertisement

Instruction Support and Operand Restrictions

XFER
&20
a[0]
Using a WORD data type with 10 elements for both variables a and b:
To transfer 20 words, be sure to specify 20 elements for both array variables a and b.
Internally allocated address
Example: H700
Array variable
10 words
a (10 words)
Example: H710
Example: H719
2-7

Instruction Support and Operand Restrictions

Instruction Support
Restrictions on Operands
68
b[0]
Internally allocated address
20 words
Example: H810
20 words will be
transferred regard-
less of the size of ar-
ray variables a and b.
Example: H819
Other Operand Specifying Size: Variable
Even if the number of array elements does not match the size (i.e., size to be
processed by the instruction) specified in another operand (variable), the CX-
Programmer will not output an error when compiling. The instruction will be
executed according to the size specified by the operand, regardless of the
number of elements in the array variable.
Particularly if the number of elements in the array is less than the size (i.e.,
size to be processed by the instruction) specified by another operand (vari-
able), other variables will be affected and unexpected operation may occur.
The tables in this appendix indicate which instructions can be used in function
blocks created with ladder programming language, the restrictions that apply
to them and to the operands, including the variables (whether array variables
and AT settings or external variable specifications are required, and which
data types can be used).
Instructions that are not supported for use in function block definitions by the
CX-Programmer, CP-series CPU Units, and CS/CJ-series CPU Units with unit
version 3.0 are given as Not supported in function blocks in the Symbol col-
umn.
• Operands that specify the first or last of multiple words, thereby requiring
AT setting or specification of array variables, are indicated as follows in
the AT setting or array required column.
Yes: An AT setting (or external specification) or array variable must be
specified for the operand to specify the first or last of multiple words.
• The value within parentheses is the fixed size used by the instruction
for reading, writing, or other processing. This size indicates either the
data type size or the size required for the array variable specified in
word units. For array variables, this size must be the same as the num-
ber of elements. Otherwise, the CX-Programmer will output an error
when compiling.
Array variable
10 words
a (10 words)
The variables allocated in this area
(H810 to H819 in this example) are
overwritten. The data is variable-
length data, so the CX-Programmer
will not output a compile error.
Section 2-7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cx-programmer 9Sysmac ws02-cxpc1-v9

Table of Contents