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

    Stopping all nested macros.

    Scheduled Pinned Locked Moved
    Gcode meta commands
    3
    5
    260
    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.
    • mikeabuilderundefined
      mikeabuilder
      last edited by

      I'm having an occasional issue with my tool changing macros where one of my axes is out of limit when I return from parking a tool and think I'm back in bounds. (I suspect U, the axis used for tool lock and unlock) This has caused some very quick grasping at the power switch to prevent two physical objects from trying to occupy the same physical space at the same time.

      So I'm going to write a macro that I run after I believe I've returned withing limits and just before I issue an M564 S1 command. This macro will compare the current position of all axes to their limits and if any are outside limits, it will take action.

      My question to the forum is what is the appropriate action. My goal is to stop execution while the operator (me) figures out what's happening. My current options:

      • M0, but I don't want to run stop.g or cancel.g (or set a new global variable for them to stop themselves)
      • M1, but the same as M0, except for not wanting to run sleep.g
      • M2 - same as M0
      • M25, but I don't want to run pause.g
      • G4 S9999 - this should give me time to assess things but seems like a crude method and not acceptable for unattended operation. It's my current best plan.
      • setting a global variable that will be looked at by parent macros and trigger them to execute an M99 of their own

      Is there a smarter way to do this?

      1 Reply Last reply Reply Quote 0
      • oliofundefined
        oliof
        last edited by

        M291 prompting the operator to confirm things are like they are supposed to be?

        <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

        1 Reply Last reply Reply Quote 0
        • mikeabuilderundefined
          mikeabuilder
          last edited by

          @oliof - excellent suggestion because it addresses the unattended operation concern. I can have two buttons. One is to resume, the other would be to cancel... but what do do on that cancel message?

          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
          • jay_s_ukundefined
            jay_s_uk @mikeabuilder
            last edited by

            @mikeabuilder "abort"?

            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

            1 Reply Last reply Reply Quote 0
            • mikeabuilderundefined
              mikeabuilder
              last edited by

              Just when I think I know the meta commands...

              abort <opt-expression>

              This causes all nested macros and the current print file (if any) to be terminated.

              RTFM. Thanks @jay_s_uk

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