Skip to main content

Mach4 How to Modify the "Go to Work Zero" button

Modifying the Go to work Zero button in Mach4 to raise Z
before moving. Similar to Safe Z move in Mach3.

-Open the profile you wish to change the button in.
-With Mach4 disabled, click on the "Operator" tab at the top.
-Then, "Edit Screen."
-In the "Screen Tree Manager" (top left), click on the wx4, or whatever is listed. This is the
screen currently loaded for this profile.
-Down the column under properties, you will see what look like two text doc icons. One is
properties and the other, looks like it has a lightning bolt through it. Click on that one,
which is the "Events" tab.
-The first item that appears in the list is the screen load script. Click on this and then click
on the box with three dots that shows up. (this is the edit box)
-The Screen Load script should appear on the screen. If not, look for the LUA editor down in
the task bar and expand it. Sometimes the editor will open in the minimized form. The
editor will need to be expanded before continuing.
-Find the GoToWork zero function. Ctrl+F will allow you to search for keywords, or you can
simply scroll until you find it. This function runs here and is called by the button from the
Run Screen.
-Replace the function with the one pasted at the bottom of this page.
-There is a note in the function explaining how it will work. It is now configured for Z to now
move first to home (Machine Coordinate Zero) and then X and Y to Work Coordinate Zero.
-Once the edits are complete, go to "Screen" and "Save Screen As". Give your screen a
unique name so the original wx4.set is left in tact. This will also prevent your screen from
being overwritten if you update in the future. 
-Click the "Operator" drop down menu again, then "Edit Screen". This will exit the screen
editor and return Mach4 to the run screen in disable mode.
-Enable Mach4 and test the newly configured Go To Work Zero Button.