Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Save Z position when shutting down

    Gcode meta commands
    2
    4
    44
    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.
    • Lem
      Lem last edited by

      Hi!

      I have a little bit strange construction of Z axis where I have to move up/down extruder for Z homing. Because of this I want to save Z position when printer shutting down and load it after turned on.

      I tried with M911 command but it doesn't work when the printer doesn't have a job. I add macro to executed command in M911 but it works only for shutting down while printing too. Is any other way to do it?

      Greetings!

      infiniteloop 1 Reply Last reply Reply Quote 0
      • infiniteloop
        infiniteloop @Lem last edited by

        @lem said in Save Z position when shutting down:

        Is any other way to do it?

        Sure. Before shut-down, get to know the position from the object model, then, use echo as described here to write a macro onto the SD card (just a one-liner with G92, followed by X/Y/Z …) which you call when you restart your printer.

        If you need more specific advice after you have studied the links: ask.

        Lem 1 Reply Last reply Reply Quote 0
        • Lem
          Lem @infiniteloop last edited by Lem

          @infiniteloop Thans for reply. But I don't now one thing - which macro / file / command is executed while shutting down? I can't find this in built-in macros (start.g, pause.g, sleep.g, etc.)

          infiniteloop 1 Reply Last reply Reply Quote 0
          • infiniteloop
            infiniteloop @Lem last edited by infiniteloop

            @lem said in Save Z position when shutting down:

            which macro / file / command is executed while shutting down?

            Usually none. My printer has a separate PSU for the Duet, so that I can shut-off power for steppers and heaters with M81, but I can as well turn the mains switch or pull the plug.

            Either you save the positions in all situations you can think of - end.g, pause, resume, abort, M911 … but you won't catch all possible events. Or you always invoke a macro before you plan to shut the printer off.

            A better way is to use some "auxiliary end switch" for Z so you have a known height before doing the "real" homing - this can be anywhere along the Z axis.

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