How to cancel loading/unloading of filament?
-
tl;dr; The
move.extruders[].filament
value updates even if the macro fails to complete.Issue #437 on Github discusses this and it seems the recommended approach is to add a
T-1
before anyabort
command. However, if the user selects "Cancel" after runningM291 P"<message>" S3
there does not seem to be away to set the tool toT-1
Would you have to do something like this?
T-1 ; disable tool M291 P"Feed filament?" S3 T0 ; reset tool
Is setting
T-1
still the recommended approach?Any help on this would be greatly appreciated.
-
@skezo
It would be helpful to know the conditions that cause the macro to fail or require cancellation.
However if T-1 stops the filament change in the object model (haven't tested), then you could try something like this (assuming you are running RRF 3.5b)EDIT
I did some testing.
This should cover most scenarios.;load.g example ; requires RRF 3.5b2 or later ; if no tool is selected, ask the user to select one ; note if filament is loaded from DWC it will default to T0 if no tool is selected, so this won't get run if state.currentTool = -1 var toolnumbers = vector(#tools,0) while iterations < #tools set var.toolnumbers[iterations] = "Tool " ^ iterations M291 R"Select Tool" P"A tool must be selected" S4 K{var.toolnumbers} F0 T{input} ; use P0 if you want to select tool without running tool change macros ; ask for confirmation before feeding filament M291 R"Confirm" P"Feed filament?" S4 K{"Yes","Abort change",} F0 if input = 1 T-1 ; use P0 if you want to de-select tool without running tool change macros M99 ; cancel macro ; do moves to load filament echo "doing moves for loading filament"
-
Thanks! I updated to
release 3.5
and this approach seems to work well.
Is there a reason you usedM99
overabort
?Edit:
If I understand correctlyM99
works better here as it does not cancel the current print file. Whereasabort
would. -
-
@skezo tracking this github issue here:
https://github.com/Duet3D/RepRapFirmware/issues/437can you confirm its fixed in 3.5.0beta3?