Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Issues with macros halting the printer.

    Scheduled Pinned Locked Moved Unsolved
    General Discussion
    3
    26
    2.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • brunofportoundefined
      brunofporto
      last edited by brunofporto

      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

      1 Reply Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by

        Can you post your homeall as well? Would help to see what is happening when you call g28

        Z-Bot CoreXY Build | Thingiverse Profile

        brunofportoundefined 1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators
          last edited by dc42

          Please tell us which firmware version you are using, and try 2.02RC4 if you are using an older version.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          brunofportoundefined 1 Reply Last reply Reply Quote 0
          • brunofportoundefined
            brunofporto @dc42
            last edited by

            @dc42 I have this issue at least since 2.02RC3 at least (not sure about earlier betas). Currently with RC4.

            1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators
              last edited by

              Please provide the contents of beep.g too, and I will try those macros out on my printers.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 0
              • brunofportoundefined
                brunofporto @Phaedrux
                last edited by brunofporto

                @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
                
                1 Reply Last reply Reply Quote 0
                • brunofportoundefined
                  brunofporto
                  last edited by brunofporto

                  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.

                  0_1542886918385_Captura de tela de 2018-11-22 09-39-55.png

                  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
                  
                  1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators
                    last edited by

                    Just a reminder that I asked yesterday for your beep.g macro too.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    brunofportoundefined 1 Reply Last reply Reply Quote 0
                    • brunofportoundefined
                      brunofporto @dc42
                      last edited by

                      @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
                      
                      dc42undefined 1 Reply Last reply Reply Quote 0
                      • dc42undefined
                        dc42 administrators @brunofporto
                        last edited by

                        @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.

                        Duet WiFi hardware designer and firmware engineer
                        Please do not ask me for Duet support via PM or email, use the forum
                        http://www.escher3d.com, https://miscsolutions.wordpress.com

                        1 Reply Last reply Reply Quote 1
                        • dc42undefined
                          dc42 administrators
                          last edited by

                          @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.G

                          I'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:

                          1. 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.

                          2. Next time it appears to be stuck, try sending M292 and see whether that un-freezes it.

                          Duet WiFi hardware designer and firmware engineer
                          Please do not ask me for Duet support via PM or email, use the forum
                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                          brunofportoundefined 1 Reply Last reply Reply Quote 1
                          • brunofportoundefined
                            brunofporto
                            last edited by

                            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.

                            0_1543257278437_Captura de tela de 2018-11-26 16-34-08.png

                            1 Reply Last reply Reply Quote 0
                            • dc42undefined
                              dc42 administrators
                              last edited by dc42

                              So did you try my suggestions?

                              Duet WiFi hardware designer and firmware engineer
                              Please do not ask me for Duet support via PM or email, use the forum
                              http://www.escher3d.com, https://miscsolutions.wordpress.com

                              brunofportoundefined 2 Replies Last reply Reply Quote 0
                              • brunofportoundefined
                                brunofporto
                                last edited by brunofporto

                                The complete sequence and used files:

                                Sent G32 and waited for it to finish:
                                0_1543257432205_Captura de tela de 2018-11-26 16-36-11.png

                                Executed the Macro:
                                0_1543257479935_Captura de tela de 2018-11-26 16-36-28.png

                                Clicked ok and then.... halted doing nothing:
                                0_1543257503037_Captura de tela de 2018-11-26 16-36-33.png

                                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

                                1 Reply Last reply Reply Quote 0
                                • brunofportoundefined
                                  brunofporto @dc42
                                  last edited by

                                  @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 😄

                                  1 Reply Last reply Reply Quote 0
                                  • brunofportoundefined
                                    brunofporto @dc42
                                    last edited by

                                    @dc42 Please, in order to avoid moving it unnecessarily, is it possible to monitor via telnet or something?

                                    dc42undefined 1 Reply Last reply Reply Quote 0
                                    • dc42undefined
                                      dc42 administrators @brunofporto
                                      last edited by

                                      @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.

                                      Duet WiFi hardware designer and firmware engineer
                                      Please do not ask me for Duet support via PM or email, use the forum
                                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                                      1 Reply Last reply Reply Quote 0
                                      • brunofportoundefined
                                        brunofporto @dc42
                                        last edited by

                                        @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

                                        1 Reply Last reply Reply Quote 0
                                        • dc42undefined
                                          dc42 administrators
                                          last edited by

                                          Can you send M122 and get a report?

                                          Duet WiFi hardware designer and firmware engineer
                                          Please do not ask me for Duet support via PM or email, use the forum
                                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                                          brunofportoundefined 1 Reply Last reply Reply Quote 0
                                          • brunofportoundefined
                                            brunofporto @dc42
                                            last edited by brunofporto

                                            @dc42 Sure! Did while "busy" doing nothing after reproducing the issue:

                                            M122
                                            === Diagnostics ===
                                            RepRapFirmware for Duet 2 WiFi/Ethernet version 2.02RC4(RTOS) running on Duet Ethernet 1.02 or later
                                            Board ID: 08DGM-956GU-DJMSN-6J9D4-3SJ6S-1BNHD
                                            Used output buffers: 1 of 20 (16 max)
                                            === RTOS ===
                                            Static ram: 27476
                                            Dynamic ram: 98660 of which 12 recycled
                                            Exception stack ram used: 496
                                            Never used ram: 4428
                                            Tasks: NETWORK(ready,328) HEAT(blocked,1232) MAIN(running,1660) IDLE(ready,200)
                                            Owned mutexes:
                                            === Platform ===
                                            Last reset 00:03:59 ago, cause: software
                                            Last software reset at 2018-11-26 17:26, reason: User, spinning module GCodes, available RAM 4436 bytes (slot 1)
                                            Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0441f000 BFAR 0xe000ed38 SP 0xffffffff Task 0x4e49414d
                                            Error status: 0
                                            Free file entries: 9
                                            SD card 0 detected, interface speed: 20.0MBytes/sec
                                            SD card longest block write time: 0.0ms, max retries 0
                                            MCU temperature: min 24.7, current 25.8, max 26.3
                                            Supply voltage: min 24.5, current 24.6, max 24.7, under voltage events: 0, over voltage events: 0, power good: yes
                                            Driver 0: standstill, SG min/max 0/250
                                            Driver 1: standstill, SG min/max 0/242
                                            Driver 2: standstill, SG min/max 0/162
                                            Driver 3: standstill, SG min/max not available
                                            Driver 4: standstill, SG min/max 0/177
                                            Date/time: 2018-11-26 17:30:11
                                            Cache data hit count 546791891
                                            Slowest loop: 51.83ms; fastest: 0.07ms
                                            I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0
                                            === Move ===
                                            Hiccups: 0, StepErrors: 0, LaErrors: 0, FreeDm: 240, MinFreeDm: 237, MaxWait: 95242ms, Underruns: 0, 0
                                            Scheduled moves: 35, completed moves: 36
                                            Bed compensation in use: none
                                            Bed probe heights: -0.024 -0.046 0.000 0.000 0.000
                                            === Heat ===
                                            Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1
                                            Heater 1 is on, I-accum = 0.0
                                            === GCodes ===
                                            Segments left: 0
                                            Stack records: 3 allocated, 1 in use
                                            Movement lock held by null
                                            http is doing "M291 P"Please wait while the bed and tool is being heated up" R"Please Wait" S1 T0 " in state(s) 0 0
                                            telnet is idle in state(s) 0
                                            file is idle in state(s) 0
                                            serial is idle in state(s) 0
                                            aux is idle in state(s) 0
                                            daemon is idle in state(s) 0
                                            queue is idle in state(s) 0
                                            autopause is idle in state(s) 0
                                            Code queue is empty.
                                            === Network ===
                                            Slowest loop: 51.30ms; fastest: 0.02ms
                                            Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(2) Telnet(0)
                                            HTTP sessions: 1 of 8
                                            Interface state 5, link 100Mbps full duplex
                                            === Filament sensors ===
                                            Extruder 0 sensor: position 8.22, ok, framing errors 0, parity errors 0, no calibration data
                                            
                                            dc42undefined 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA