How do I set the z-origin to the surface of my part

Hi,

I’m using Estlcam for G-code generation and Repetierhost for controlling my Mega/Ramps control board. I have a problem that I thought must be so easy to solve, but I can’t find any info on it. I think I’m not seeing the forest for the trees, sorry if I’m wasting your time.

My MPCNC is working fine. When I tell it to home, it goes to the position defined by the endstops. Fine. Let’s say in that position, the milling bit is touching the bed. Now let’s say I want to mill something into a wooden board with 20 mm thickness. Then it seems logical to me that either all my G-code G00 Zxxx commands will have to get an offset of 20 mm or the controller changes to a relative coordinate system whose origin I set by placing the milling bit on the surface of my board. So either Estlcam needs to apply this offset to generate G-code that makes sense in the absolute coordinate world or Repetierhost has an option to null the axes and thereby establish a new home position. I couldn’t find info on either. Am I going mad?

Thanks,

Peter.

If you’re doing it manually, run the G0 Z20 command to raise the Z-aix, then you can execute G92 Z0 to set the Z-axis 0 point to its current location. From that point until the next G92 command, the CNC will think that the 0 point on the Z-axis is 20mm above the spoil board.

1 Like

Hey, thanks a lot!

I also just figured out that in Estlcam you can set the z-axis origin to machine bed, and then, later, it will ask you for the material thickness. That also does the trick. But good to know how to do it manually in Repetierhost, too.

2 Likes

Beware that repetier host ignores the coordinates from Marlin, so G92 and then jogging will not work right. You can send @isathome to repetier in the console, and it will think it is 0,0,0. That has been a gotcha in the forums before.

2 Likes