Marlin: HOMING Z BEFORE X and Y ?

Created on 20 Apr 2017  Â·  14Comments  Â·  Source: MarlinFirmware/Marlin

Hello,

Would it be possible to add a parameter allowing HOME_Z BEFORE X and Y on G28?

Thank you for your reply,
Ben

Most helpful comment

Tonight, I roll up my sleeves And I put my laziness in the closet !
Tkanks very much !

All 14 comments

Normally, that's not what's wanted due to the Z might crash into parts if G28 was issued after a print.
But, it is possible.

Thanks Tannoo !

Indeed, there may be many cases where this setting would cause problems.

In some other specific cases, and if this potential parameter is only possible in advanced mode, could we consider adding it to MARLIN?

In practical terms, it would be very useful for me. Indeed, I installed a BLTOUCH on a GREG WADES Prusa i3 to the right of the extruder. The BLTOUCH does the HOMING Z. But, since it is placed outside the heated bed, it does not properly work.

Then wouldn't it be prudent to hook up a z_min limit and swap the following settings and assign the appropriate pins in your pins file?

//#define Z_MIN_PROBE_ENDSTOP
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN

That way, you would have a homing limit and a probe as explained above those settings:

 *   All Z PROBE pin options are configured by defining (or not defining)
 *   the following five items:
 *       Z_MIN_PROBE_ENDSTOP – defined below
 *       Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN – defined below
 *       Z_MIN_PIN - defined in the pins_YOUR_BOARD.h file
 *       Z_MIN_PROBE_PIN - defined in the pins_YOUR_BOARD.h file
 *
 *   If you're using a probe then you need to tell Marlin which pin to use as
 *   the Z MIN ENDSTOP.  Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN determines if the
 *   Z_MIN_PIN or if the Z_MIN_PROBE_PIN is used.
 *
 *   The pin selected for the probe is ONLY checked during probing operations.
 *   If you want to use the Z_MIN_PIN as an endstop AND you want to have a Z PROBE
 *   then you’ll need to use the Z_MIN_PROBE_PIN option.

This is actually what was set up in MARLIN for my machine.

+-- BACK ---+
|......................|
|........(+).........|
|......................|
|...P (-) N (+)...| G <-- nozzle (10,10)
|......................|
|........(-)..........|
| .....................|
O-- FRONT --+
(0,0)

P is the BLTOUCH position.

As the X and Y are checked before the Z. The BLTOUCH is outside the heating bed.

I mean, this is a bit of a wacky solution, but would it work to home X to max instead of min? Doing that should leave the BL-touch in the print area, and then it would work as a z-endstop.

It is an idea !
But in that case, should I move the ENDSTOP X on the other side?

_Edit : I'm a little bit lazy_ :^)

Yes, and plug the limit into the XMAX pins.
Once you move that limit to the MAX side, then change X_HOME_DIR to 1.

// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

Then you may have to swap X_MIN_POS with X_MAX_POS. Or maybe not.

// Travel limits after homing (units are in mm)
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS 200
#define Y_MAX_POS 185
#define Z_MAX_POS 190

Tonight, I roll up my sleeves And I put my laziness in the closet !
Tkanks very much !

Is the real issue that the Z homing is trying to probe off the bed?

If yes then enable Z_SAFE_HOMING & set the coordinates as desired. The default is the middle of the bed.

#define Z_SAFE_HOMING

#if ENABLED(Z_SAFE_HOMING)
  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
#endif


You shouldn't swap X_MIN_POSwith X_MAX_POSwhen homing in the + direction. The X location will be set to X_MAX_POS when homing in the + direction.

The only downside to homing in the +X direction is now you need to be VERY precise with the X_MAX_POS value or your 0,0 location will be off.

You can also add a parameter to G28:

G28 Z1 for example will only home the Z axis.
G28 X1 Y1 will only home X and Y

If I understand correctly, your solution would be to HOME at the center of bed ?

Nevermind...that's not it.

Yes, enable Z_SAFE_HOMING & set the coordinates as desired. Doesn't have to be at the center of the bed.

That's it ! That's the solution!

#define Z_SAFE_HOMING

#if ENABLED(Z_SAFE_HOMING)
  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 8)    // X point for Z homing when homing all axis (G28).
  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 8)    // Y point for Z homing when homing all axis (G28).
#endif

Thank you so much All of you,

Was this page helpful?
0 / 5 - 0 ratings