Handling powerloss while G4 in a macro, during a print
-
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 -
-
@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.
-
@chrishamm Thank you very much I'll stick with the G4 in the macro then. Will report if the event occurs