Omron cx-programmer 5.0-function block operation Benutzerhandbuch

Seite von 183
52
Instruction Support and Operand Restrictions
Section 2-6
 
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. 
2-6
Instruction Support and Operand Restrictions
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). 
Instruction Support
Instructions that are not supported for use in function block definitions by the
CX-Programmer and CS/CJ-series CPU Units with unit version 3.0 are given
as Not supported in function blocks in the Symbol column.
Restrictions on Operands
• 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.
 
XFER  
&20   a[0]   b[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
Internally allocated address
Example: H700
10 words
Example: H710
Example: H719
Array variable 
a (10 words)
20 words
Example: H810
20 words will be 
transferred regard-
less of the size of ar-
ray variables a and b.
Example: H819
10 words
Array variable 
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.