From: Frank T. <fr...@fr...> - 2010-02-27 23:59:48
|
I'm trying to write a couple of Gcode programs to automate my tool zeroing on my lathe. I'm planning on having two scripts - one to initialise zero relative to my tool #0 (everything will be relative to tool #0), and the second one will be to zero each tool after that (and update the tool table). Just focusing on the first script, I use G38.3 to touch off the tool against my touch plate. After this, I want to set the G54 coordinate to 0. How do I do this? I can G10 L2, but it appears to use machine coordinates. I've looked in the axis code, and it uses G10 L2, and sets the G54 offset using [current machine position] - [new position]. Can this be done in Gcode? I can't see how to get the current machine position in gcode. I guess I could fudge it and force G54 to be the same as the machine coordinate system before I start. Thanks, Frank |