
13.PROGRAM COMMAND B-63943EN-1/02
- 1720 -
13.5.2 Indirect Axis Address Command
Overview
When the custom macro function is enabled, indirect specification by
an axis number can be performed by using AX[(axis-number)] instead
of directly specifying an axis name during specification for an axis
address.
In addition, the axis number corresponding to the axis name can be
obtained by using AXNUM[(axis-name)].
- Indirect axis address
Indirect axis address AX[] can be used to perform a command for an
axis with an axis number (AX[] must be followed by '=').
AX[(axis-number)]=(value);
(axis-number): 1 to number-of-control-axis (Number of each
path for a multipath system)
(value): Value for the axis specified by its axis number
When the specified (axis-number) is invalid, the alarm (PS0331)
occurs. A decimal fraction is rounded off to the integral axis
number.
A variable such as a local variable, common variable, or system
variable can also be used as (axis-number). When calculation using
a variable name is performed for (axis-number), however, the variable
name must be enclosed with [].
1. AX[1]=100.0;
A value of 100.000 is specified for the first axis.
2. AX[#500]=200.0;
A value of 200.000 is specified for the axis having the value stored in
#500 as its axis number.
3. AX[#500+1]=300.0;
A value of 300.000 is specified for the axis having the value stored in
#500 plus 1 as its axis number.
4. SETVN 500 [ABC];
AX[#ABC]=400.0;
A value of 400.000 is specified for the axis having the value stored in
#ABC(#500) as its axis number.
5. SETVN 500 [ABC];
AX[[#ABC]+1]=500.0;
A value of 400.000 is specified for the axis having the value stored in
#ABC(#500) plus 1 as its axis number.
6. SETVN 500 [ABC];
AX[#ABC+1]=500.0;
The alarm (PS0114) occurs.