Pause avoids M600 to execute
-
Hi. I have setup an end of filament sensor in the way of an encoder, it works really well. But today I did real test: it detexcts perfectly when no filament is there, pause the print.... acording to my filament-error file it should laucngh a message after the OK should run an M600 command and so execute filament-change.g file.
All goes well exept that everything stops at the message, afeter Y press ok, M600 is not execute nor the echo line I intruded later as a debugging
My files:
pause.g
; pause.g ; called when a print from SD card is paused ; ; generated by RepRapFirmware if (global.filamenterror = 4) | (global.filamenterror = 5) G91 ; relative positioning G1 Z5 F360 ; lift Z by 5mm G90 ; absolute positioning G1 X10 Y150 F6000 ; go to a side M568 A0 M291 P"Potential filament JAM detected. Filament will be removed, manual intervention required" R"possible filament JAM" S2 else M83 ; relative extruder moves G92 E0 G1 E-1.2 F1000 ; retract 10mm of filament G91 ; relative positioning G1 Z5 F360 ; lift Z by 5mm G90 ; absolute positioning G1 X10 Y150 F6000 ; go to a side M568 A0 M84 S0 M291 P"Printing paused, if not by you, check filament run out" R"PAUSE" S1
filament-error.g
set global.filamenterror = param.P M591 D0 P7 C"io4.in" S0 L0.2 R20:350 E3 ; deshabilito encoder M25 if param.D = 0 ; numero el ewxtrusor que causo el disparo del SFF if global.filamenterror = 2 M291 S1 R"Filament sensor error" P"An error reading filament sensor. Please check cables or visually inspect it. Printing has been paused, if necesary cancell it. This box can be closed with no further effects" echo >> "errors.log" "filament error from filament monitor code: "^{param.P}^" "^state.time^"" if (global.filamenterror = 4) | (global.filamenterror = 5) M291 S2 R"Filament error" P"No filament or possible jam on hotend. Print has been paused, manual intervention required. Press ok when ready" echo >> "errors.log" "filament error from filament monitor code: "^{param.P}^" "^state.time^"" M600 if param.D = 1 if (global.filamenterror = 4) | (global.filamenterror = 5) M291 S2 R"Filament error T1" P"No filament or possible jam on hotend in T1. Print has been paused, manual intervention required. Press ok when ready" echo >> "errors.log" "filament error from filament monitor code: "^{param.P}^" "^state.time^"" M600 echo >> "error.log" "filament error triggered "^state.time^""
Also, if being paused and in console I execute M600, nothing is done, like the command is being ignored.
Thanks in advanced for the help you can provide me
-
Likely because M600 is itself a pause, though it's intended to be used within a print file.
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m600-filament-change-pause
Instead of pausing on filament out, just call M600 directly to initiate the filament change pause and handle it within filament-change.g
-
@Phaedrux is like you said. "Problem" solved. Thank you very much.