68
Instruction Support and Operand Restrictions
Section 2-7
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-7
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, 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.
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.
Summary of Contents for SYSMAC CX-Programmer 9
Page 2: ......
Page 4: ...iv ...
Page 6: ...vi ...
Page 8: ......
Page 16: ...xvi ...
Page 20: ...xx ...
Page 26: ...xxvi Application Precautions 4 ...
Page 27: ...Part 1 Function Blocks ...
Page 28: ......
Page 154: ...128 Procedures Section 3 2 ...
Page 155: ...Part 2 Structured Text ST ...
Page 156: ......
Page 160: ...134 CX Programmer Specifications Section 4 2 ...
Page 206: ...180 Procedures Section 6 1 ...
Page 208: ...182 System defined external variables supported in function blocks Appendix A ...
Page 230: ...204 Revision History ...
Page 231: ......