Hello Guest it is March 28, 2024, 04:21:33 AM

Author Topic: Zero an axis from G-Code...  (Read 3358 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris.Botha

*
  •  488 488
  • wine me.. dine me.. tram my mill for me...
    • View Profile
    • Digital-Jeweller
Zero an axis from G-Code...
« 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 :



Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Zero an axis from G-Code...
« Reply #1 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
« Last Edit: July 24, 2010, 05:19:19 AM by Hood »

Offline Chris.Botha

*
  •  488 488
  • wine me.. dine me.. tram my mill for me...
    • View Profile
    • Digital-Jeweller