XXL hitting limit switches and causing error on G28 command (rapid to machine home)

The gcode output from Fusion360’s CAM processor uses G28 (rapid move to machine home) commands both before a job runs and and it is complete.

As far as I can tell, the G28 command quickly moves tool to the machine’s absolute (MPOS = 0,0,0) position, which is where the Shapeoko homes exactly at the point the limit switches engage. Since it moves quickly, the G28 command often trips the hard limit alert and halts all operation.

My current work-around is to just remove all the G28 commands (1 before the job and 2 after), but it seems to me that there must be a better way since they seem to be commonly used with other CNC systems.

What’s the correct way to handle G28 without tripping the limits? I suspect G28 really wants to go to “near home” which would be 0.5cm before the limit switch in each direction, but not sure how to change the functionality of that command without altering grbl on the control board.

Can the machine’s home position (MPOS) actually be zeroed 0.5cm off of the limits so that G28 stops before them under normal operation?

Loving my Shapeoko XXL so far; just working through the details to make it fast, smooth, and reliable. Thanks!

Did some more research and found that you can set the position that G28 considers home/reference by calling G28.1 from the desired location.

In other words, if you are running into the same G28 alarm/limit switch issue I was having, just home the Shapeoko normally ($H) and when it finishes it should be around 0.5cm away from each limit switch. Then call G28.1 to set that as the new reference position, and voila!

This only needs to be done once unless some other job/setup you run alters G28’s reference position. Just set it and forget it.

I’m now able to use Fusion360’s gcode output without modification (selecting the carbide3d.cps post processor option).

3 Likes