Paneldue access to Filament Config load/unload options
-
https://forum.duet3d.com/topic/10483/paneldue-filaments
I found this thread from 2019, which had the same question as I do now.
On Duet you have a nice and simple way to load and unload filaments using a single control. You just tap the tool, tap load, and it shows your list of filament setups. Choose the one you're loading and it'll follow your preset load.g etc etc. Nice and neat.
The paneldue setup still seems to not use that though (in fact from what I can see from that thread... paneldue hasn't been updated since at least 2019?)
Is there a way to do this, or is it still just the workaround of using up macro slots on the main screen for it and firing off M701 / M702 with them?
-
@nirin
There's probably not going to be a similar functionality to DWC because PanelDue doesn't use a browser.
If you run RRF 3.5 there is a better option to creating a macro button for each filament.
This macro takes advantage of M291 and will allow you to put your filaments into a list and cycle through the pages of them until you find the one you want.
You could simply use M291 S7 to prompt for the name of the filament you want to change to, which would be a simpler macro, but would require you to type it in exactly as it is in DWC
This way you can cut and past your filament names from DWC into the macro.
The best way to get the list is sendM20 S0 P{directories.filaments}
and copy the result from the consoleYou can adjust the number of buttons displayed on each page to suit yourself.
I found five buttons per page fitted on one line (7i)
If you use six, the NEXT button is on another line.
On the last page not all buttons will have a name and a cancel button appears.
EDIT: 7i PD can only display a max of 10 buttons, so I've limited it too that.Download link at bottom of post.
; ChangeFilament.g ; requires RRF 3.5 or later! ; list of filaments must follow rules for array ; https://docs.duet3d.com/User_manual/Reference/Gcode_meta_commands#array-expressions var filaments = {"ABS","ASA","EDGE","eFlex","eLastic","FLEX","HIPS","NGEN","NYLON","PA-CF","PC","PCABS","PDVF","PEEK","PEI","PEKK","PET","PETG","PLA","POM","PP","PSU","PVA","SCAFF","TPE","TPU",} ; list your filaments here var maxBtns = 10; Max number of buttons per page on PanelDue. Adjust as required. 5 works OK on 7"paneldue - 9 is max! ; don't change below here var thisTool = state.currentTool if var.thisTool = -1 abort "No tool selected" var thisFilament = move.extruders[tools[var.thisTool].extruders[0]].filament var newFilament = null if var.maxBtns > 10 set var.maxBtns = 10 echo "Paneldue can only display 10 buttons in total" echo "Max buttons has been reset" var thisPage = vector(var.maxBtns,"") var numPages = floor(#var.filaments / (var.maxBtns - 1)) if mod(#var.filaments , var.maxBtns - 1) > 0 set var.numPages = var.numPages + 1 var pagesDone = 0; var btnsDone = 0 var nextFilament = "" var nextItem = 0 while var.pagesDone < var.numPages set var.thisPage = vector(var.maxBtns,"") set var.btnsDone = 0 while var.btnsDone < var.maxBtns-1 set var.nextItem = iterations + (var.pagesDone * (var.maxBtns-1)) if var.nextItem = #var.filaments break set var.thisPage[var.btnsDone] = var.filaments[var.nextItem] set var.nextFilament = var.filaments[var.nextItem] set var.btnsDone = var.btnsDone + 1 if var.pagesDone = var.numPages - 1 set var.thisPage[{var.maxBtns-1}] = "Cancel" else set var.thisPage[{var.maxBtns-1}] = "Next" set var.pagesDone = var.pagesDone + 1 M291 P"Select filament" S4 K{var.thisPage} if input = var.maxBtns-1 continue else set var.newFilament = var.thisPage[input] break if (var.newFilament = null) || (var.newFilament = "") abort "No filaments chosen" else echo "Filament chosen : ", var.newFilament, " : commence change" if var.newFilament = "noFilament" M701 S{var.newFilament} if result != 0 abort "Error during loading" M703 else if (var.thisFilament != "noFilament") && (var.thisFilament != null) M702 M701 S{var.newFilament} if result != 0 abort "Error during loading" M703
-