Cannot home z with probe

Hello, For homing Z i use a 19 mm high probe. Therefor i use this start script.

G28 Z
G1 Z2 F150
G1 Z-19 F150
G92 X0 Y0 Z0
G1 Z5 F150

but this line G1 Z-19 F150 does not went 19mm down. it stops at the first Z0 point.

Can anybody tell me why?

I build the MPCNC with ramps 1.4 with marlin 2.0

Greets Rick

Marlin has a safety feature where any axis homed cannot then go negative. I’m not sure how you want this code to behave, but you can get around this particular problem by:

G28 Z
G92 Z19
G1 Z21 F150
G1 Z5 F150

I assume “G1 Z2 F150” is lifting the router so you can snatch the touch plate out.

Z probe

G38.2 Z-15 F40. Start 15 mm or less above probe
G92 Z19.00. Sets 0 to 19 below psition

Should do it correctly?

Not all firmwares have G38 enabled.

1 Like

I use GEBL so much I forgot

i put your code into my start script, but de z only goes up 10mm

G38.2 Z-20 F40
G92 Z19.00
G0 Z10

The homing works fine, but after the homeing, the z wil not go down to 0. its stuck at +Z17.
so after enter the command G1 Z5 it stops at Z17
I really do not know why???

i found something, but it still doen not work.
in marlin configuration i uncomment

#define G38_PROBE_TARGET

Now the z homing prcedure starts, but when the is a touch, it does not stop.

So it seems, that it is not react on de th z_min_endstop

If you check with M119, I think it will have a Z probe line.

But it works with G28 Z, but not with G38.2 Z-20 F40
i also uncomment Z_MIN_PROBE-PIN 32 . still probe does not react

Are you using the exact code I wrote? Do you execute right after power up? While being stuck at 17 is strange, this code take the router to Z=5 just like your original code leaves the router. I saw no reason to go to Z=0 then bring the router up to Z=5. I’m not sure of your intent, but if you want to leave the bit at Z=0, change the last line to:

G1 Z0 F150

Note this is the code Ryan provides for his touch plate he sell in the store (modified for your touch plate height)

G28 Z
G92 Z19
G0 Z24 F480

This is the code I execute for my Z homing. Note that the speed is higher (F480). It leaves the bit at Z=24 which is 5 mm above your touch plate so that the touch plate can be unclipped and removed. You then would need to execute a G1 Z0 F450 to bring it down to 0.

1 Like

i finaly got it…
This script works for me.

G28 X Y ; home X and Y
M0 ; wait for place the probe
G28 Z ; home Z and x and y
G92 Z19.2 ; set z home position to top of probe
G0 Z24 F480 ; move up 24 mm
G90 ; use absolute positioning
G21 ; use mm
M17 ; enable motors
G1 X100 Y100 F4000 ; move to almost home x and y
G1 Z2 F480 ; move z 2 mm above surface
G92 X0 ; set new x home
G92 Y0 ; set new y home
G92 Z2 ; set new z home
M0 ; wait

What i also had to do in configuration.h was:


but stilli do not know why the probe does not work with G38.2

As long as you got it it will be set for the next in line with the same problem great work. I use GRBL and it must have pins set a little different

I few thoughts on your homing code.

G90 ; use absolute positioning
G21 ; use mm

These should not be needed, or if you are concerned, they should be at the beginning of the script or at least before the move to Z=24

M17 ; enable motors

Your steppers will already be engaged by the homing sequence, so this line is not needed. Any movement of the steppers engages them, and they stay engaged unless you unlock them.

G92 Z2 ; set new z home

You are already at Z=2, so this line does nothing


I will change my script.
I was a little to carefull after the 100 test a made.;-/

1 Like