SOLVED RRF 3.3b2 - triggered Pause - printer resumes automatically?
I can't find that is has been reported before but I know I had issues with 3.3b1 with the pause function, so that it did not trigger pause.g at all. I discovered just now that pause is still somewhat broken with 3.3b2?
This is what happens: Printer prints, filament runout detected, printer triggers pause.g, runs the content of pause.g and then resumes printing without me pushing the resume button. The DWC and Panel Due 5i then state that it's still pausing so pausing again does not work to stop it. Only way to stop the print (without filament) is to use the " Emergency STOP" command / button.
To rule out any error on my side, the full config and macros:
; General preferences G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves ; Network M550 P"Pruset II MK3s" ; Set machine name M552 S1 ; Enable network ;*** Access point is configured manually via M587 M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Disable FTP M586 P2 S0 ; Disable Telnet M575 P1 S1 B57600 ; Panel Due ; Drive Mappings M569 P0.0 S1 V0 ; Drive 0: X Axis M569 P0.1 S0 V0 ; Drive 1: Y Axis M569 P0.2 S1 V0 ; Drive 2: Z Axis M569 P0.3 S1 V0 ; Drive 3: E Axis M569 P0.4 S1 V0 ; Drive 4: E1 used for Z1 ; Motor remapping for dual Z and axis Limits M584 X0 Y1 Z2:4 E3 ; two Z motors connected to driver outputs Z and E1 M671 X-37:287 Y0:0 S10 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis ; Micrpstepping and Speed M350 X32 Y32 E16 Z16 I1 ; Configure microstepping with interpolation M92 X200.00 Y200.00 Z400.00 E415.00 ; Set steps per mm ; Speeds, Acceleration and Jerk M566 X240.00 Y240.00 Z25.00 E600.00 P1 ; Set maximum instantaneous speed changes (mm/min) M203 X7500.00 Y7500.00 Z730.00 E1200.00 ; Set maximum speeds (mm/min) M201 X3000.00 Y3000.00 Z1200.00 E5000.00 ; Set accelerations (mm/s^2) ; Motor currents M906 X850.00 Y900.00 Z800.00 E550.00 I20 ; Set motor currents (mA) and motor idle factor in percent M84 S30 ; Set idle timeout ; Printer geometry M208 X0:250 Y-4:215 Z-0.5:205 ; Axis Limits M564 H0 ; allow unhomed movement ; Endstops for each Axis M574 X1 S3 ; Set endstops controlled by motor load detection M574 Y1 S3 ; Set endstops controlled by motor load detection ; Stallgaurd Sensitivy M915 X S-4 F0 H200 R0 ; Set X axis Sensitivity M915 Y S-1 F0 H200 R0 ; Set y axis Sensitivity ; Input Shaper ;M593 F58.5 P4 S0.2 ; Input Shaping 3.3/3.4 M593 F57.5 ; Z-Probe Super PINDA M574 Z1 S2 ; Set endstops controlled by probe M558 P5 C"^io3.in" I1 H0.7 F520 T6000 A50 S0.005 ; PINDA F1000:300 ; Mesh Grid M557 X24:233 Y15:195 P8 ; Define mesh grid for probing ; Sheets ;G31 P1000 X23 Y5 Z1.515 ; Textured Sheet G31 P1000 X23 Y5 Z1.210 ; PEI Sheet ; Heatbed Heaters and Thermistor Bed M308 S0 P"temp0" Y"thermistor" T100000 B4725 C7.060000e-8 ; Set thermistor + ADC parameters for heater 0 Bed M950 H0 C"out0" T0 Q100 ; Creates Bed Heater M307 H0 R0.276 C365.2 D12.50 S1.00 V24.0 B0 ; PID 3.2 M140 H0 ; Bed uses Heater 0 M143 H0 S120 ; Set temperature limit for heater 0 to 120C Bed ; HotEnd Heaters and Thermistor HotEnd M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.060000e-8 ; define E0 temperature sensor e3d M950 H1 C"out1" T1 Q100 ; Create HotEnd Heater M307 H1 R2.301 C162.7:122.2 D7.10 S1.00 V24.3 B0 ; PID M143 H1 S285 ; Set temperature limit for heater 1 to 285C HotEnd M302 S185 R185 ; Fans M950 F1 C"out5" Q100 ; Creates HOTEND Fan M106 P1 T45 S200 H1 ; HOTEND Fan Settings M950 F0 C"out6" Q100 ; Creates PARTS COOLING FAN M106 P0 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off PARTS COOLING FAN ; Tools M563 P0 D0 H1 F0 ; Define tool 0 G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C ; StealthCop calibration M17 G4 P150 G1 X1 Y1 Z1 G4 S2 M84 ; disable motors ; Filament Sensor Logic M98 P"0:/macros/02_Functions/StartupFilamentSensorCheck" ; Runout Sensor Logic: Startup with filament = runout sensor active Startup without filament = autoload active
; pause.g ; called when a print from SD card is paused ; ; generated by RepRapFirmware Configuration Tool v2 on Tue Aug 06 2019 23:15:45 GMT+0200 (Central European Summer Time) M83 ; relative extruder moves if sensors.filamentMonitors.status == "ok" G1 E-3 F3000 ; retract 3mm of filament G91 ; Relative Positioning G1 Z10 F360; Raise Z G90 ; Absolute Values G1 X10 Y0 F6000 ; Parking Position M300 S80 P8000 ; play beep sound if sensors.filamentMonitors.status == "noFilament" M98 P"0:/macros/2.1 Unload Filament"
2.1 Unload Filament:
; Filament runout feature stop and frees up port M591 D0 P0 C"e0stop" S1 ; Filament Runout Sensor M950 J1 C"nil" ; Free up port T0 ; Activate Hotend if heat.heaters.current < 180 M291 P"Hotend too cold for loading filament. Preheat extruder first to 215°C?" R"Autoload" S3 ;Ask to preheat extruder T0 ; Select Tool 0 Hotend M291 P"Heating please wait" T2 ; Message to wait M109 S215 ; Set extruder temp to 210°C and wait M291 P"Retracting filament..." R"Unloading PLA" T5 ; Display another message ;Anti Blob Unloading Sequence G1 E4 F1800 G1 E-6 F1800 G4 S5 ; wait 5 seconds G1 E7 F1800 G1 E-120 F1200 ; Retract 8mm of filament at 2000mm/min M291 P"Please confirm." R"Filament Removed" S2 ; Confirm Message G4 S3 ; wait 3 seconds M98 P"0:/macros/02_Functions/StartupFilamentSensorCheck" ; GCODE Script / check to activtate RunOut Sensor if filament has been loaded successfully otherwise enables Autoload
; Checks for filament on startup. No filament = Run Macro "Activate_Autoload" to activate Autoload Feature (trigger.2g in sys folder) ; GCODE Script to free up Ports and activate RunOut Sensor M98 P"0:/macros/02_Functions/ActivateRunOutSensor" ; Activates Autoload Function when no filament loaded if sensors.filamentMonitors.status == "noFilament" M98 P"0:/macros/02_Functions/ActivateAutoload"
You haven't posted all of your macro files... ActivateRunOutSensor and ActivateAutoload are missing.
Sorry, the missing two:
;GCODE to activate RunOutSensor M581 P1 T2 S-1 R0 ; Filament Sensor P1 triggers Trigger2.g always (R0) TRIGGER OFF M950 J1 C"nil" ; Input 1 e0 Filament Sensor M591 D0 P2 C"io1.in" S1 ; Filament Runout Sensor
; Filament Sensor gets ready for next load M591 D0 P0 C"e0stop" S1 ; Filament Runout Sensor M950 J1 C"nil" M950 J1 C"io1.in" ; Input 1 e0 Filament Sensor M581 P1 T2 S0 R0 ; Filament Sensor P1 triggers Trigger2.g always (R0)
; Trigger 2 Script - Triggered by Filament Sensor mapping - Used for autoload M300 S1500 P2000 ; play beep sound G4 P2000 ; Wait two seconds M581 P1 T2 S-1 R0 ; Filaent Sensor does not listen anymore (S-1). Autoload is disabled. T0 ; Activate Hotend if heat.heaters.current < 180 M291 P"Hotend too cold for loading filament. Preheat extruder first to 215°C?" R"Autoload" S3 ;Ask to preheat extruder T0 ; Select Tool 0 Hotend M291 P"Heating please wait" T2 ; Message to wait M109 S215 ; Set extruder temp to 215°C and wait M291 P"Feeding filament" R"Trigger 2 Autoload" T2 ; Display new message M98 P"0:/macros/2 LoadFilament" ; GCODE Script to load filament M98 P"0:/macros/02_Functions/StartupFilamentSensorCheck" ; GCODE Script / check to activtate RunOut Sensor if filament has been loaded successfully otherwise enables Autoload M291 P"Filament loading complete" R"Finished" T2 ; Display message ; Job finished message if state.status != "paused" M291 P"Set extruder temperature to 160°C?" R"Ooze prevention" S3 ;Ask to set extruder temp to 160°C M104 S160
DocTrucker last edited by
Can't see anything in that trigger file that calls for a pause?
Runout does not trigger trigger2.g.
If it's set to runout:
M581 P1 T2 S-1 R0 ; Filament Sensor P1 triggers Trigger2.g always (R0) TRIGGER OFF M950 J1 C"nil" ; Input 1 e0 Filament Sensor M591 D0 P2 C"io1.in" S1 ; Filament Runout Sensor
it triggers pause.g
if sensors.filamentMonitors.status == "noFilament" M98 P"0:/macros/2.1 Unload Filament"
does lead to "2.1 Unload Filament:"
So far everything works and I also see:
M291 P"Please confirm." R"Filament Removed" S2 ; Confirm Message
on my PanelDue and then the printer just resumes printing. PanelDue states "Pausing" and waits for a "ok" to proceed. because M291 is set to S2.
I'm a bit confused what do you have attached to e0stop? The code seems to be creating a sensor of type P0 which is none on it?
Sorry for the confusion. Looking at it, it seems to be a unnecessary line of code in the ActivateAutoload and Unload Filament macros. But I have to test if it works without that line.
All the macros are there to mimic the typical Prusa filament autoload and runout behaviour as you can't use trigger2 and runout detection at the same time.
But I'm not sure if this can cause the printer to automatically resume a paused print (triggered by runout detection) and be in a state where it can't be paused anymore?
DocTrucker last edited by
@Argo right, gotcha. I've been having a fair bit of fun trying to get triggerx.g files to behave recently and missed the M591.
For fault finding I would recommend writting it all into one trigger file and setting the run out to be detected from a switch input. Set temps in a file to 0, allow cold extrusion, and unload the filament before print. Runwith thay before going live build again.
Fried brain abit today, will look again tomorrow!
@Argo If what you want to do is to delete the filament sensor from an extruder then from looking at the code just specifying M591 D0 P0 (assuming the monitor is on extruder 0) should do the job.
You may want to try removing the M291 calls (just temporarily) to see if that changes the way things operate.
Oh and is this code running stand alone or on an SBC setup?
I’ll try the macros without the message box tomorrow.
Then again I’m asking myself why the macro runs fine up to the message and then resumes printing without the printer knowing that it’s printing again.
I don’t think there should be a gcode that can do this?
I run the Duet 3 Mini in standalone mode.
I'm not saying there is not a problem. The more information you can provide the more likely it is that someone will be able to fix the problem (if there is one). At the moment you have a fairly complicated setup that involves a lot of macros. This is tricky for anyone trying to help to reproduce. So if you can simplify the setup or identify what element of your setup is triggering the problem it will be easier either for you to work around or for someone to investigate further.
I understand what you mean.
My hope was that it may be a already known issue with the setup I’m having or that something obvious is wrong.
The config I‘m using was ported and modified two times. First Duet 2, then SKR 1.4 and now Duet 3 Mini.
I also recall it working with RRF3.2.2 but can’t say for sure as I’m always fine tuning the macros for reliability. So there might be something new that causes the issue.
I‘m switching myself to „debugging“ tomorrow and enable the macros step by step.
First I’m just using the sensor only as filament runout and see what happens when it pauses. When it’s not resuming automatically after the triggered pause, I’ll enable auto unload and so on to circle it down. I‘ll report back then
So I did some testing today and honestly the results made no sense to me.
In pause.g I commented out:
if sensors.filamentMonitors.status == "noFilament" M98 P"0:/macros/2.1 Unload Filament"
Pause does work then and does not resume automatically.
After the message "extruder 0 reported no filament" I then manually started my "2.1 Unload Filament" macro to unload filament and the printer still does not resume automatically.
So I can rule out that something in my "2.1 Unload Filament" macro causes a print to resume.
I could try to do a workaround now by putting something like this in daemon.g:
if state.status == "paused" && #sensors.filamentMonitors>0 && sensors.filamentMonitors.status == "noFilament" M98 P"0:/macros/2.1 Unload Filament"
Edit: yep, the idea generally works with daemon.g.
It looks like pause.g does not like having external macros otherwise the printer just resumes without knowing.
Did you ever try your original setup with the M291 lines commented out?
I have a feeling that the internal handling of the M291 and pause may be getting mixed up. But I could be wrong, haven't looked at the code, just something I seem to remember from another thread.
Just tested it and you're right.
Without M291 it does work.
I've recently built a new printer (Voron 2.4) and forgot that this problem exists.
Result with RRF 3.3 b3 was that the conditional gcode in pause.g caused the printer (after the filament sensor triggered) to be in a state where it was still in pause but tried to continue the print without filament.
Only emergency stop does end the print then. BUT what was new this time: config.g and config.g.bak were deleted from the SD card. Because the printer was still in a setup phase I stupidly had no backup which I usually only do until it's a stable working config. Lesson learned....
I then recovered the deleted files with a FAT32 recovery tool
So in order to reproduce it (with RRF 3.3b3):
; pause.g ; called when a print from SD card is paused ; M83 ; relative extruder moves if sensors.gpIn.value == 1 G1 E-3 F3000 ; retract 3mm of filament G91 ; Relative Positioning G1 Z10 F360; Raise Z G90 ; Absolute Values G1 X10 Y0 F6000 ; Parking Position M300 S80 P8000 ; play beep sound if sensors.gpIn.value == 0 M98 P"0:/macros/Unload Filament"
The conditional gcode at the end is enough to automatically resume the print. I do not think that this is a expected behaviour?
My work around for this at the moment is to use daemon.g:
if state.status == "paused" && #sensors.filamentMonitors>0 && sensors.filamentMonitors.status == "noFilament" M98 P"0:/macros/Unload Filament"
@argo does your Unload Filament macro use M291 to display a message and wait for a response?
EDIT: yes it does, you posted it earlier. As far as I am aware, it is only M291 that causes this behaviour.
@argo please try the new 3.3RC2+3 binary at https://www.dropbox.com/sh/duc057ejldxhl48/AADiuF-oiz9EmkFX6HCeodxTa?dl=0.
Thanks, I can confirm the bug is not present anymore.
Used conditional gcode and also M291 in my paus.g file. The printer stays in pause as it's expected.
@argo thanks for confirming this.