PrusaSlicer will add a M600 command when requesting a colorchange
If you're using Firmware 2.02 or later then filament-change.g is called if existent. Otherwise like M226 pause.g is called.
My workflow is at follows:
- Initiate Pause (M600 calling pause.g)
- unload the Filament (M702)
- load the new Filament (M701)
- resume the print (M24)
Edit:
for reference, these are my macros
; pause.g
; called when a print from SD card is paused
;
; generated by RepRapFirmware Configuration Tool on Tue Feb 20 2018 18:59:20 GMT+0100 (CET)
M83 ; relative extruder moves
G1 E-10 F3600 ; retract 10mm of filament
G91 ; relative positioning
G1 Z5 F360 ; lift Z by 5mm
G90 ; absolute positioning
G1 X0 Y0 F6000 ; go to X=0 Y=0''
;filaments/PETG/load.g
M291 P"Please wait while the nozzle is being heated up" R"Loading PETG" T5 ; Display message
G10 S225 ; Set current tool temperature to 225C
M116 P0; Wait for hotend temperature to be reached
M291 P"Feeding filament..." R"Loading PETG" T5 ; Display new message
G1 E5 F600 ; Feed 10mm of filament at 600mm/min
G1 E40 F3000 ; Feed 45mm of filament at 3000mm/min
G1 E55 F250 ; Feed 55mm of filament at 250mm/min
G4 P1000 ; Wait one second
G1 E-5 F1800 ; Retract 5mm of filament at 1800mm/min
M400 ; Wait for moves to complete
M292 ; Hide the message
;filaments/PETG/unload.g
M291 P"Please wait while the nozzle is being heated up" R"Unloading PETG" T5 ; Display message
G10 S225 ; Heat up the current tool to 225C
M116 P0; Wait for the hotend temperature to be reached
M291 P"Retracting filament..." R"Unloading PETG" T5 ; Display another message
G1 E10 F300;
G1 E-10 F4500 ; Retract 30mm of filament at 4500mm/min
G1 E-70 F3000 ; Retract 70mm of filament at 3000mm/min
M400 ; Wait for the moves to finish
M292 ; Hide the message again