"go-to-zero" macro

Post Reply
User avatar
DavidCousins
Vectric Wizard
Posts: 359
Joined: Sat Mar 17, 2007 2:56 pm
Location: Huntsville, Alabama

"go-to-zero" macro

Post by DavidCousins »

Can some one help me with a macro? I'm trying to zero a rotary fourth axis. But the regular "go-to-zero" macro buries the bit into the wood. The z zero is in the center of the wood. I was hoping that mach 3 had the capabilities to ignore the z motion when zeroing at the bottom of material. I started a separate question but the answers are leading me to think a macro is the way to go. Any examples out there to do this?

Thanks
Dave

ger21
Vectric Wizard
Posts: 1592
Joined: Sun Sep 16, 2007 2:59 pm
Model of CNC Machine: Custom DIY
Location: Lake St Clair, MI, USA
Contact:

Re: "go-to-zero" macro

Post by ger21 »

You really need two lines of code to do this safely.
The first line to lift the Z axis to a safe height.
You could lift it to a specified distance above Z zero, say Z=3 with this line of code:

Code "G0 Z3"

The problem with this method is that Z=3 can change, depending on where Z zero is set.

If you have a home switch on your Z axis, there's a better method (imo). If your Home switch is Z zero in machine coordinates, then you can move to a fixed distance below the home switch. If you want to move 0.5" below the switch, then use :

Code "G53 G0 Z -0.5"

One the Z is safely cl;ear, then you just want X and Y to go to zero, so you use:

Code "G0 X0 Y0"

Put those two lines of code in a macro, say M999.m1s, and have the button execute g-code, with the g-code being M999.
Gerry - http://www.thecncwoodworker.com

Post Reply