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

Save Z position when shutting down

Scheduled Pinned Locked Moved
Gcode meta commands
2
4
253
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.
  • undefined
    Lem
    last edited by 23 Jun 2022, 10:53

    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!

    undefined 1 Reply Last reply 23 Jun 2022, 11:32 Reply Quote 0
    • undefined
      infiniteloop @Lem
      last edited by 23 Jun 2022, 11:32

      @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.

      undefined 1 Reply Last reply 23 Jun 2022, 11:42 Reply Quote 0
      • undefined
        Lem @infiniteloop
        last edited by Lem 23 Jun 2022, 11:42

        @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.)

        undefined 1 Reply Last reply 23 Jun 2022, 12:42 Reply Quote 0
        • undefined
          infiniteloop @Lem
          last edited by infiniteloop 23 Jun 2022, 12:42

          @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
          2 out of 4
          • First post
            2/4
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA