Workflow for homing (machine vs work coordinates)

I’ve been digging around the forum and the internet and, unfortunately, this is apparently less obvious than one might think. Even the forum here isn’t clear to me.

Here’s what I want to be able to do:

  • Home the machine with $H
  • Jog the machine to my initial position and set my work coordinates to 0 without resetting the machine coordinates.
  • Run a part using UGS, Chillipeppr, grblweb
  • Kill power (worst case scenario here), rehome, move to my work coordinates and start over.

Right now, the only way I can think to do this is to home, jog to position, take a snapshot of global coordinates with m cameraphone or old fashioned pen and paper, G92 X0 Y0 Z0

Is there a better way?

Yes, there is a better way.

Bring up UGS
Home your machine with $H
Jog the machine to the location you want to save.
Reset work zero (just good practice not required)
Save that position with G28.1 using the command line

later after power off power on

bring up UGS
Home your machine $H
Issue G28 command using the command line
reset zero to set work zero.

1 Like

What Larry says…

Also check out this awesome post:

Perfect, thank you!

I will check it out. Thank you!

I use LinuxCNC and Mach3 on my milling machines. The process is as follows.

Start computer and control software.
Reference or Home the machine.
Jog to where you want your G54 work coordinate X0,Y0
Set X and Y to zero
Set Z0
Load Gcode and material if material was not loaded before setting G54 zeros
Run Gcode
Gcode ends. Move spindle out of the way.
Load next piece of material. You have set up stops so material goes into same spot.
Run Gcode
Gcode ends
Repeat until all parts are machined.

As you see I did not turn anything off and on again. I did not have to reference or home the machine again. I did not have to move the spindle back to X0,Y0,Z0. The control software knows where the spindle is and knows where it has to move to to start the next run.

If Easel or UGS or Chilipeper can not do this then the programmers for those programs need to find out why.

Hope this helps


Dave, I think he was looking for method to save his work zero through a power cycle. Not just make part after part.

don’t know that it can be done with the stock electronics and software. I know with the control software I use it retains the last G54 numbers.


Yes, G28.1 setting (always machine co-ordinates) is permanent in grbl (EEPROM) until you issue another G28.1

You just have to remember to reset zero after your G28 command.

Which values are you referring to, work zero or G28.1, something else?

I use UGS and I don’t see an easy way to directly enter the machine or work co-ordinates.

You can enter any valid G code string in the “Command” window of UGS and if grbl supports it then it will work. I consider this to be an indirect method, so I didn’t mention it. As far as I can tell you can’t just modify the co-ordinates directly, as in change them in the window where they are displayed.

I use a touch plate to set work XY and Z zeros.
I home the machine then jog machine to my work piece. Use the plate to set xyz an then run the job. If the power were to shut off id just rehome and reset xyz and run job again. No big deal

The Homing cycle is implemented in the grbl code, so I don’t think there is a G code instruction for doing so. If G code existed to do Homing then the grbl folks would have used it as code space is very tight for grbl.

For jogging to define Work Zero you could use relative positioning G code commands like G91 G0 X1 Y1 to move the spindle 1 unit in the X direction and 1 unit in the Y direction and then use the appropriate G code to set Work Zero in your system when you get to the location you want to use.

1 Like

The G code to home the XC is $H. $X will unlock lock the machine so commands can be given without homing.

Sorry, $H is not G-code.

From the configuring grbl web page:

The ‘$’-commands are Grbl system commands used to tweak the settings, view or change Grbl’s states and running modes, and start a homing cycle.

1 Like

Is there another way to save the work zero without using the G28 code?

Home your machine (you do home, right?).

Jog to the position that you want to set as Work Zero.

Enter the command G10 P0 L20 X0 Y0 Z0

This will set Work Zero and store the co-ordinates in the G54 slot.

1 Like

I do not home but found out the hard way about the advantages of doing so. I have been reading a lot of articles to properly change my practices. It is my understanding that G28 and G54 store coordinates referenced of Home on the Arduino itself. G28 is usually used for a Pre-homing while G54 is more for storing coordinates for later use if required.
The command you mentioned is what I need it, Zero the work coordinates and save them just in case. can I assign this command to one of the buttons on the UGS interface? It feels like this is something I should do every time before running a job


Not quite correct.

G54 through G59, G28 and G30 all use Machine Co-ordinates.

If you home your machine then Machine Zero is established at the “home” position.

If you do not home your machine, then Machine Zero is established at the location where the spindle is when you connect to grbl.

So, you can see if you don’t home your machine then you have effectively eliminated the value of G54-G59, G28, and G30 for any use except during the current carve.

If you home your machine then you can use G54-G59, G28 and G30 to return to known locations. These values are stored in the Arduino and available even after a power cycle, but are almost useless unless you home your machine.

G28 and G30 are just general purpose locations for you to store a known location, but once again they are almost useless if you don’t home. (valid only during current run without homing).

1 Like