@Hernicz said in Better filament Load and Unload handling:
There's no way to cancel and I have to wait until unload.g finishes before I'm able to select another filament. I'm also unable to put any script into unload.g, because as soon as unload.g finishes running I have no filament assigned.
I have no idea how the unload.g actually works but I had a similar problem with a trigger and I used M291 to interact with the user and you can simply store values in a global variable if you need it later.
Here how I did it with a trigger to head up my hotend, retract, bla bla and the operator can select a new temp for the hotend just because you can not flush the nozzle with ABS when your toolhead is at pla temp etc
;echo "Filament Change triggered"
M291 R"Tool" P"Change Filament?" K{"OK","Cancel"} S4
if (input == 0)
G1 Y1 F20000
;echo "Heating up"
M109 S190 ; Set temp and wait for it
G1 E-86 F600 ; Retract filament
echo "Change Filament"
M291 R"Tool" P"Filament Changed?" K{"Yes","Cancel"} S4
; Yes
if (input == 0)
G1 E84 F600 ; Extrude filament till nozzle
M291 R"Tool" P"Filament temp for nozzle purge" K{"210","230", "260"} S4
if (input == 0)
M109 S210 ; Set temp and wait for it
if (input == 1)
M109 S230 ; Set temp and wait for it
if (input == 2)
M109 S260 ; Set temp and wait for it
G1 E60 F400 ; Extrude to clean the nozzle
M400 ; Wait for the end of extrude
G1 E-18 F800 ; retracht filament from meltzone (revo)
M400
M104 S0 ; Extruder temp to 0
M568 P0 A0 ; Extruder heater off
M106 P5 S0 ; Turn the LEDs off
echo "Done"
; Cancel
if (input == 1)
M106 P5 S0 ; Turn the LEDs off
; No
if (input == 1)
echo "Chancel chosen"
M106 P5 S0 ; Turn the LEDs off
I found it very convenient to use whether I use the DWC or the display.
Cheers, Chriss