Offsets
All tool work offsets can be read and set within a macro expression to allow the
coordinates to be preset to approximate locations, or set coordinates to val-
ues based upon results of skip signal locations and calculations. When any of
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
va r i a b l e US a G e
All variables are referenced with a pound sign (#) followed by a positive num-
ber: #1, #101, and #501.
Variables are decimal values that are represented as oating point numbers.
If a variable has never been used, it can take on a special “undened” value.
This indicates that it has not been used. A variable can be set to undened with
the special variable #0. #0 has the value of undened or 0.0 depending on the
context it is used in. Indirect references 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.