to protect your machine after homing is complete.
The VBScript Editor will open. Modify the text and click . Popular Script Enhancements 1. Moving to a "Park" Position
' --- Home Z Axis first --- Message "Homing Z Axis..." DoOEMButton(1033) ' Ref Z While IsMoving() ' Wait for Z to complete Sleep 100 Wend mach3 ref all home script
' --- Disable limits temporarily (optional but prevents false triggers) --- ' DoOEMButton(1021) ' Uncomment if needed: Disable limits
| | Suggested Sequence | Reason | | :--- | :--- | :--- | | Gantry Router | Z → Y → X | Y-axis often moves gantry (heavy mass); avoid binding. | | Vertical Mill | Z → X → Y | Table moves in X/Y; Z retracts to clear tool. | | Plasma Cutter | Z (Torch) → X → Y | Prevents torch dragging on material. | | Lathe | Z → X | Cutter moves longitudinally then radially. | to protect your machine after homing is complete
If your A axis is slaved to Y (typical for dual-motor gantry), go to Config > Slave Axis and set A to follow Y. The script above will home both simultaneously. If you have a lathe with only X and Z, remove the Ref("A") line.
Many users prefer the machine to move a short distance away from the switches after homing to avoid accidental limit triggers during operation. Popular Script Enhancements 1
The "Ref All Home" script in Mach3 is a VB (Visual Basic) macro that automates the process of synchronizing the machine’s physical position with its internal coordinate system. By triggering the homing cycle, the machine moves each axis until it contacts a home switch, ensuring a consistent starting point for every job Artsoft- Mach Core Functionality The default homing script typically executes a series of DoOEMButton
for a specific homing order (e.g., Z then X/Y together).
The standard script typically uses DoButton() commands, which trigger internal Mach3 functions. : Home Z-axis (safest to do first) DoButton( 23 ) : Home Y-axis DoButton( 22 ) : Home X-axis DoButton( 25 ) : Home A-axis (if used) How to Edit the Script Open Mach3 and go to the Operator menu at the top. Select Edit Button Script . Click the Ref All Home button (it should be flashing).