Print end macro error

Hello,

Basic Information:

Printer Model: Ender 5 pro
MCU / Printerboard: BTT mini E3 V2
klippy.log
klippy.log (3.0 MB)

Describe your issue:

I Have a Print end macro like this:

[gcode_macro PRINT_END]
#   Use PRINT_END for the slicer ending script - please customize for your slicer of choice
gcode:
    M400                 ; wait for buffer to clear
    G91                  ; Relative positioning
    G1 E-2 F2700         ; Retract a bit
    G1 E-2 Z0.2 F2400    ; Retract and raise Z
    G1 X5 Y5 F3000       ; Wipe out
    G1 Z10               ; Raise Z more
    G28 X0 Y0            ; Present print
    G90                  ; Absolute positioning
    SFS_DISABLE          ; disable smart filament sensor
    M106 S0              ; Turn-off fan
    M104 S0              ; Turn-off hotend
    M140 S0              ; Turn-off bed
    M84 X Y E            ; Disable all steppers but Z

…At the end off the print I have this Error "!! Must home axis first: 0.000 0.000 0.200 [0.000]
The print is good only this error, The nozzle

Before I have that print end in my Cura Slicer Printer’s settings and I have no problem.
Can you help?
Thanks
Pat

Hello @Pbonamy !

In the klippy.log there is more:

[gcode_macro PRINT_END]
gcode = 
	M400                 ; wait for buffer to clear
	G91                  ; Relative positioning
	G1 E-2 F2700         ; Retract a bit
	G1 E-2 Z0.2 F2400    ; Retract and raise Z
	G1 X5 Y5 F3000       ; Wipe out
	G1 Z10               ; Raise Z more
	G28 X0 Y0            ; Present print
	G90                  ; Absolute positioning
	SFS_DISABLE          ; disable smart filament sensor
	M106 S0              ; Turn-off fan
	M104 S0              ; Turn-off hotend
	M140 S0              ; Turn-off bed
	M84 X Y E            ; Disable all steppers but Z        # <-----------
	{% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
	{% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
	{% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
	{% if printer.toolhead.position.x < (max_x - 20) %}
	{% set x_safe = 20.0 %}
	{% else %}
	{% set x_safe = -20.0 %}
	{% endif %}
	{% if printer.toolhead.position.y < (max_y - 20) %}
	{% set y_safe = 20.0 %}
	{% else %}
	{% set y_safe = -20.0 %}
	{% endif %}
	{% if printer.toolhead.position.z < (max_z - 2) %}
	{% set z_safe = 2.0 %}
	{% else %}
	{% set z_safe = max_z - printer.toolhead.position.z %}
	{% endif %}
	G0 Z{z_safe} F3600             ; move nozzle up
	G0 X{x_safe} Y{y_safe} F20000  ; move nozzle to remove stringing
	TURN_OFF_HEATERS
	M107                           ; turn off fan
	G90                            ; absolute positioning
	G0 X60 Y{max_y} F3600          ; park nozzle at rear

Can you imagine what this line does?

After disabling the motors you always have to home before doing any move.

3 Likes

Thank you very much,
I will try in the next print and tell to you.
Have a nice weekend.
Pat

1 Like

Hello EddyMI3D,
Now end print is OK, I have just to adapt to my printer for parking the nozzle in front, particularly of my Ender 5 pro, front and rear are inverted.
Thank for your help.
Have a great day.
Pat

1 Like