@gloomyandy
Thanks for your help!
Following your advice, I'm now calling my home macros in my homeall.g.
However, after changing homez according to your suggestion, I still have problems. In the following file, the printer is sending the bed on the low end (towards me) although is should go in the high end. Then, it is probing without moving to the center (X not moving). What is weird is that home XY both work as expected.
; homez.g
; increase Z
G91 ; relative positioning
G1 H2 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed
G90 ; absolute positioning
; home Z
; NOTE: The following XY position is determined from the probe grid defined in the next section
var xCenter = move.compensation.probeGrid.mins[0] + (move.compensation.probeGrid.maxs[0] - move.compensation.probeGrid.mins[0]) / 2 - sensors.probes[0].offsets[0]
var yCenter = move.compensation.probeGrid.mins[1] + (move.compensation.probeGrid.maxs[1] - move.compensation.probeGrid.mins[1]) / 2 - sensors.probes[0].offsets[1]
G1 X{var.xCenter} Y{var.yCenter} F6000 ; go to bed centre
M401
G30 ; probe the bed
M402 ; retract probe
In my config.g, I have the following. M574 Y2 S3 should indicate to home in the high end.
; Endstops
M574 X1 S3 ; configure X axis endstop
M574 Y2 S3 ; configure Y axis endstop
M574 Z1 S2 ; configure Z axis endstop
M915 X Y R0 F0
Home X and home Z work now:
; homex.g
; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool v3.5.8 on Tue Dec 10 2024 15:03:23 GMT-0500 (Eastern Standard Time)
; increase Z
G91 ; relative positioning
G1 H2 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed
G90 ; absolute positioning
M400
M913 X70 Y70 ; drop motor current to 40% -> for sensorless homing
M400
; home X
G91 ; relative positioning
var maxTravel = move.axes[0].max - move.axes[0].min + 5 ; calculate how far X can travel plus 5mm
G1 H1 X{-var.maxTravel} F3000 ; coarse home in the -X direction
G1 X5 F3000 ; move back 5mm
G1 H1 X{-var.maxTravel} F1000 ; fine home in the -X direction
G90 ; absolute positioning
; decrease Z again
G91 ; relative positioning
G1 H2 Z-5 F6000 ; move Z relative to current position
G90 ; absolute positioning
M400 ; Wait for current moves to finish
M913 X100 Y100 ; return current to 100% -> for sensorless homing
M400 ; Wait for current moves to finish
; homey.g
; called to home the Y axis
;
; generated by RepRapFirmware Configuration Tool v3.5.8 on Tue Dec 10 2024 15:03:23 GMT-0500 (Eastern Standard Time)
; increase Z
G91 ; relative positioning
G1 H2 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed
G90 ; absolute positioning
M400 ; Wait for current moves to finish
M913 X70 Y70 ; drop motor current to 70% -> for sensorless homing
M400
; home Y
G91 ; relative positioning
var maxTravel = move.axes[1].max - move.axes[1].min + 5 ; calculate how far Y can travel plus 5mm
G1 H1 Y{var.maxTravel} F3000 ; coarse home in the +Y direction
G1 Y-5 F3000 ; move back 5mm
G1 H1 Y{var.maxTravel} F2000 ; fine home in the +Y direction
G90 ; absolute positioning
; decrease Z again
G91 ; relative positioning
G1 H2 Z-5 F6000 ; move Z relative to current position
G90 ; absolute positioning
M400 ; Wait for current moves to finish
M913 X100 Y100 ; return current to 100% -> for sensorless homing
M400 ; Wait for current moves to finish
Would you have an idea?