Macro causing Duet WiFi to lose connection occasionally

  • Installed my Duet WiFi on my cartesian machine, I have updated the firmware to 1.21 and I have things generally working.

    Now that I am back to where I am printing reliably, I am exploring macros as a way to make the machine a bit easier to use. The first macros I wrote were to preheat the bed to 70 C, preheat the nozzle to 130 C, then home the machine and do a detailed bed compensation cycle. I've attached the code:

    ; preheat nozzle and bed before mesh-leveling

    M140 S70 ; Set bed to 70 for PLA and PETG, 110 for ABS
    M109 T0 S130 ; Set hotend to 130 for all filaments
    M116 ; Wait for all temps to stabilize

    ; Mesh Bed Leveling

    G28 ;home
    G91 ;relative mode
    G1 Z10 F400 ;move Z up to ensure clearance
    G90 ;absolute mode
    G29 S2 ;delete existing map
    G29 ;probe bed
    G1 X0 Y0 F10000 ;go home

    When I run this macro and things are cold, after about 5 seconds, the PanelDue goes blank, then the DWC connection drops.
    If things are warm, this macro works fine.

    If the macro code is correct (and I am pretty sure that it is, because it runs some of the time and does what I expect it to), this suggests that I have a power supply problem. Interestingly, DWC does not report a low-voltage condition, the reported voltage is within 0.1V of what I measure with my multimeter. Is there a logfile I can dig into?

  • administrators

    There is a log file only if you enabled logging. See M929 in the GCode wiki page.

    After you reconnect, send M122 and look at the last reset time and reason, to see whether the Duet reset when you lost the connection, and if so why.

  • Thanks for the tips! I will enable logging and keep looking into this.

    Edit - 5 minutes later (and after a fair bit of troubleshooting last night)

    According to M122, the Duet is power-cycling when I see this happen. The event log is blank. Looks like this is a result of my power supply cutting out in an over-current situation.

    For anyone following along, my original macro heated both the hotend and the heated bed at the same time. This works fine when the bed is already over 50C, but when things are cold, the inrush current appears to push the power supply past its amperage limit and it briefly cuts out. If I heat up the bed first, then heat up the hotend, this problem is avoided.

Log in to reply