TWIST_CALIBRATE: wipe the nozzle before the contact step

Plastic left on the nozzle sets the contact Z too high and squeezes away
during the run. The first real Verify (2026-11-04, about an hour after a PLA
print) saw bd_pressure and Beacon contact sink by about 0.004 mm per point
while proximity held within 0.006 mm, so it asked for a re-run. That cause
is likely but not yet confirmed.

Same order as PRINT_START: QGL, G28 Z, BLOBIFIER_CLEAN with the guard in log
mode, then the contact step. Refuses to start without BLOBIFIER_CLEAN or
_GUARD_ON. Tested against the simulated printer only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-04 00:47:04 +01:00
1 parent 7bee9a1ecd
commit 1fc4b26366
3 files changed
+14 -5

No files matched your search

+10 -2
View File
@@ -26,7 +26,7 @@ Modes:
y 175/295. With good compensation, bdp - proximity is flat along X.
Both: BED_MESH_CLEAR (the active mesh only; saved profiles stay), nozzle 150C,
HOME, QGL, contact Z, 2 passes (second in reverse order to cancel slow drift),
HOME, QGL, G28 Z, nozzle wipe (BLOBIFIER_CLEAN), contact Z, 2 passes (second in reverse order to cancel slow drift),
then Z10 and nozzle off. The bed heater is not touched.
Safety: refuses to start when Klipper is not ready, a print runs or another
@@ -210,7 +210,8 @@ def preflight(p, mode):
raise Problem("A print is running or paused. Try again afterwards.")
objects = p.get("/printer/objects/list")["objects"]
settings = p.query("configfile")["configfile"]["settings"]
missing = [m for m in ("HOME", "_NOZZLE_CONTACT_TEMP", "_TWIST_STATE")
missing = [m for m in ("HOME", "_NOZZLE_CONTACT_TEMP", "_TWIST_STATE",
"_GUARD_ON", "BLOBIFIER_CLEAN")
if "gcode_macro " + m not in objects]
missing += [s for s in ["beacon"] + (["bdp_touch"] * (mode == "verify"))
if s not in settings]
@@ -287,6 +288,13 @@ def run_points(p, mode, path):
p.gcode("_NOZZLE_CONTACT_TEMP WAIT=1")
p.gcode("HOME")
p.gcode("QUAD_GANTRY_LEVEL")
# As in PRINT_START. Plastic left on the nozzle sets the contact Z too high
# and squeezes away during the run: the touches then sink by ~0.004 mm per
# point (2026-11-04). QGL moved Z, so home again before the brush takes the
# nozzle below Z0. The bristles press on the nozzle: guard in log mode.
p.gcode("M117 Twist %s: cleaning the nozzle" % mode)
p.gcode("G28 Z")
p.gcode("_GUARD_ON PHASE=brush MODE=log\nBLOBIFIER_CLEAN\n_GUARD_OFF")
p.gcode("G28 Z METHOD=CONTACT CALIBRATE=1")
p.gcode("G90")
p.say("%d points, %d passes. The nozzle will touch the bed at each one."