93
96-8000 rev R June 2007
Macros
Note: Parameter bits are numbered 0 through 31. 32-bit parameters are formatted, on-screen, with bit 0 at the top-
left, and bit 31 at the bottom-right.
Pallet Changer
The status of the pallets, from the Automatic Pallet Changer are checked using the following variables:
#7501-#7506 Pallet priority
#7601-#7606 Pallet status
#7701-#7706 Part program numbers assigned to pallets
#7801-#7806 Pallet usage count
#3028 Number of pallet loaded on receiver
Offsets
All tool work offsets can be read and set within a macro expression. This allows the programmer to preset coordi-
nates to approximate locations, or to set coordinates to values based upon the results of skip signal locations and
calculations. When any of the offsets are read, the interpretation lookahead queue is stopped until that block is
executed.
#5201-#5205 G52 X, Y, Z, A, B OFFSET VALUES
#5221-#5225 G54 “ “ “ “ “ “ “
#5241-#5245 G55 “ “ “ “ “ “ “
#5261-#5265 G56 “ “ “ “ “ “ “
#5281-#5285 G57 “ “ “ “ “ “ “
#5301-#5305 G58 “ “ “ “ “ “ “
#5321-#5325 G59 “ “ “ “ “ “ “
#7001-#7005 G110 X, Y, Z, A, B OFFSET VALUES
“ “ “ “ “ “ “ “ “
#7381-#7385 G129 X, Y, Z, A, B OFFSET VALUES
VARIABLE USAGE
All variables are referenced with a pound sign (#) followed by a positive number. Examples are: #1, #101, and #501.
Variables are decimal values that are represented as floating point numbers. If a variable has never been used, it can
take on a special “undefined” value. This indicates that it has not been used. A variable can be set to undefined with
the special variable #0. #0 has the value of undefined or 0.0 depending on the context it is used in. Indirect refer-
ences to variables can be accomplished by enclosing the variable number in brackets.
#[<Expression>]
The expression is evaluated and the result becomes the variable accessed. For example:
#1=3;
#[#1]=3.5 + #1;
This sets the variable #3 to the value 6.5.
Variables can be used in place of G-code address where “address” refers to the letters A-Z.
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;
The values in the variables at runtime are used as the address values.