In the block: N1 G0 G90 X1.0 Y0; the variables can be set to the following
values:
#7=0;
#11=90;
#1=1.0;
#2=0.0;
and replaced by: N1 G#7 G#11 X#1 Y#2; Values in the variables at runtime are
used as the address values.
ad d r e S S SU b S t i t U t i o n
The usual method of setting control addresses A-Z is the address followed by a
number. For example:
G01 X1.5 Y3.7 F20. ;
Sets addresses G, X, Y and F to 1, 1.5, 3.7 and 20.0 respectively and thus
instructs the control to move linearly, G01, to position X=1.5 Y=3.7 at a feed
rate of 20 inches per minute. Macro syntax allows the address values to be
replaced with any variable or expression.
The previous statement can be replaced by the following code:
#1=1;
#2=.5;
#3=3.7;
#4=20;
G#1 X[#1+#2] Y#3 F#4 ;
The permissible syntax on addresses A-Z (exclude N or O) is as follows:
<address><-><variable> A-#101
<address>[<expression>] Y[#5041+3.5]
<address><->[<expression>] Z-[SIN[#1]]
If the variable value does not agree with the address range, the control will
generate an alarm. For example, the following code would result in a range er-
ror alarm because tool diameter numbers range from 0-50.
#1=75;
D#1;
When a variable or expression is used in place of an address value, the value
is rounded to the least signicant digit. If #1=.123456, then G1X#1 would move
the machine tool to .1235 on the X axis. If the control is in the metric mode, the
machine would be moved to .123 on the X axis.
When an undened variable is used to replace an address value, then that ad-
dress reference is ignored. For example, if #1 is undened then the block