I’m very new to macros and macro building. I’ve currently got a very simple print_end macro, but it’s not working exactly as I wanted.
Essentially, the original macro would send a M84 disabling all motors. I wanted to replace it with an M18 X Y E0, so the bed motors would remain engaged. That’s not working. Am I missing something? Any help would be greatly appreciated. Thank you all in advance
[gcode_macro PRINT_END]
# The end_print macro is also called from CANCEL_PRINT.
gcode:
#SAVE_GCODE_STATE NAME=end_print_state
M104 S0 ;extruder heater off
M140 S0 ;heated bed heater off
G91 ;relative positioning
G1 Z10 E-2 F3600 ;retract the filament a bit before lifting the nozzle.
G1 E-2 F3600 ;retract filament even more
G90 ;absolute positioning
G0 X5 Y320 ; Park in the back
M18 X Y E0 ;disable all motors except Z
M107 ; part cooling fan off
M117 Done.
Is there another way of performing this action? Maybe move the bed down 1mm after the motors are disabled? Problem with that is as soon as the motors are disabled, they need to be re-homed. Can I force a Z movement without homing?
This is a diagnostic and debugging tool and must be used with care. Disabling an axis motor does not reset the homing information. Manually moving a disabled stepper may cause the machine to operate the motor outside of safe limits. This can lead to damage to axis components, hot ends, and print surface.