Better filament Load and Unload handling
-
I'm using ERCF Filament Changer and configured it to utilize filament change macros instead of tool changing. Most of the stuff is handled by the RRF (I try to give control to the Duet rather than the Slicer)
My problem is that when I manually load another filament using DWC, I have to wait for the unload.g to run first before I can select another filament.
I would like this to be changed, so when I manually change filament the popup window appears first, then I select the filament.
Then it checks if I want to load the same filament. Keep in mind there is a possibility of having the same filament in multiple slots in the ERCF in case of runout, so if it just gives a "Filament already loaded" message runout switching might fail.
Just after selecting filament the unload.g macro would run.
This also might need the previous filament stored somewhere so the correct unload.g is used (not the one the next filament has)
To be honest it would be nice to have a graphical interface for multi-material units, where filaments can be assigned to specific slots and their usage could be monitored and saved in a file.
-
@Hernicz Sounds like a similar problem to this thread: https://forum.duet3d.com/topic/36962/filament-change-logic-is-not-making-sense. See the responses there.
Ian
-
@droftarts Not really.
My issue is that the unload.g macro runs instantly when I press "Change Filament". 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.
The correct sequence would be:
- I click "Change Filament"
- Popup appears
- I click on a filament / ability to cancel
- (Here can be a checkpoint if I try to load the filament already loaded, but also take into accoult that there might be duplicates in the Multi-Material unit for runuot purposes, so there's a scenario when I want to do that)
- unload.g runs (current/old filament)
- load.g runs (next filament)
- config.g (next filament)
-
@Hernicz Is there any reason why you can't have an empty unload.g file and then perform both the unload and load operations from the load macro?
-
@gloomyandy Because as soon the empty unload.g runs there will be no filament assigned to the tool.
If I cancel filament selection after that I'm left with no filament.
How would I unload the filament if I can't use its unload.g?
Would filament specific configurations of the previous filament still be applied when unloaded?Also I use unload.g for ERCF and there it works well.
This issue only applies to DWC
Imagine if you would want to eat something you would need to unload the entire fridge before you can chose anything, you cannot just open the door and see what you have or just close the fridge and don't take out anything at all if you change your mind. You need to unload it all if you interact with it and only then you can make decision about the next step.
-
@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
-
@Chriss Scripting is not a solution for this problem.
The only solution would be if unload.g would run when I click on a filament from the dropdown menu and not when I click on change filament.
I don't know where you run your script from, but if you don't use your filament folder and macros, then the script is irrelevant.
I use filament configs, I also have filament specific temperatures configured there as well, so basically I can set the temp to 0 in my slicer and print the same GCode using different materials. Pressure Advance and XY Compensation is also set up on the filament level. I call it Filament Independent Slicing.
-
@Hernicz Well, duet, as you know, is g-code only, so scripting is the only way too implement anything in RRF. You can add any kind of interaction code wherever you want, in the start.g, in some filament specific g-code what so ever. I just wanted to show you HOW you can implement a interaction with the operator and how I did it. It is fine for me if you think that it is irrelevant in your case and you are not going to use it.
Good luck,
Chriss