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

    Handling powerloss while G4 in a macro, during a print

    Scheduled Pinned Locked Moved Unsolved
    Gcode meta commands
    2
    3
    147
    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.
    • modlundefined
      modl
      last edited by

      Hi everyone,

      I have a question : for my specific porject, I have a macro on every layer change that calculates a dwell timing for the print to take a specific time to complete. I was thinking of a scenario: what happens if the printer is shut down (either accidentally or intentionaly) during the G4 command executed from a macro, called from the print ? Will the frimware be able to generate a proper resurrect.g with the correct parameters ?

      If no: I was thinking of three things to mitigate this:
      -add a dwell right after the macro call in the print file. Tricky, I have a file currently being printed that will go on for one year, i.e. I can't modifiy the original file. Do we have a way to "dynamically" add gcode to the file being printed ?
      -call the dwell from deamon.g using a global, we would be out of a macro, would that pause the print ? Or just the deamon? (can't test right now, printer has been shut off and I won't be able to run such tests confortably as i'll be handling it remotely)
      -call M27 and M114 from the macro so I can make a custom reusrrect.g . Will their output get written in the eventlog ? If not can I write the output to a file ?

      Thank you all in advance
      Best

      chrishammundefined 1 Reply Last reply Reply Quote 0
      • Phaedruxundefined Phaedrux marked this topic as a question
      • chrishammundefined
        chrishamm administrators @modl
        last edited by

        @modl Yes, that should be always possible. RRF has a dedicate G-code channel to deal with actions to be performed on power loss. If you are operating your board in SBC mode, it may also be necessary to power both the Duet and the SBC from a relatively beefy 5V PSU to keep both devices powered long enough to write resurrect.g.

        Duet software engineer

        modlundefined 1 Reply Last reply Reply Quote 1
        • modlundefined
          modl @chrishamm
          last edited by

          @chrishamm Thank you very much I'll stick with the G4 in the macro then. Will report if the event occurs

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA