Introduction
Printer Side
My investigations in how to print and get to a mid-print filament change such that I could change colour led me to have to put some more configs in the printer.
My printer being an Elegoo Neptune 4 Pro, it runs Klipper.
Apparently it does not natively come with support for the G-code M600
which instructs the printer to do a filament change.
And thus it ignores the code and continues.
Reddit led me to this video that explains in more detail.
Summary would be that one adds a macro into the printer configs that is then triggered when the M600
is present.
There are many more macros that the community has created.
In my case, I have no need just yet for the rest of them.
The GitHub is here.
The relevant code to add to printer.cfg
is below (as of post date).
######################################################################
# Filament Change
######################################################################
# M600: Filament Change. This macro will pause the printer, move the
# tool to the change position, and retract the filament 50mm. Adjust
# the retraction settings for your own extruder. After filament has
# been changed, the print can be resumed from its previous position
# with the "RESUME" gcode.
[pause_resume]
[gcode_macro M600]
gcode:
{% set X = params.X|default(50)|float %}
{% set Y = params.Y|default(0)|float %}
{% set Z = params.Z|default(10)|float %}
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91
G1 E-.8 F2700
G1 Z{Z}
G90
G1 X{X} Y{Y} F3000
G91
G1 E-50 F1000
RESTORE_GCODE_STATE NAME=M600_state
Slicer
There are plenty of resources online, but for my printer, I have to add in post-processing commands in.
- Under
Extensions
>Post-Processing
>Modify G-Code
- Add script of
Filament Change
- The main thing is to remember is that the layer change number is when it requests the filament change prior to printing that layer
Another thing to consider is that a shall purge tower is useful such that the tiny bit of built up filament on the head whilst the physical switch over of the reel is happening. I used a small 20mm ring of 1mm thickness to do so successfully.