Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: danigomez on June 26, 2026, 09:28:10 AM

Title: G54 work offset changes after re-homing
Post by: danigomez on June 26, 2026, 09:28:10 AM
Hi everyone,
I've been using Mach4 on my hobby CNC router for about six months and recently ran into a problem that I haven't been able to solve.
My normal workflow is to home the machine, set my G54 work zero with an edge finder, and run the first operation. If I stop the machine, power off the spindle, and later re-home the machine without touching the workpiece or vise, the G54 offset appears to have shifted. It's usually between 0.15 and 0.30 mm in X, while Y is almost always correct.
I first thought it was mechanical, so I checked the couplers, motor mounts, backlash, and limit switches. I also repeated the homing cycle five times in a row, and the machine consistently returns to the same machine coordinates. That makes me think the homing itself is accurate.
What's confusing is that the shift only shows up when I go back to the saved work offset. If I re-indicate the edge and set G54 again, everything lines up perfectly.
I'm using an Ethernet motion controller with the latest plugin, and the issue started a couple of weeks ago. I haven't changed my motors or switches, only updated Mach4.
Has anyone seen G54 behave like this after a software update? Is there a setting related to fixture offsets or work coordinate persistence that I should check before I start rolling back versions?
Thanks for any ideas.
Title: Re: G54 work offset changes after re-homing
Post by: Tweakie.CNC on June 26, 2026, 10:33:22 AM
What is the make and model of the motion controller you are using ?

Tweakie.
Title: Re: G54 work offset changes after re-homing
Post by: joeaverage on June 26, 2026, 04:48:09 PM
Hi,

Quote
If I stop the machine, power off the spindle, and later re-home the machine without touching the workpiece or vise, the G54 offset appears to have shifted. It's usually between 0.15 and 0.30 mm in X, while Y is almost always correct.

I think the problem is your use of Re-Home.

In an ideal world you'd be able to Home to the exact same location every time, but it reality even with the best home switches there is some 'dither'.

Remember that G54 is a group of numbers that describe the location of the Work Zero, or Part Offset if you prefer, FROM the Machine Zero point in machine units.
Lets say that the current G54 is x=210.5,y= 300.65,z=  100.8. Thus if you home the machine and then hit <GoTo Work Zero> the machine will move to x=210.5, y=300.65 (in machine coords) from
the machine zero (the DROs will display 0,0 in work coords)........but if that machine zero has differed at all, in any axis, since the last time you homed then the Machine Zero location will be out by the same difference.

I use Omron roller-plunger snap action microswitches for my home switches. I like them because of reliability and that they have a well defined and specified hysteresis. As a consequence I can
Home to within 0.02mm time after time.

Were you to use proximity switches they will often exhibit a range of 0.1mm to 0.5mm where the switch activates, and that could very easily describe the difference you are observing.

Some motion controllers, including the Ethernet SmoothStepper that I use allow the use of Index Homing. Thus if you Home the machine the machine will home to your existing switch, but THEN
move until that axis servo/stepper matches its index mark. The idea being that with regular mechanical or proximity switches you might achieve 0.25mm repeatability but with Index Homing you
could improve that to just a few um.

It was always my intention to use Index Homing on my machine, but I find that just the good snap action microswitches are good enough on their own without the extra complication of Index Homing.

To summarize I think your problem is caused by your machine not re-homing the the exact same location time after time.

As a matter of interest I seldom, if ever, turn my machine off, it will remain turned on for weeks or even months at a time, and  I'll Home but occasionaly. If the machine is on and it does not lose
reference due to a <Stop> or <Estop> then it does not need it.

Craig