
These are the button numbers for each Axis You can use the same code for the other Axis and change the values to suit. This setup presumes you have Home switches the Z will first move to switch and set machine Zero then back off to -25mm using the G53 machine coordinate command. Just add these lines after DoButton( 24 ) and before DoButton( 23 ) on separate lines like shown.Īlso note I put Z-25 (Minus) you may want to change this depending if your Z doesn't travel in the negative which most folks do. The Ref-All-Home should be flashing so click on it and VB script editor will open. These are the buttons that can be edited direct in Mach. Goto to operator menu across top and choose "Edit Button Script" Some of the buttons on screen will flash. You don't need macro this can be done very easy direct in Mach. When i press the button, i want all the three axis to go the home positions (X,0 Y,0 and Z,25)

You can also use Feed Hold to pause the program and of course Stop to stop the program permanently.I am after a macro for the Ref All Home button on Mach3.

