Issues with macros halting the printer.
-
This issue is happening with filament and other macros as well.
I have a nice Z-probe calibrating macro but if I execute it right after resetting the Duet it works. If I execute it again or after other macros execution it just set the printer as "busy" and does nothing at all.
If I execute it line by line it works fine and without issues.
To try to find the culprit I chopped the macro into several short macros... But the issue is happening right at the first test!!
The test Macro is as follows:
M291 P"Please wait while the bed is being heated up" R"Please Wait" S0 T0 ; Display message
M140 S60 ; Set bed temp to 60
G32 ; Home all axis
M116 ; Wait for heating
M292 Close message
M291 P"Please wait while the bed is being heated up" R"Please Wait" S3 T0 ; Display message
M98 P/MACROS/SUBMACROS/BEEP.GNow... If I execute this simple macro right after resetting the board then it works flawlessly... But If I execute it right after that it just set the printer as Busy and does nothing at all. I do not heat the bed or show any messages.
I am having this issue with my filament macros, any macro that uses M292 to show any messages. Not sure when it starts having issues but the latest two RC firmware has the same issue for sure.
Thank you.
-
ok... Pinned down the issue when using M291 with the parameter S0 - If I do not use S0 (using S1 instead) then the issues of halting the printer without doing anything does not happen.
Nope... happened again even with all S0s as S1s
-
Can you post your homeall as well? Would help to see what is happening when you call g28
-
Please tell us which firmware version you are using, and try 2.02RC4 if you are using an older version.
-
@dc42 I have this issue at least since 2.02RC3 at least (not sure about earlier betas). Currently with RC4.
-
Please provide the contents of beep.g too, and I will try those macros out on my printers.
-
@phaedrux said in Issues with macros halting the printer.:
Can you post your homeall as well? Would help to see what is happening when you call g28
1_1542801481154_homeall.g 0_1542801481139_config.g
; homeall.g ; called to home all axes ; ; Home XY for Z homing ; G91 ; relative positioning G1 Z10 F200 S2 ; lift head relative to current position M400 ; make sure everything has stopped before we make changes M913 X50 Y50 ; set X Y motors to 50% of their normal current for homing M98 P"0:/sys/m_set_low_speeds.g" ; set lower Z speeds and accelerations ; Home XY for Z homing ; ;==============Home X==================== ; G1 S1 X-305 Y-335 F4800 ; move quickly diagonally to hit X or Y M400 G1 X10 Y10 F1000 ; go back a few mm G1 S1 X-305 F4800 ; move quickly to X axis G1 X10 F1000 ; go back a few mm ;==============Home Y==================== ; M400 G1 S1 Y-335 F4800 ; move quickly to X axis endstop and stop there (first pass) G1 Y10 F1000 ; go back a few mm ;==============Home Z==================== ; M400 G90 ; absolute positioning M98 P"0:/macros/Center_Probe"; move to center of bed ; Probe the bed ; M558 A1 F350 ; Set single probing at faster feed rate G30 ; Do a single probe to home our Z axis M558 A10 F100 ; Set tripple probing at slower feed rate G30 ; Probe again to get a more accurate position M400 ; make sure everything has stopped before we make changes M98 P"0:/sys/m_set_normal_speeds.g" ; set normal Z speeds and accelerations M913 X100 Y100 ; set X Y motors to 100% of their normal current
-
Just now. Turned on the printer. Did a G32 command (bed.g attached) and clicked at the Z Probe calibration macro (below). And.... Busy doing nothing.....
Just to reinforce: This "busy halt" does not occur if I execute the macro line by line at the console.
Here is the macro:
M291 P"Grid bed compensation map and ZProbe trigger height will be cleared. Ok or Cancel?" R"WARNING" S3 ; User must click OK or cancel. M561 ; Disable any current bed compensation G29 S2 ; Clear mesh bed compensation perameters M291 P"Please wait while the bed and tool is being heated up" R"Please Wait" S1 T0 ; Display message M140 S60 ; Set bed temp to 60 and release G32 ; Home all axis M116 ; Wait for bed heating M104 S210 ; Set nozzle to 210 and release M116 ; Wait for all to heat M292 M98 P"0:/macros/Center_Nozzle"; move to center of bed M291 P"Nozzle will now move to center of bed to reset Z0 and calibrate probe" S2 G31 Z0 ; Reset zprobe trigger height G92 Z25 ; Reset z to 25 to allow jogging up to touch bed to nozzle M98 P"0:/sys/m_set_low_speeds.g" ; set lower Z speeds and accelerations M98 P/MACROS/SUBMACROS/BEEP.G M291 P"Jog the Z Axis until the bed and nozzle are touching and click OK" R"Setting Z=0" Z1 S2 G92 Z0 ; Set z = 0 M291 P"Probe will now measure trigger height 10 times" R"ZProbe Trigger Height Calibration" S2 M98 P"0:/macros/Center_Probe" ;0 move to center of bed G1 Z10 F4000 ; Move probe to center and drop bed for nozzle clearance M401 G30 P0 X189 Y140 Z-9999 G30 P1 X189 Y140 Z-9999 G30 P2 X189 Y140 Z-9999 G30 P3 X189 Y140 Z-9999 G30 P4 X189 Y140 Z-9999 G30 P5 X189 Y140 Z-9999 G30 P6 X189 Y140 Z-9999 G30 P7 X189 Y140 Z-9999 G30 P8 X189 Y140 Z-9999 G30 P9 X189 Y140 Z-9999 S-1 M402 M104 S0 ; Set nozzle to 0 and release M140 S0 ; Set bed to 0 and release M400 M98 P"0:/sys/m_set_normal_speeds.g" ; set normal Z speeds and accelerations M291 P"Probing complete. Turning off heaters and homing axis." S1 M98 P/MACROS/SUBMACROS/BEEP.G
Here is bed.g
; bed.g ; called to perform automatic bed compensation via G32 M671 X-48:326 Y140:140 ; Define positions of lead screws again M561 ; clear any bed transform G28 ; home all axes ; Probe the bed at 2 points M401 G30 P0 X22 Y140 H0 Z-99999 G30 P1 X314 Y140 H0 S2 Z-99999 G28 Z M402
-
Just a reminder that I asked yesterday for your beep.g macro too.
-
@dc42 Here it is!
By the way... I cannot play any "tunes" without adding these timers between each M300. At least with the PanelDue attached.
M300 S2000 P300 G4 P300 M300 S2000 P300 G4 P300 M300 S2000 P300
-
@brunofporto said in Issues with macros halting the printer.:
@dc42 Here it is!
By the way... I cannot play any "tunes" without adding these timers between each M300. At least with the PanelDue attached.
PanelDue has no flow control, deliberately to avoid holding up the Duet. But I could implement a short queue of beeps pending in the PanelDue firmware.
-
@brunofporto said in Issues with macros halting the printer.:
M291 P"Please wait while the bed is being heated up" R"Please Wait" S0 T0 ; Display message
M140 S60 ; Set bed temp to 60
G32 ; Home all axis
M116 ; Wait for heating
M292 Close message
M291 P"Please wait while the bed is being heated up" R"Please Wait" S3 T0 ; Display message
M98 P/MACROS/SUBMACROS/BEEP.GI'm sorry, I can't reproduce the problem using either your test macro or the full macro (I had to make up the contents of 4 more macros thai it called).
By the way, your test macro is missing a semicolon before the comment "Close message" on the M292 line.
How reproducible is the problem?
My best guess as to why it is hanging is that when you cancel the M291 message box, the M292 command to tell the Duet that it has been cancelled is not being received and/or processed. So I have two suggestions:
-
Connect a PC running YAT or Pronterface etc. and send M111 S1 P3 to enable GCodes debugging. Then you will be able to see whether the M292 command is received.
-
Next time it appears to be stuck, try sending M292 and see whether that un-freezes it.
-
-
Just happened again...
Freshly started board.
G32
Sent the macro from the 22/11/2018 message above. Appeared the messages informing that the bed and hotend would be heated. Clicked ok and.... halted.
-
So did you try my suggestions?
-
The complete sequence and used files:
Sent G32 and waited for it to finish:
Executed the Macro:
Clicked ok and then.... halted doing nothing:
Attached bed.g, calibration macro and all sub macros related.
Thanks.
6_1543257949998_bed.g 5_1543257949998_4_Calibrate_ZProbe.g 4_1543257949998_beep.g 3_1543257949998_Center_Nozzle.g 2_1543257949998_Center_Probe.g 1_1543257949998_m_set_low_speeds.g 0_1543257949998_m_set_normal_speeds.g
-
@dc42 I'll..... But the printer is far from a computer and heavy...... As soon as I am able to move it and connect an USB directly I'll try
-
@dc42 Please, in order to avoid moving it unnecessarily, is it possible to monitor via telnet or something?
-
@brunofporto said in Issues with macros halting the printer.:
@dc42 Please, in order to avoid moving it unnecessarily, is it possible to monitor via telnet or something?
Yes, use the M586 command to enable Telnet.
-
@dc42 said in Issues with macros halting the printer.:
Next time it appears to be stuck, try sending M292 and see whether that un-freezes it
ok.... It receives the M292 command, confirms it, but the printer still busy doing nothing
m111 s1 p3
Debugging enabled for modules: GCodes(3)
Debugging disabled for modules: Platform(0) Network(1) Webserver(2) Move(4) Heat(5) DDA(6) Roland(7) Scanner(8) PrintMonitor(9) Storage(10) PortControl(11) DuetExpansion(12) FilamentSensors(13) WiFi(14) Display(15)
ok
m292
ok
m292
ok -
Can you send M122 and get a report?