Welcome! Log In Create A New Profile

Advanced

Homing question about: define Z_HOME_DIR

Posted by yello3d 
Homing question about: define Z_HOME_DIR
February 02, 2023 09:50AM
It seems my CNC 'forgets' about Z home.

Z has no end stops. In Marlin config*.h it's: #define Z_HOME_DIR 0

I think there should be 1 or -1 - is 0 correct or should I comment the line out?


#define Z_AFTER_HOMING 0
#define Z_HOME_DIR 0

Z is a balance cam and should stay centered, in the *.h it's written as:

#define Z_MIN_POS 0
#define Z_MAX_POS 59

Would it be better to write like:

#define Z_MIN_POS -29.5
#define Z_MAX_POS 29.5

Controlling software is OpenPnp, which does not give strong Marlin support.
Re: Homing question about: define Z_HOME_DIR
February 02, 2023 11:36AM
OpenPnp just sends commands to your controller. Homing is handled entirely by your motherboard.

What flavor of Marlin are you running?

In main stream Marlin, the only time when Z isn't homed is when Z_MIN_PIN and Z_MAX_PIN are both set to -1. You'll need to go into the pins_YOUR_BOARD.h file and change these to -1.

Best to leave Z_HOME_DIR set to either -1 or 1.

"It seems my CNC 'forgets' about Z home." Please explain.
Re: Homing question about: define Z_HOME_DIR
February 02, 2023 07:12PM
I am using nightly Marlin 2.1.x from a few days ago.

The Z axis controls 2 nozzles and at Z0 should be leveled

>>Last image on this page - can't be linked not sure why<<


In `pins_FYSETC_S6.h` I have:

#define Z_MIN_PIN PA0
#define Z_MAX_PIN PA3

Both pins are not further defined in the config*.h

I will test again. with a #define Z_HOME_DIR -1

The original LumenPnP has

#define Z_AFTER_HOMING 31.5

#define Z_HOME_DIR -1

#define Z_MIN_POS 0
#define Z_MAX_POS 59

So Min/Max should be 0-59 or -29.5 +29.5?
Re: Homing question about: define Z_HOME_DIR
February 02, 2023 07:54PM
When homing in the -1 direction, the Z position is set to Z_MIN_POS when it hits the Z_MIN endstop.

If you want the nozzle position to be in the middle when at the Z = 0 position, then set Z_MIN_POS to -29.5.
Sorry, only registered users may post in this forum.

Click here to login