From the course: G-Code Programming for CNC Foundations

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

G28: Return to machine zero position

G28: Return to machine zero position - G-Code Tutorial

From the course: G-Code Programming for CNC Foundations

Start my 1-month free trial

G28: Return to machine zero position

- The return to home command is the G28. And you can call the G28 to send your machine back to the machine home position. You can also add an X, a Y, or a Z value to automatically make the machine go to an intermediate position before returning to home. Let me show you how it works. So, first off, we need to make sure we're using an incremental mode, so we're using a G91 mode with that G28. Now, we can call the G91, then the G28, and then a X, a Y, and a Z, now notice these are all zero, that means it's not going to go anywhere before heading home. So it's already there, so it's just going to go ahead and just head back to home. Now, if you wanted to add something like a Z of 4.0, it's going to go to an intermediate position that happens to be four inches above where it currently is. You could also add X moves or Y moves or wherever you happen to want to move that machine prior to heading back to the machine home position. Now, most of the time, people will be doing that if they had…

Contents