Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Cartierusm on April 01, 2017, 12:59:34 PM

Title: Is there Gcode to get the machine to goto Machine Coordinates for Tool Changes?
Post by: Cartierusm on April 01, 2017, 12:59:34 PM
With a turret lathe how do I have the machine go to Machine Coordinates X0 Z0 for tool changes? I can't just do it for the regular work offset of each tool as each tool is a different distance from home.

Is there a G code I can use to get the carriage to Machine Coordinates of X0 Z0?
Title: Re: Is there Gcode to get the machine to goto Machine Coordinates for Tool Changes?
Post by: joeaverage on April 01, 2017, 03:22:54 PM
Hi,
yes, the code is G53.

For instance if you wish to rapid move to machine zero code:
G0 G53 X0 Z0

G53 is described in the Gcode list that accompanies Mach3.

Craig
Title: Re: Is there Gcode to get the machine to goto Machine Coordinates for Tool Changes?
Post by: RICH on April 01, 2017, 07:25:16 PM
Consider making machine coordinate X=0 Z=0, to also be  home , and use that position as the tool change position also.
Keeps things simple!

RICH


Title: Re: Is there Gcode to get the machine to goto Machine Coordinates for Tool Changes?
Post by: Cartierusm on April 01, 2017, 08:04:35 PM
rich I think I know what you mean. I home to x0 z0 which is my tool change position.  Thanks for the help.
Title: Re: Is there Gcode to get the machine to goto Machine Coordinates for Tool Changes?
Post by: RICH on April 02, 2017, 08:01:55 AM
FWIW,

Tool 1 is my master tool. All the tools are touched off via probing based on
the master tool, and the reference position for probing is from machine coordinates
X=0 Z=0.Machine coordinates are used for touching off the tools. The physical location of X=0 is the lathe center line and Z is set so the controlled point of the longest tool will be clear of any stock. That is the basis for how my tool table is populated.

On start up the lathe center and a Z location of the master tool is done via probing
to set it at X & Z=0 using the same tool setter. Then the Z is reprobed to locate the current end of any stock mounted in the chuck.A typical x & z location is chosen to be away from the end of the stock and that location becomes machine coordinate X & Z=0 and also home. A G54 offset is created from home to the stock.

I use a modified screen set so the above is rather automated and quickly done.
All code for any turning is based on center and end of stock. For doing mutiple turnings on the same piece of stock ie; say two widgets and each is cut off the stock, then a different / multiple work offsets are used.

Keeps it simple here,

Rich
Title: Re: Is there Gcode to get the machine to goto Machine Coordinates for Tool Changes?
Post by: Cartierusm on April 03, 2017, 12:13:08 AM
Cool. I've got pulse index homing on my servos so it's almost dead accurate every time I start up.
Title: Re: Is there Gcode to get the machine to goto Machine Coordinates for Tool Changes?
Post by: Cartierusm on April 03, 2017, 01:36:26 AM
Ok so I've got a basic grasp about how to use inputs from my pokeys to trigger events, such as cycle start, the pokeys blog outlines how to add code to mach editor.

So if I use a physical button on the pokeys and use it on an input in mach 4 how would I write the code to have that button trigger the G0G53X0Z0? Thanks.
Title: Re: Is there Gcode to get the machine to goto Machine Coordinates for Tool Changes?
Post by: RICH on April 03, 2017, 07:08:21 AM
Cartierusm,

More likely to get help if you ask reply #6 question  in Mach4 General Discussion.
I don't use Mach4 so can't help.

RICH
Title: Re: Is there Gcode to get the machine to goto Machine Coordinates for Tool Changes?
Post by: Cartierusm on April 03, 2017, 10:16:59 AM
Ah, ok thanks.