Prevent turning Z stepper OFF on END_PRINT

Basic Information:

Printer Model: T350
MCU / Printerboard: BTT Kraken 1.1
Host / SBC banana pi
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

Hi,

I’ve searched imho everywhere but I didn’t find anything besides ai slop or topics relating to PAUSE - sorry if I missed it.

My printer bed is on 3 T8 rods and will drop a bit when the steppers are turned off, forcing a new G28 Z0 and a Z-TILT every time. I’d like it to keep the Z-steppers on and maybe, if possible, kill them after idle-timeout.

Is there a way to disable turning off the Z-stepper after a print? It feels stupid that i didn’t find anything on this, sorry…

If you had attached a klippy.log we could look and see what is disabling your motors.

ATM we can only speculate. Check your slicer end gcode.

Usually this is either set in the Slicer end gcode script settings or the END_PRINT macro in Klipper - hence the need of the klippy.log as @cardoc explained.

I’m sorry I was sure this would be a klipper - builtin thing so I didn’t attach the log. Here it is. Thx in advance!

klippy(11).log (1.7 MB)

edit:

END_PRINT:

\[gcode_macro END_PRINT\]
gcode:
    G91 ;releative positioning
    G1 E-1 F2700 ;Retract a bit
    G1 E-1 Z0.2 F2400 ;Retract and raise Z
    G1 X-3 Y-3 F3000 ;Wipe out
    G1 Z10 F400 ;Raise Z more
\# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0

G90 ; Absolute Positioning
G1 X150 Y20 F3600 ; Move Printer Head Out of Way

M84 X Y E ;Disable all steppers but Z
SET_STEPPER_ENABLE STEPPER=stepper_z ENABLE=1

I already added the last line to enable Z again but no go.

AFAIK, Klipper does not take parameters on M84 or M18, so it always turns off all motors when that command is issued.

You may use set_stepper_enable instead

e.g.

SET_STEPPER_ENABLE STEPPER=stepper_x ENABLE=0

Once turned off, turning on has no effect because the position is already invalid.

BTW: Have you shortened the klippy.log? The config is missing.

well i don’t know. Now I cycled the logs, restarted, and started (and ended) a new print.

klippy(12).log (659.9 KB)

Maybe the Kalico guys did something.

You may ask them.

SET_STEPPER_ENABLE STEPPER=stepper_x ENABLE=0

that for X and Y instead of M84 could be the solution, didn’t recognize that yesterday. I’ll try it.

well that did it. I somehow didn’t notice the M84 (or what it does), thinking the “steppers-off” was somehow hardcoded or something. Wrong, ofc.

Solution for me: I’ve added the following to my END_PRINT:

#    M84 X Y E ;Disable all steppers but Z
    SET_STEPPER_ENABLE STEPPER=stepper_x ENABLE=0
    SET_STEPPER_ENABLE STEPPER=stepper_y ENABLE=0 

    SET_IDLE_TIMEOUT TIMEOUT=1800

thx at all for the help!

Beware that if you use SET_STEPPER_ENABLE to disable a motor, klipper does NOT remove that motor from the list of homed axes. It will still allow moves on that axis and act as if the position for that motor is known.
If your machine is a coreXY, disabling one of x or y allows movement on both axes, and both could move out of position, but klipper will act as if they aren’t. So make sure you re-home before doing any movements.

thanks for the heads-up! Guess I’ll remove the STEPPER_ENABLE too then. Won’t matter much if they stay powered for half an hour longer…

you could use SET_KINEMATIC_POSITION CLEAR_HOMED=… to unhome the disabled axis

that’s even better. Thanks!