I have a printer with the following dimensions: L300 x W300 x H400. After flashing Marlin software, the extruder keeps homing at X77 Y50 instead of X150 Y150 that is the center of the printing area for me. Where can I find the appropriate line in config file in order to edit it with preferred coordinates. Unfortunately I can only find info on how to change offset of origin point. In my case origin point is correcty set.

  • 1
    $\begingroup$ Hi, did the answer help your problem or did you find a solution yourself? If the answer helped then please mark it as the accepted answer, otherwise post please post your own solution and mark it as the accepted answer. That way the question will be removed from the unanswered question queue. Many thanks. $\endgroup$
    – Greenonline
    Feb 4 '21 at 2:14

If you enabled Z_SAFE_HOMING, then automatically the printer homes Z at the middle of the build plate, if the bed size dimensions are correctly defined (in your case X_BED_SIZE and X_BED_SIZE should be defined as 300).

In Configuration.h you can find:


  #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).

If Z_SAFE_HOMING was enabled, and the bed properly dimensioned, it could be that the steps/mm are incorrectly defined.

Note that if a probe is used, the offset of the probe to the nozzle center is taken into account, this implies that the probe is moved to the center, not the nozzle. The code responsible for this is found in G28.cpp:

 * Move the Z probe (or just the nozzle) to the safe homing point
 * (Z is already at the right height)
destination.set(safe_homing_xy, current_position.z);

TERN_(HOMING_Z_WITH_PROBE, destination -= probe.offset_xy);

I.e. the ternary operation (TERN_) determines the addition of the probe offset.

  • $\begingroup$ It worked perfectly. The only comment is that it centers the BL TOUCH probe instead of the extruder nozzle. Do you recommend to subtract the distance between the probe and the extruder nozzle and modify the Z_SAFE_HOMING_X_POINT value accordingly or there is a smarter way to input that distance in an initialization stage of the code? $\endgroup$
    May 8 '20 at 21:01
  • $\begingroup$ @STATHIS You should probe the middle of the bed with the probe, not the nozzle! This way the probe determines the height of the bed for the nozzle. But yes you can alter the values if you want, but that wouldn't be necessary. $\endgroup$
    – 0scar
    May 9 '20 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.