Welcome! Log In Create A New Profile

Advanced

Need help. #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."

Posted by Sigourosandreas 
Hello everybody,
I am new here and I need some help with Marlin firmware.
Every time I try to upload the firmware I get the message: #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
I am using an inductive probe and is 16mm right of the nozzle in the X axis, 0 in the Y axis and 2mm above the nozzle in the Z axis.
My X axis endstop is 27mm left from the X 0 point, the Y axis endstop is 20mm front of the Y 0.
I have attached the configuration file.
Can anyone help?
Attachments:
open | download - Configuration.h (65.3 KB)
Re: Need help. #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
May 24, 2018 01:44PM
This feature is meant to avoid Z homing with Z probe outside the bed area.

You could try to change the homing location maybe to Max?????

#define X_MAX_POS X_BED_SIZE+40
#define Y_MAX_POS Y_BED_SIZE+40

// - Prevent Z homing when the Z probe is outside bed area.
//
#define Z_SAFE_HOMING

#if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT (X_BED_SIZE+40) // X point for Z homing when homing all axes (G28).
#define Z_SAFE_HOMING_Y_POINT (Y_BED_SIZE+40) // Y point for Z homing when homing all axes (G28).
#endif

Edited 3 time(s). Last edit at 05/24/2018 01:54PM by Roberts_Clif.
Hi Clif,
Yes my sensor needs to be triggered out of the bed. My bed is square of 275x275mm and my probe triggers at a square 298x298mm. So it has to move outside of the bed, left - right and front - back.
I tried what you say, but still giving the same error.
I also have tried the following, but still gives the same error (and it was just a trying spot, cannot be the final):

// - Prevent Z homing when the Z probe is outside bed area.
//
#define Z_SAFE_HOMING

#if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT (X_BED_SIZE) // X point for Z homing when homing all axes (G28).
#define Z_SAFE_HOMING_Y_POINT (Y_BED_SIZE) // Y point for Z homing when homing all axes (G28).
#endif

I tried several and It can only except numbers from 0 to 274 for X and Y points. That is almost the size of my bed, but I need to move it outside.
Can anyone please help?
Re: Need help. #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
May 24, 2018 04:26PM
I was afraid of that, If someone else has any ideals, Please We could use your assist!!!!

Edited 1 time(s). Last edit at 05/24/2018 04:53PM by Roberts_Clif.
Re: Need help. #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
May 25, 2018 06:03AM
The idea of Z safe homing is that it is forced to home Z in the middle of the bed (bed size/2) so the inductive probe does not try to trigger in thin air.

#if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
#endif


Ithink your travelll limits should be

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -27
#define Y_MIN_POS -24
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE+27
#define Y_MAX_POS Y_BED_SIZE+24
#define Z_MAX_POS 275


With a inductive probe, my thinking is that the #define Z_PROBE_OFFSET_FROM_EXTRUDER 2 // Z offset: -below +above [the nozzle]
should be a negative vale as this is the probes trigger point, not the actual physical position of the probe. So this would be -distance of nozzle to bed when the probe triggers.
Re: Need help. #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
May 25, 2018 09:40AM
#define X_MAX_POS X_BED_SIZE+27
#define Y_MAX_POS Y_BED_SIZE+24

why?


If X0 is zero then X max should be X_BED_SIZE
same with Y should just be Y_BED_SIZE

#define X_PROBE_OFFSET_FROM_EXTRUDER 16     // X offset: -left  +right  [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0     // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 2  // Z offset: -below +above  [the nozzle]

looks good

#define X_BED_SIZE 275
#define Y_BED_SIZE 275

so cant go any further X than 275-16

but you have

  // Set the boundaries for probing (where the probe can reach).
  #define LEFT_PROBE_BED_POSITION -26
  #define RIGHT_PROBE_BED_POSITION 272

is not right

RIGHT_PROBE_BED_POSITION should be 275-16 ie 259 maximum and since your probe isn't a point it should probably be smaller

but I dont think that is causing the error.

Edited 3 time(s). Last edit at 05/25/2018 10:42AM by Dust.
Re: Need help. #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
May 25, 2018 10:41AM
Looks like you have found a big to me...

the code that causes the error (gathered from all over)

#if ENABLED(Z_SAFE_HOMING)
  #if !WITHIN(Z_SAFE_HOMING_X_POINT, MIN_PROBE_X, MAX_PROBE_X)
    #if HAS_BED_PROBE
      #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."

#define _MIN_PROBE_X (max(X_MIN_BED, X_MIN_POS+ X_PROBE_OFFSET_FROM_EXTRUDER))
#define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2) 
#define X_CENTER ((X_BED_SIZE) / 2)    (ie  275/2)
#define X_MIN_POS -27
Z_SAFE_HOMING_X_POINT = -11
X_PROBE_OFFSET_FROM_EXTRUDER 16
#define _MAX_PROBE_X (min(X_MAX_BED, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
#define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)

this code boils down to

_MIN_PROBE_X (max( 0, -27+ 16) returns 0
_MAX_PROBE_X (min( 275, 275+16) returns 275

so the check asks is -11 between 0 and 275, which fails.

but you should be able to use -11

as a blatant hack/work around

go into Conditionals_post.h

find
  #else
    // Boundaries for Cartesian probing based on bed limits
    #define _MIN_PROBE_X (max(X_MIN_BED, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
    #define _MIN_PROBE_Y (max(Y_MIN_BED, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
    #define _MAX_PROBE_X (min(X_MAX_BED, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
    #define _MAX_PROBE_Y (min(Y_MAX_BED, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
  #endif

change #define _MIN_PROBE_X (max(X_MIN_BED, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
to #define _MIN_PROBE_X (min(X_MIN_BED, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))

Edited 1 time(s). Last edit at 05/25/2018 10:43AM by Dust.
To obewan,

I thought that the Z safe homing was to set a specific point were the probe should home the Z axis without hitting anywhere.

But maybe I was mistaken.

To Dust,

I have attached a photo of my machine. If you see, there are 4 aluminum corners in the corners of the bed, not only to hold the glass in place but for homing the probe.
So the X axis home should be -28 in order to get the nozzle to the correct X 0 of the bed.

The strange thing is that I have been using the previous version, marlin 1.0.2, with almost the same parameters. But here it doesn't take them. I have attached this file, too.
Attachments:
open | download - Configuration.h (65.3 KB)
open | download - Photo2_croped.jpg (54.4 KB)
open | download - Configuration_marlin_1.0.2.h (36.6 KB)
Re: Need help. #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
May 25, 2018 11:33AM
Older marlin never had any sanity checking on the users configuration.h

the new marlin has tonnes to try and stop common mistakes.

But as I said, you seem to have found a bug in the new sanity checking routines,
Hi Dust,

I did what you advised me to do and it worked perfectly. Thanks.
We fixed the G28 command.
Do I have to report this bug to github or have you already?


Then I defined the AUTO_BED_LEVELING_LINEAR and has again almost the some error.
"static assertion failed: RIGHT_PROBE_BED_POSITION can't be reached by the Z probe."
Can you please check what to change?


And one more thing to ask.
When I set the fan pins in configuration.adv they give me errors too.


When I set the extruder cooling fan pin, in rambo fan0 is 8,
#define E0_AUTO_FAN_PIN 8, I get this
#error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."

And when I set the Part-Cooling Fan pin, in rambo fan2 is 2,
#define FANMUX0_PIN 2, and I give the M106 command starts the extruders fan. And Is wrong because in the previous marlin 1.0.2, it was working fine.
Attachments:
open | download - Configuration.h (65.3 KB)
Re: Need help. #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
May 29, 2018 06:20AM
When I set the extruder cooling fan pin, in rambo fan0 is 8,
#define E0_AUTO_FAN_PIN 8, I get this
#error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."

You cant set the same pin for this. It needs to be two different fans.

one fan is for cooling the fins on the hotend (on most machines this is always on. but can software controled with E0_AUTO_FAN_PIN to turn it on/off with temperature)
The second fan is software controlled and is turned on and off as needed, eg for bridging, or for pla

D8 is normally the software controlled fan for part cooling.
D2 would be your E0_AUTO_FAN_PIN

re FANMUX0... you dont have multiple extruders, (at least your config says this) you don't set this, leave as -1
Re: Need help. #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
May 29, 2018 07:03AM
// Set the boundaries for probing (where the probe can reach).
  #define LEFT_PROBE_BED_POSITION -26
  #define RIGHT_PROBE_BED_POSITION 272

looks very wrong... need to be offset by hotend/probe offset
#define LEFT_PROBE_BED_POSITION -16
#define RIGHT_PROBE_BED_POSITION 256
So, after the corrections that Dust proposed, I have made the following.
Into Conditionals_post.h found the:

#else
// Boundaries for Cartesian probing based on bed limits
#define _MIN_PROBE_X (max(X_MIN_BED, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
#define _MIN_PROBE_Y (max(Y_MIN_BED, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#define _MAX_PROBE_X (min(X_MAX_BED, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
#define _MAX_PROBE_Y (min(Y_MAX_BED, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#endif

and changed to:

#else
// Boundaries for Cartesian probing based on bed limits
#define _MIN_PROBE_X (min(X_MIN_BED, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
#define _MIN_PROBE_Y (min(Y_MIN_BED, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#define _MAX_PROBE_X (max(X_MAX_BED, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
#define _MAX_PROBE_Y (max(Y_MAX_BED, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#endif

And now everything works just fine.
Thank you Dust for the corrections.
Sorry, only registered users may post in this forum.

Click here to login