G38.2 fails

I’ve been playing around with the dual end stop firmware and a Z touch plate. I can home Z with the touch plate but it does not trigger when using G38.2

I’ve defined FIX_MOUNTED_PROBE and G38_PROBE_TARGET

I’m using Marlin-MPCNC_Ramps_T8_16T_LCD_32step_DualEndstop in version 302 as of today, had the same issue in 301

Any ideas what I can try?

Thanks

I have never done it that way I just use it as an endstop. G28 Z. You can then use an offset or add the offset to your firmware. I have the exact details in the basics page.

Yes G28 Z works fine, it even uses the probe offset I’ve defined in M851. I just thought it would be cool to be able to probe in your workpiece, no idea if I would ever need it :wink:

Btw I would never have guessed to check the basics page for information on the “advanced” dual endstop stuff, maybe you want to put a link at the end of the dual endstop page…

Done, good idea.

1 Like

Looks like maybe you need to give a location of some sort, not really sure.

http://marlinfw.org/docs/gcode/G038.html

Yes, that is right you run it like G38.2 Z10 then it moves to Z10 and once it is there it says something like failed to reach location, even tough the probe should have been triggered (it says triggered when checked with M119).

Is g38.3 doesn’t work too?

Exactly the same problem with G38.3, it moves to the specified position and fails to trigger, it does not display the error, but that is according to the specification.

Hi guys, Im trying to get this working too , i activated the command with the two #Define

I want to use the command to auto edge finding with a touch plate.

the programm dont notice the Z_Min Endstop , it keeps driving until the set maximum way.

@Ryan maybe you can take a look inside , i was trying around with the Inputs no idea why it dont work

How is the touch plate wired to your board? IIRC it should have the two wires on the board at - and S on Z min, and one side goes to the touch plate and the other clipped to your bit.

Im Testing it with a normaly Open Switch no Touch Plate yet

Im Testing it with a normaly Open Switch no Touch Platte

Ok i found a working solution for me , i needed to change the endstopps.cpp to make it hear on the Zmin Pin

This is what i changed.

Line 467 : #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN) && !(CORE_IS_XY || CORE_IS_XZ)

Line 471 : if (G38_move) UPDATE_ENDSTOP_BIT(Z, MIN);

Line 664 : #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN) && !(CORE_IS_XY || CORE_IS_XZ)

Line 667 : if (TEST_ENDSTOP(_ENDSTOP(Z, MIN))) {

Now the G38 Command notices the zmin on all axis.

 

1 Like

Did you try:

Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN

Allready postet my programm changes to make it work ? and yes i testet it to

Yes, I saw that. I only thought it would be easier when updating the firmware in the future to use the config (so that you don’t have to change the code each time).
I did set Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN and then #define Z_MIN_PROBE_PIN Z_MIN_PIN. Which I think is doing the same as changing it in code. At least it gives me probing on all axes.