resurrect.g hangs at "T-1 P0" or "T0 P6"
-
Hi,
Thankfully new to the wonderful world of resurrecting prints! had a thermal excursion 98% into a 12 hour print, and was frantically trying to learn how to resurrect while the printer was waiting.
I created a resurrect-prologue.g, as instructed, and issued a M916, but the script seemed to halt.
Using M291, I was able to find that "the issue" was line 12
T-1 P0
Commenting it out allowed me to resume and the print finished successfully before I left for work!
Quick celebration of the robust and well designed resurrection logic in RRF!
Was hoping to learn what is configured incorrectly in my setup that causes it to hang at that line.
I read the T-commands section of the G-Code dictionary a few times, but I still don't understand what could be causing the issue.
Thanks for trying to help!
Versions:
Board: Duet 2 WiFi (2WiFi) Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.3 (2021-06-15)
Config.G
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.1.4 on Sun Jul 19 2020 22:30:32 ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Goliath" ; set printer name M665 R172.66 L511.07 B150 H329.8 ; Set delta radius, diagonal rod length, printable radius and homed height M666 X0 Y0 Z0 ; put your endstop adjustments here, or let auto calibration find them ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S0 ; physical drive 0 goes backwards M569 P1 S1 ; physical drive 1 goes forwards M569 P2 S0 ; physical drive 2 goes backwards M569 P3 S1 ; physical drive 3 goes forwards M584 X0 Y1 Z2 E3 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X100.00 Y100.00 Z100.00 E137.82 ; set steps per mm (E is 430 for bondtech, 137.82 for creality) M566 X600.00 Y600.00 Z600.00 E1200.00 ; set maximum instantaneous speed changes (mm/min) (was [x,y,z]=1200) M203 X9000.00 Y9000.00 Z9000.00 E6000.00 ; set maximum speeds (mm/min) (was [x,y,z]=18000) Extruder changer to 6000 from 1200 M201 X500.00 Y500.00 Z500.00 E1000.00 ; set accelerations (mm/s^2) (was [x,y,z]=1000) M906 X1000 Y1000 Z1000 E1500 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 Z0 S1 ; set minimum Z ; Endstops M574 X2 S1 P"!xstop" ; configure active-high endstop for high end on X via pin !xstop M574 Y2 S1 P"!ystop" ; configure active-high endstop for high end on Y via pin !ystop M574 Z2 S1 P"!zstop" ; configure active-high endstop for high end on Z via pin !zstop ; Z-Probe ; Original command before 2021-10-23 was "M558 P5 C"!zprobe.in" H3 F500 T6000 ;A3 S0.01" ; ! because Z-strain-probe is inverted (Documentation says NC switches are best practice, I took the advice even though this isn't a switch per se). ; Reduced F500 to F50 for testing ; Changed G31 from "G31 P500 X30.31 Y17.5 Z2.2" to "G31 P500 X0.0 Y0.0 Z0.0" ; P5 (filtered digital) or P8 (unfiltered digital) ; ^ enables pull up resistor on input M558 P8 C"!zprobe.in" H5 F500 T6000 R1 ;A5 S0.01 ; set Z probe type to switch and the dive height + speeds (was 120mm/sec) G31 P500 X0.0 Y0.0 Z-0.3 ; set Z probe trigger value, offset and trigger height [Nozzle lifts when triggered, and pushes bed down slightly. total offset estimated ~0.2mm, changed to 0.3mm in order to reduce bed adhesion] M557 R160 S50 ;Set probing radius to 160mm with a probe spacing of 50mm ; Heaters M308 S0 P"bedtemp" Y"thermistor" A"Bed" T100000 B4725 C7.060000e-8 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S135 ; set temperature limit for heater 0 to 135C M308 S1 P"e0temp" Y"thermistor" A"Extruder" T100000 B4725 C7.060000e-8 ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S300 ; set temperature limit for heater 1 to 300C M308 S2 P"e1temp" Y"thermistor" A"Chamber" T100000 B4725 C7.060000e-8 ; configure sensor 2 as thermistor on pin e1temp (chamber thermistor) ; Fans M950 F0 C"fan0" Q100 ; create fan 0 on pin fan0 and set its frequency M106 P0 X1 H1 T45 ; set fan Thermostatic control is turned on based on heater1 (H1) temperature probe ; Tools M563 P0 S"Extruder0" 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 ; Lighting M950 P0 C"e1heat" ; create output port 0 attached to heater 1\ M42 P0 S0.1 ; Turn on Case light 10% ;Tool Selection T0 ; Load Custom settings M501 ;Setup power failure procedure M911 S21.0 R23.0 P"G91 M83 G1 Z3 E-5 F1000" ;Set relative movement mode (G91) ;Set relative extrusion mode (M83) ;Simultaneously lift the head and retract filament (G1 Z3 E-5 F1000)
Resurrect.g (I generated this now artifically, didn't save the original, but confirmed behavior persists)
; File "0:/gcodes/HandleSet.gcode" resume print after power failure at 2022-01-30 20:59 G21 M140 P0 S110.0 T-1 P0 G92 X0.000 Y-150.000 Z10.000 G60 S1 G10 P0 S250 R170 T0 P0 M98 P"resurrect-prologue.g" M116 M290 X0.000 Y0.000 Z0.000 R0 T-1 P0 T0 P6 ; Workplace coordinates G10 L2 P1 X0.00 Y0.00 Z0.00 G10 L2 P2 X0.00 Y0.00 Z0.00 G10 L2 P3 X0.00 Y0.00 Z0.00 G10 L2 P4 X0.00 Y0.00 Z0.00 G10 L2 P5 X0.00 Y0.00 Z0.00 G10 L2 P6 X0.00 Y0.00 Z0.00 G10 L2 P7 X0.00 Y0.00 Z0.00 G10 L2 P8 X0.00 Y0.00 Z0.00 G10 L2 P9 X0.00 Y0.00 Z0.00 G54 M106 S0.00 M116 G92 E0.00000 M83 M486 S-1G17 M23 "0:/gcodes/HandleSet.gcode" M26 S684 G0 F6000 Z12.000 G0 F6000 X0.000 Y-150.000 G0 F6000 Z10.000 G1 F5000.0 P0 G21 M24
Resurrect-prologue.g
; copied from homedelta.g ; called to home all towers on a delta printer ; ; generated by RepRapFirmware Configuration Tool v3.1.4 on Sun Jul 19 2020 22:30:32 GMT+0300 (Israel Daylight Time) ;M42 P0 S0.0 ; Turn off Case light G91 ; relative positioning G1 H1 X9999 Y9999 Z9999 F3600 ; move all towers to the high end stopping at the endstops (first pass) ;M42 P0 S0.1 ; Turn on Case light 10% G1 H2 X-5 Y-5 Z-5 F1800 ; go down a few mm ;M42 P0 S0.0 ; Turn off Case light G1 H1 X10 Y10 Z10 F360 ; move all towers up once more (second pass) ;G1 Z-10 F6000 ; move down a few mm so that the nozzle can be centered G90 ; absolute positioning ;G1 X0 Y0 F6000 ; move X+Y to the center M116 ;wait for all heaters to reach temp M83 ; relative extrusion G1 E5 F3600 ; undo the retraction that was done in the M911 power fail script M291 P"Prologue Done"
tfree0.g
; tfree0.g ; called when tool 0 is freed ; ; generated by RepRapFirmware Configuration Tool v3.1.4 on Sun Jul 19 2020 22:30:32
tpre0.g
; tpre0.g ; called before tool 0 is selected ; ; generated by RepRapFirmware Configuration Tool v3.1.4 on Sun Jul 19 2020 22:30:32
tpost0.g
; tpost0.g ; called after tool 0 has been selected ; ; generated by RepRapFirmware Configuration Tool v3.1.4 on Sun Jul 19 2020 22:30:32 ; Wait for set temperatures to be reached M116 P0
-
@leav
T-1 P0
deactivates all tools (you have just one). That shouldn't do any harm. The identical gcode appears already in line #4 of your resurrect.g, and there it worked flawlessly, as you say. So I doubt that's the culprit.Maybe you can try some other modifications:
1. comment-out the lines 18 and 19 in your resurrect-prologue.g, these commands are taken care of in resurrect.g itself
2. comment-out line 6 in tpost0.g; in that place, you will not need to wait for the one and only hotend to reach temperaturesIt's just an assumption, but possibly, this will prevent the process from waiting forever and a second.
EDIT
My resurrect.g looks a bit different - I'm running v3.4b7. Maybe @Phaedrux can clarify if there have been any changes to the generated code? -
@infiniteloop said in resurrect.g hangs at "T-1 P0" or "T0 P6":
- comment-out line 6 in tpost0.g; in that place, you will not need to wait for the one and only hotend to reach temperatures
Yup, that seems to solve it. I wonder if two or three successive M116 commands are problematic?
- There's one
M116;
inresurrect-prologue.g
(which I need to counteract the retraction) - another
M116;
inresurrect.g
(which I can't control) - and another
M116 P0
in thetpost0.g
called by theT0 P6;
command (now commented out)
By the way, when issuing M916 on a freshly booted machine, this message appears immediately, but the procedure starts fine:
-
Added lots of echos to track the issue down, and It now happens even with the
M116
intpost0.g
commented out.Looks like it's hanging on
T0 P6
, actually. (never echos 13), but it looks liketpost0.g
does terminate??I'm at a loss... something in my configuration causing
T0 P6;
to never exit?
resurrect.g: Reference lines
; File "0:/gcodes/HandleSet.gcode" resume print after print paused at 2022-01-31 07:00; G21; 1 echo 1 M140 P0 S110.0; 2 echo 2 G29 S1; 3 echo 3 T-1 P0; 4 echo 4 G92 X49.998 Y150.001 Z4.700; 5 echo 5 G60 S1; 6 echo 6 G10 P0 S250 R170; 7 echo 7 T0 P0; 8 echo 8 M98 P"resurrect-prologue.g"; 9 echo 9 M116; 10 echo 10 M290 X0.000 Y0.000 Z0.000 R0; 11 echo 11 T-1 P0; 12 echo 12 T0 P6; 13 echo 13 ; Workplace coordinates; 14 echo 14 G10 L2 P1 X0.00 Y0.00 Z0.00; 15 echo 15 G10 L2 P2 X0.00 Y0.00 Z0.00; 16 echo 16 G10 L2 P3 X0.00 Y0.00 Z0.00; 17 echo 17 G10 L2 P4 X0.00 Y0.00 Z0.00; 18 echo 18 G10 L2 P5 X0.00 Y0.00 Z0.00; 19 echo 19 G10 L2 P6 X0.00 Y0.00 Z0.00; 20 echo 20 G10 L2 P7 X0.00 Y0.00 Z0.00; 21 echo 21 G10 L2 P8 X0.00 Y0.00 Z0.00; 22 echo 22 G10 L2 P9 X0.00 Y0.00 Z0.00; 23 echo 23 G54; 24 echo 24 M106 S0.00; 25 echo 25 M116; 26 echo 26 G92 E0.00000; 27 echo 27 M83; 28 echo 28 M486 S-1G17; 29 echo 29 M23 "0:/gcodes/HandleSet.gcode"; 30 echo 30 M26 S782; 31 echo 31 G0 F6000 Z6.700; 32 echo 32 G0 F6000 X49.998 Y150.001; 33 echo 33 G0 F6000 Z4.700; 34 echo 34 G1 F5000.0 P0; 35 echo 35 G21; 36 echo 36 M24; 37 echo 37
-
@leav said in resurrect.g hangs at "T-1 P0" or "T0 P6":
Yup, that seems to solve it.
Does it, or does it not?
Added lots of echos to track the issue down, and It now happens even with the M116 in tpost0.g commented out.
To reduce complexity, you should ignore the tfree…, tpre… and tpost… macros. These should only contain comments, so that they do exactly nothing. You can even delete them, as you have just a single tool. With respect to tools, your printer only knows two states: tool selected, or tool not selected. By the way, that's what you see in your temperature chart: the bump in the curve of the extruder results from a deselected tool.
resurrect.g fiddles around with tool-commands to cover multi-tool configurations; in your case, some of them are useless - but they should do no harm, either. Well… combined with a
M116
in the wrong place …Imagine this situation: you wait for all temperatures to be in range, but no tool is selected - the hot-end doesn't heat-up,
M116
will wait forever. That's why tpost0.g should not call M116.To learn what's going on in resurrect.g, you should make a copy of that file, then look up each gcode in it (using this link) and comment what it does. That's better than to add code to the macro which might interfere with its intended operation.
-
Here's a copy of a resurrect.g I had on my printer:
; File "0:/gcodes/Basket-84V-Alu.gcode" resume print after print paused at 2022-01-22 13:39 G21 M140 P0 S80.0 M141 P0 S0.0 G29 S1 G92 X-46.694 Y42.614 Z25.100 G60 S1 G10 P1 S-273 R-273 G10 P0 S240 R240 T0 P0 M98 P"resurrect-prologue.g" M116 M290 X0.000 Y0.000 Z0.100 R0 T-1 P0 T0 P6 ; Workplace coordinates G10 L2 P1 X0.00 Y0.00 Z0.00 G10 L2 P2 X0.00 Y0.00 Z0.00 G10 L2 P3 X0.00 Y0.00 Z0.00 G10 L2 P4 X0.00 Y0.00 Z0.00 G10 L2 P5 X0.00 Y0.00 Z0.00 G10 L2 P6 X0.00 Y0.00 Z0.00 G10 L2 P7 X0.00 Y0.00 Z0.00 G10 L2 P8 X0.00 Y0.00 Z0.00 G10 L2 P9 X0.00 Y0.00 Z0.00 G54 M106 S0.10 M106 P0 S0.10 M106 P1 S0.00 M116 G92 E0.00000 M83 M486 S0 A"Basket-84V-Alu.stl" M486 S0 G17 M23 "0:/gcodes/Basket-84V-Alu.gcode" M26 S12060304 G0 F6000 Z27.200 G0 F6000 X-36.694 Y42.614 G0 F6000 Z25.200 G1 F3000.0 P0 G21 M24
That worked for me without a flaw and saved my print. I am running v3.4b7, but at a first glance, I don't see a difference to your resurrect.g.
-
@infiniteloop said in resurrect.g hangs at "T-1 P0" or "T0 P6":
Does it, or does it not?
It did, once, but then the problem returned. must have been a fluke.
@infiniteloop said in resurrect.g hangs at "T-1 P0" or "T0 P6":
To reduce complexity, you should ignore the tfree…, tpre… and tpost… macros. These should only contain comments,
That is now the case, the issue persists.
I'm noticing that I have a few difference between our resurrect scripts (I have an extra
T-1 P0;
in line 4, for example). but nothing that would explain the behavior.I think there's a high likelihood that something in my configuration is causing T commands to get stuck for some reason, or (less likely) there might be some bug in RRF 3.3?
I'm at a loss, not sure what else to investigate or to check.... hopefully someone has a lead for me to pursue.
-
@leav said in resurrect.g hangs at "T-1 P0" or "T0 P6":
I have a few difference between our resurrect scripts (I have an extra T-1 P0; in line 4, for example).
Thank you for working through that. After a scan of the changelog I can confirm that the 3.4.b versions have modified especially this:
T-1 P0
shall no longer be called. I will not urge you to install a beta instead of a stable release, but it is safe to remove all of those lines (counted two of them) from your resurrect.g file.With the gcode
T0 P6
, it's a different thing. It selects tool 0 (which should be harmless) and executes the macros tpre0.g and tpost0.g (but not tfree0.g; which macro to call is encoded in the P6 parameter).So, if the issue persists after the removal of
T-1 P0
, you should put an "echo" into these macros as well - maybe that gives us a hint where the code gets stuck. -
Thanks for your help.
Removing the firstT-1 P0;
(line 5 below), did not solve the issue.
Removing the secondT-1 P0;
(line 13 below), did solve the issue (tried multiple times, seems to be reliably solved).(Tried all 4 combinations of commenting out the lines).
Not sure why a
T-1 P0;
(Line 13) immediately followed by aT0 P6;
(line 14) causes theT0 P6;
to not complete.
Reminder: It runs through the macros, and even finishes executingtpost0.g
, but never moves on to the next line.Since it seems that the logic behind resurrection has been tweaked in 3.4, I'll wait for that release and see what happens.
Thanks!
resurrect.g that worked:
; File "0:/gcodes/HandleSet.gcode" resume print after print paused at 2022-01-31 21:07 G21 M140 P0 S110.0 G29 S1 T-1 P0 G92 X3.384 Y-123.624 Z0.300 G60 S1 G10 P0 S250 R170 T0 P0 M98 P"resurrect-prologue.g" M116 M290 X0.000 Y0.000 Z0.000 R0 ;T-1 P0 T0 P6 ; Workplace coordinates .... Following lines truncated...