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

+1 -1
View File
@@ -80,7 +80,7 @@ gcode:
{% if bed > 40 %} {% if bed > 40 %}
RESPOND TYPE=command MSG="action:prompt_text Note: the bed is at {bed|int} C. The reference runs were on a cold bed, so wait for it to cool unless you want this on purpose." RESPOND TYPE=command MSG="action:prompt_text Note: the bed is at {bed|int} C. The reference runs were on a cold bed, so wait for it to cool unless you want this on purpose."
{% endif %} {% endif %}
RESPOND TYPE=command MSG="action:prompt_text It heats the nozzle to 150 C, homes, levels and takes {'25' if mode == 'measure' else '17'} minutes. The configuration is not changed." RESPOND TYPE=command MSG="action:prompt_text It heats the nozzle to 150 C, homes, levels, wipes the nozzle on the brush and takes {'25' if mode == 'measure' else '17'} minutes. The configuration is not changed."
RESPOND TYPE=command MSG="action:prompt_footer_button Back|TWIST_CALIBRATE|secondary" RESPOND TYPE=command MSG="action:prompt_footer_button Back|TWIST_CALIBRATE|secondary"
RESPOND TYPE=command MSG="action:prompt_footer_button All checked, start|_TWIST_START MODE={mode}|primary" RESPOND TYPE=command MSG="action:prompt_footer_button All checked, start|_TWIST_START MODE={mode}|primary"
RESPOND TYPE=command MSG="action:prompt_show" RESPOND TYPE=command MSG="action:prompt_show"
+3 -2
View File
@@ -42,8 +42,8 @@ The calibration clears the active bed mesh (saved profiles stay).
## What the run does ## What the run does
It heats the nozzle to 150 C, homes, runs QGL and sets Z by contact. It then It heats the nozzle to 150 C, homes, runs QGL, wipes the nozzle on the Blobifier
visits each point twice, the second pass in reverse order to cancel slow drift. brush and sets Z by contact. It then visits each point twice, the second pass in reverse order to cancel slow drift.
The nozzle touches the bed at every point. At the end it lifts to Z10 and turns The nozzle touches the bed at every point. At the end it lifts to Z10 and turns
the nozzle heater off. The bed heater is not touched. the nozzle heater off. The bed heater is not touched.
@@ -140,6 +140,7 @@ that computer, under its own home directory.
- Mainsail with `[respond]`, for the windows - Mainsail with `[respond]`, for the windows
- `gcode_shell_command`, to start the script from a macro - `gcode_shell_command`, to start the script from a macro
- Beacon, used in contact and proximity mode - Beacon, used in contact and proximity mode
- The Blobifier macros (`BLOBIFIER_CLEAN`) and the nozzle guard (`_GUARD_ON`)
- Python 3 on the Pi (standard library only), and Moonraker trusting localhost - Python 3 on the Pi (standard library only), and Moonraker trusting localhost
- For Verify: `[bdp_touch]` and the bd_pressure load-check firmware - For Verify: `[bdp_touch]` and the bd_pressure load-check firmware
- `[axis_twist_compensation]` is not needed for the first Measure; the result - `[axis_twist_compensation]` is not needed for the first Measure; the result
+10 -2
View File
@@ -26,7 +26,7 @@ Modes:
y 175/295. With good compensation, bdp - proximity is flat along X. 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, 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. 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 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.") raise Problem("A print is running or paused. Try again afterwards.")
objects = p.get("/printer/objects/list")["objects"] objects = p.get("/printer/objects/list")["objects"]
settings = p.query("configfile")["configfile"]["settings"] 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] if "gcode_macro " + m not in objects]
missing += [s for s in ["beacon"] + (["bdp_touch"] * (mode == "verify")) missing += [s for s in ["beacon"] + (["bdp_touch"] * (mode == "verify"))
if s not in settings] if s not in settings]
@@ -287,6 +288,13 @@ def run_points(p, mode, path):
p.gcode("_NOZZLE_CONTACT_TEMP WAIT=1") p.gcode("_NOZZLE_CONTACT_TEMP WAIT=1")
p.gcode("HOME") p.gcode("HOME")
p.gcode("QUAD_GANTRY_LEVEL") 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("G28 Z METHOD=CONTACT CALIBRATE=1")
p.gcode("G90") p.gcode("G90")
p.say("%d points, %d passes. The nozzle will touch the bed at each one." p.say("%d points, %d passes. The nozzle will touch the bed at each one."