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

    Problems with macros

    Scheduled Pinned Locked Moved
    Gcode meta commands
    3
    5
    188
    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.
    • tylersuardundefined
      tylersuard
      last edited by

      Hello. I would like to write a macro that pauses my printer, homes the x and y axes, and then resumes.

      I have tried creating a macro that calls pause.g, homex.g and homey.g, and then resume.g, but I just got some really bizarre shaking behavior, not at all like running those files from the dashboard. I also just copied and pasted the gcode from those files into one macro and the behavior was just as strange. What am I doing wrong here?

      1 Reply Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by

        How were you calling those macros?
        What exactly are you trying to do?
        Do you really need to pause?
        Is this intended to be doing during a print?

        To call a pause you'd probably want to call M25, then G28 X, then G28 Y, then M24 to resume.

        https://docs.duet3d.com/User_manual/Reference/Gcodes#m25-pause-sd-print

        Z-Bot CoreXY Build | Thingiverse Profile

        tylersuardundefined 1 Reply Last reply Reply Quote 0
        • tylersuardundefined
          tylersuard @Phaedrux
          last edited by

          @Phaedrux Thank you for your reply! Sometimes my nozzle will rake across a particularly rough patch, and cause a layer skip. I can hear it when this happens, so I press pause, then I re-calibrate the x and y axes, then I resume, and no problem. I was trying to make a macro that can do all 3. I will try doing what you said, M25 then G28 X and Y, then M24.

          sinned6915undefined 1 Reply Last reply Reply Quote 0
          • sinned6915undefined
            sinned6915 @tylersuard
            last edited by

            @tylersuard said in Problems with macros:

            Sometimes my nozzle will rake across a particularly rough patch, and cause a layer skip.

            THAT would be the thing to spend time on. You should not be getting rough patches like that often enough to want to write a macro to work around it.

            An occasional ooze or blob is one thing, but as I read your post, if this happens often, let figure what is causing the condition and fix it.

            1 Reply Last reply Reply Quote 0
            • Phaedruxundefined
              Phaedrux Moderator
              last edited by

              Yes solving the rough spots would be the best way to go.

              If all you want to do is home the X and Y during a pause, simply add G28 XY to your pause.g macro.

              Z-Bot CoreXY Build | Thingiverse Profile

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