I'm wondering if there is a table somewhere, which I cannot seem to find, of the variables Mach 3 uses. I often find myself machining cast parts that will vary in thickness. As such it's difficult to machine them consistently. I've come up with a simple electronic circuit that uses the tool and G31 to sense the top of the part and then say drill a screwhole with countersink to a depth below that measured height. The fixture holding the part is insulated from the vise, the circuit uses the probe input. It works great. The code is;
G00 (to just above the part)
G31 (to touch the part, completing the circuit, about 20 microamps flows through the spindle bearing at about 6 or so volts)
#101=#2002 (transfers system variable for the Z axis height on touch to a user variable)
G01 Z[#101-0.405] (0.405 is the depth to drill a perfect screwhole)
The problem is I cannot use coolant with my current system as it conducts electricity and will give a false reading or error. I have a new situation that I must use coolant. I want to cut a slot using a sidemill into a part that also varies in thickness (Z height varies). I can manually touch off on the top and bottom of it. Slow but should give consistent results. I would like the Gcode to be able to use the current Z position in it's calculations, which of course would make it a lot easier than doing the calculations by hand and then entering them into the Gcode each time I machine a part.
The problem is that #2002 seems to only be set by a G31 function, which won't work in this situation because of the coolant. Is there a system variable that can be accessed that has the current Z value?
I'd prefer a list of all variables if there is one.
Thanks, If anyone is interested I can do a write up on my circuit. It's quite simple.