Reset Printer to defaults after a print

  • Greetings,
    I just got a second delta and this has complicated my tool string as it relates to G code. I would like to slice the code such that it could work for both the RepRap and Repitier printer, but slight things make it difficult for the End GCode in the slicer. I don't care if the gcode file messes with M83 vs M84, but at the end of printing I would like to find a way to restore the machine state to before it started.

    I would like to have a way for the printer to either stop reading the G-code with an IF statement at the end and run its own clean up. Or maybe let it run the file through but then at the end run a system G file similar to config override that sets the machine back into its normal state.

    Is there an M-code that I can't seem to find? Is there a way to run something after a print to set my units, relative vs. abs, etc... back to what was in my config.g file? Sorry if i just fail to google. I spent about 10 min searching and failed at finding anything. Maybe this is all handled in Octoprint like controllers that do this for you once you have multiple machines and handling start up and shut down for each is a pain.

  • administrators

    With RepRapFirmware you can end your prints with the M0 command, then use the stop.g file to perform machine-dependent cleanup actions. Or you can create your own macro file e.g. finish.g and then call it from your end GCode. But Repetier doesn't support either of these AFAIK.

    RepRapFirmware already restores the absolute/relative extrusion state at the end of an SD card print.

  • I think that a great way to do my if statement at the end. I can call my own macro end code for the Duet. The Repetier will not know what that means and march along the added end code that the slicer has just for it. In my Duet end macro I can call the M0 command so it just stops after what I wanted it to do and not finish the code for the Repetier that is in the gcode file.

    Also apparently I am trying to solve some problems that are not an issue on the Duet3D. 😅


    PS. The Duet3D has spoiled me for sure over a Ramps compatible Mega. Its going to be hard to go back.

Log in to reply