Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Chris.Botha on July 23, 2010, 11:32:06 PM

Title: Zero an axis from G-Code...
Post by: Chris.Botha on July 23, 2010, 11:32:06 PM
Guys I am a little stuck here..

I am cutting a job with massive paths.. from two sides of a ring in my rotary unit, the ring being symmetrical.

SO this means when i go to 180 to cut the other side i have to

1: regenerate all paths to reflect he change in A from 0 to 180 (plus indexed offsets etc) (4 hours more pathing)
2: physically be there , manually roll A to 180, zero it out in mach then rerun the same paths

Now... it strikes me that i can automate this by rolling to 180 once my paths are done, then somehow from gcode or macro zero out the A axis so it is at 0 degrees in mach whilst its actually still at 180 on the mill, then just copy and paste my paths.

Clues???

Thanks :



Title: Re: Zero an axis from G-Code...
Post by: Hood on July 24, 2010, 05:17:24 AM
Write a macro and call it from code. For example if you put a macro in your profiles macro folder called m2345.m1s and have the following in the macro
DoOemButton(1011)
Sleep(500)

When you call m2345 from code it will zero the work coords of the A axis.

If you are not wanting this to be a permanent change you could also look at G52 and see if that will do what you want.

Hood
Title: Re: Zero an axis from G-Code...
Post by: Chris.Botha on July 24, 2010, 08:27:13 AM
Thanks :)