Found the reference you were talking about. It was in the DOC directory for Mach4. It was very helpful in understanding variables in G code.
I think the problem might be with the variable to get the current tool number (#2029). When I look in Diagnostics->regfile-> and then # Variables, #2029 only shows 0.000. It doesn't matter what tool I change to.
Kenny