Work zero VS Machine zero

funny thing happened, i machined a beautiful 3D part in the wrong location.

help me figure out what I did wrong:

I’ve double checked where I’m setting my zero, all is happy
I’ve gone through the gcode by hand and simulated it using Openscam, all is happy

3 questions:

  1. How do you set machine zero?
  2. When I set my work zero should i also set machine zero in the same location?
  3. Can someone explain the actual cause of the following thread so I can rule this out as the cause.

@JerryWoods are you using UGS?

yes. Version 1.0.8

In UGS when you press return to zero, it will return to the machine zero. But when you reset zero it resets your work zero. so if you want to use the return zero to reset the machine where you are setting your work zero at, here is what I do:

  1. start UGS and unlock controls.
  2. Set the position you want your work zero to be.
  3. reset zero ( that will reset your “work” zero)
  4. shut down UGS and restart it.
  5. unlock controls again and look at both work and machine zero locations should be set to 0 an all axis. if not repeat previous steps.
  6. Now for me, I work in inches so I give a command G20 and test the travel before I start a project because UGS like to revert back to mm for me! And to test me travel I just set the travel distance to 1" up z axis and measure it, then back down z axis and should be back to zero.
  7. Then I start my project.
  1. Shutdown UGS

heheh, OK, that’s what I started experimenting with after my part came out in the wrong location. I guess my question should have included “is there a better way to reset machine position without closing and opening UGS”

I’m also going to go through the machine again and make sure everything is tight and has thread-lock, I don’t really expect to find anything loose as the part looked great, just in the wrong location

@JerryWoods when you open up UGS does the position readout on the left say 0,0,0 for both work position and machine position?


can you post the gcode file you are using?

PED_Roughing Toolpath - Top.tap (2.5 MB)

when you open UGS it does read 0,0,0 but after you move it to your work zero there is no way to reset your machine zero other that to shut it down and restart it after you have positioned you machine where you want the work to start. and there is no way that I know of to send your machine to work zero except to manually do it with the move controls.

Sorry about the size of the gcode, that was generated with cut3d, for whatever reason, cut3d doesn’t build the gcode intelligently :frowning:

What post processor are you using?

“g code inch”

Ok, the code does look a little goofy, but we can work with it.

What I usually do when using UGS to control the machine is issue commands to set the work zero.

I go through this process:

  1. Home the machine with $H if it has homing switches
  2. Jog to the position I want as my work zero
  3. Issue the command G10 L20 P1 X0 Y0 Z0
  4. Issue the command G54

What that does is tell the Arduino that I want the G54 coordinate system’s origin to be where my tool is right now and that I want all code the follows in the program I load to be based on the G54 coordinate system.

Try going through those steps, issuing a $# command and then take a screenshot and post it here please.

I was doing the following

  1. commands g90 g20
  2. use edge finder to locate off part
  3. jog 1/2 diameter of edge finder (0.1 inch)
  4. click reset x, click reset y
  5. Tool change to cutting bit
  6. Use piece of thin paper to touch off top of part
  7. click reset z
  8. commands g90 g20 g0 z0.1
  9. load gcode
  10. cycle start.

Based on what you’re saying I should do the following?

  1. use edge finder to locate off part
  2. jog 1/2 diameter of edge finder(0.1 inch)
  3. tool change to cutting bit
  4. touch off top of part with thin paper
  5. close and reopen UGS
  6. Commands G10 L20 P1 X0 Y0 Z0
  7. Commands G54
  8. Commands G00 Z0.1
  9. load gcode
  10. cycle start

here you can see with openscad is saying I should get, and you can see the part is shifted about 0.45 inch x and about .25 inch y

@JerryWoods that looks good, although you can leave out step 5.


Do you think the G54 and the G10 is the issue base on the picture?
My work zero was in the correct place, I didn’t pay attention to the machine zero :frowning:

@JerryWoods I took a closer look at your gcode and there is never a case where z is negative…

Yes I do think that was the issue, can you try cutting it again to see if I’m right?