Machsupport Forum

Mach Discussion => Mach Screens => Topic started by: Flashsolutions on April 04, 2009, 08:35:42 PM

Title: How to change Goto Zero's function
Post by: Flashsolutions on April 04, 2009, 08:35:42 PM
I am using Mach 3 to run a Phlatprinter CNC machine which cuts foam.   

It uses a Dremel tool in a gantry which raises from the bottom to cut foam being fed across the top of the cabinet.

I have now ruined 2 or 3 sheets of foam and broken a few bits because the 'Send Printer Home' button moves the X and X axis BEFORE sending the Z axis home.   

In our configuration, it is not easy to see if the bit is in the material since it feeds from the bottom, so if the bit is in the foam when you hit the send printer home button, you are either going to rip the foam up or break the router bit.

When I used the screen editor to see what function is implemented by that button it shows "Goto Zero's" as the function name.

How can I change its behaviour so that the Z axis is moved FIRST instead of LAST, and why on earth would it be programmed this way in the first place?

Title: Re: How to change Goto Zero's function
Post by: Greolt on April 04, 2009, 09:08:29 PM
I don't know why that button would zero the X and Y before the Z.  I never use it.

Designate the button of your choice to "VB Script Edited in Mach3"

Then put this into the button script,

Code "G0Z0"
While IsMoving ()
Wend
Code "G0X0Y0"

EDIT:  I fiddled with it a bit and using the "Safe Z" settings will effect which moves first also.  Safe Z is another feature I never use.  :)

Title: Re: How to change Goto Zero's function
Post by: Flashsolutions on April 04, 2009, 09:58:08 PM
Ahhh!  Thank you so much.  Greatly appreciated.


I don't know why that button would zero the X and Y before the Z.  I never use it.

Designate the button of your choice to "VB Script Edited in Mach3"

Then put this into the button script,

Code "G0Z0"
While IsMoving ()
Wend
Code "G0X0Y0"

EDIT:  I fiddled with it a bit and using the "Safe Z" settings will effect which moves first also.  Safe Z is another feature I never use.  :)