Scripts for use with Mach3
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Scripts for use with Mach3

AutoZero.m1s - A Mach3 Script to automatically find zero using a probe and a block with a hole that sits on the corner of the part. e.g. a modified Triquetra P3 with an optional hole drilled right over the part corner. Example Video. This is an update to the original code by Allan Massey which adds support for using the hole to find the corner without entering the size of the bit. The script language, vs just using G-CODE, allows us to do several checks to make sure the probe is hooked up and working (requires operator test the probe first), check for the block not being found in a reasonable distance, and cancels with e-stop.

To install in Mach3 to go the Operator menu, Select "Edit button script" and then click the "Auto Tool Zero" button. Paste in this code, edit the PlateThickness, PlateHole, YWidth, and XWidth values, then save it. Before you exit Mach3, be sure to save configuration.

To use, connect your probe and ground the bit, then place it on the corner of the part. Move the bit above the block for Z axis zero, to the side of the block toward the part on the X axis for outside zeroing (you will need to specify the size of the bit and it won't be exact), or move the bit inside the hole for completely automatic zeroing. Now push the "Auto Tool Zero" button. The status line will prompt you to touch the block to the bit to esure it is working within 15 seconds, then the selection dialog will show these options: Enter the Tool Diameter (in inches), or -2 to find in hole, or -1 to zero Z only The default is in hole as that doesn't need to know the bit size, and offers a more accurate zero in less time.