Welcome! Log In Create A New Profile

Advanced

prevent pause mode after M702-unload filament

Posted by helmix 
prevent pause mode after M702-unload filament
July 30, 2022 05:06PM
At the end of a print-job I would like to automatically unload the filament and then power off the printer.
The G-Code sequence would be:

M125 ; Park Head
M702 ; Unload filament
M104 S0 ; turn off temperature
M140 S0 ; turn off heatbed
M107 ; turn off fan
M84 ; disable motors
M81 ; Power Off

The M702 unloads the filament correctly, but remains in a pause mode which must be ended manually before the remaining G-codes are executed!
Is there a way to prevent the M702 from pausing?

I'm using Marlin 2.1.x, bugfix version from 07/15/2022
(I've already tried to call the unload_filament() with show_lcd=false and I removed the ui.pause_show_message() calls from M702() function. But that made things only worse! It then completely stucks in pause.)

Any hints appreciated!
Thanks!
Re: prevent pause mode after M702-unload filament
July 30, 2022 06:12PM
How about:
G91; relative mode
G1 E-30 ; unload filament
Re: prevent pause mode after M702-unload filament
July 31, 2022 06:42AM
Quote
[email protected]
How about:
G91; relative mode
G1 E-30 ; unload filament

Thanks for the suggestion, bob.
I already thought about that. But in fact the M702 does more than just pulling back the filament.
It does a retract, wait for cooling, quickly purge and unload.
Re: prevent pause mode after M702-unload filament
July 31, 2022 08:36AM
Solved!
Sorry, I was on a misleading trail and so was the question.
The reason for the pause was the M125-park head and not the M702!
So I just replaced the M125 with a simple G1 move and now the script works correctly and powers off at the end without any manual actions.

(strange thing though that the M702 had been executed after M125 entered the pause mode... confused smiley)
Sorry, only registered users may post in this forum.

Click here to login