Triggering 'Load Filament' prompt with a macro
-
Hello all,
I am setting up triggers so that I can load/unload filament with physical buttons/filament sensors on my machine. I would like to have it so one of these triggers activates the 'Load Filament' prompt. I have not been able to find anywhere in the documentation if this is possible. Is it only something within DWC?
Picture of the prompt I am talking about:
Can anybody help me with this? I know I could create a message with M291, and then select the filaments from there, but that seems to be a very roundabout way of doing it, and I need to make sure that the filaments in the dialog stay synced with the filaments in my filaments directory.
Thank you
-
@Surgikill M701 triggers the 'load filament' dialogue. M702 triggers the unload filament, M703 configures filaments. See https://docs.duet3d.com/en/User_manual/Reference/DWC_filaments
Ian
-
@droftarts Not quite right, M701 is triggered by the "load filament" dialog when a filament is selected.
@Surgikill The dialog itself is a DWC-only feature. But you might be able to implement a work-around using a multiple choice M291 dialog (M291 S4). Otherwise you'd have to write a DWC plugin or fork DWC.
-
@chrishamm Oops! Though could you trigger it by raising an event? eg
M957 E"filament-error" D0 P3
Ref
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m957-raise-event
https://docs.duet3d.com/User_manual/RepRapFirmware/Events
https://docs.duet3d.com/User_manual/Connecting_hardware/Sensors_filament#event-system-filament-error-eventsIan
-
@droftarts If I trigger it using a filament error event, then it's just going to go into the 'filament-error.g' macro, and I end up in the same boat of not being able to get the dialog to pop up on screen with a physical input. It seems like the only way to trigger this dialog is with the button on DWC.
@chrishamm I know I can do it with M291, but that seems pretty clunky, unless there is a way I can extract the filaments by filepath in a subdirectory. I'm not sure of a way to do this.
-
@droftarts No, that dialog is a DWC-only feature and it isn't coupled to any firmware mechanism.
@Surgikill You could write a DWC plugin which reacts to a specific global variable change and which displays a filament dialog whenever that variable changes. But of course that would require some coding skills, yet it should be technically possible.
-
@chrishamm So I'm guessing there is no way I can implement a M291 prompt that pulls variables based on filepaths inside a folder?
-
@Surgikill you can certainly have a trigger generate a M291 dialog.
-
@dc42 Yes, I am doing that now. However, I want the prompt to contain options that are dynamically created based on the content of "0:/filaments". I don't want to update the prompt every time I add a filament, or modify the name of a filament. Just like how DWC creates the prompt when pressing the 'Load Filament' button.