Example program · 3D printing
Klipper M600 Filament Change Macro — G-Code Example
Klipper has no built-in M600. This macro pauses, parks the head and unloads, so slicer colour changes work like on Marlin.
Klipper has no built-in M600. This macro pauses, parks the head and unloads, so slicer colour changes work like on Marlin.
| Item | Value |
|---|---|
| Machine | 3D printer (Klipper) |
| Units | Metric |
| Lines | 19 |
Macro for printer.cfg
[pause_resume]
[gcode_macro M600]
description: Filament change
gcode:
{% set X = params.X|default(10)|float %}
{% set Y = params.Y|default(10)|float %}
{% set Z = params.Z|default(10)|float %}
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91
G1 E-1 F2700
G1 Z{Z} F600
G90
G1 X{X} Y{Y} F6000
G91
G1 E-50 F1000 ; unload (set to your Bowden length)
RESTORE_GCODE_STATE NAME=M600_state
; load new filament by hand, then press RESUME▶ Check it in the 3D printer simulator
How it works
- Many PAUSE macros already park the head; then remove the park moves here.
- Long unload moves can hit max_extrude_only_distance: split them or raise the limit.
Codes used in this program
Check bed size, temperatures, probe and macro names against your own printer before you use this code, and stay at the printer for the first run.
More 3D printing programs
- Marlin Start G-code with Mesh, Prime Line and Safe Heating
- Marlin End G-code: Retract, Park and Cool Down
- Klipper PRINT_START Macro with Adaptive Mesh and Purge
- Klipper PRINT_END Macro That Parks Safely at Any Height
- E-steps Calibration Sequence (Marlin)
Was this page helpful?