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

    abort command unintentionally generating a silent abort

    Scheduled Pinned Locked Moved Solved
    Gcode meta commands
    3
    3
    189
    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.
    • oc_geekundefined
      oc_geek
      last edited by oc_geek

      Hi,
      would like to report a very strange behavior i stepped into
      which i couldn't explain and i believe to be a bug

      Case is this:
      A macroA is calling macroB which has a condition in the end of the file with an abort command if condition is notmet.
      The abort command is last line in the macroB.g file (in an if / else construct)

      Even in case the condition IS met a silent abort is triggered and any further g commands in macroA are not executed (aka an actual abort has been issued)

      The macroB is like this

      ( bla bla bla Gcode)
      if <condition>
         echo "Probe is attached to the tool"
      else
         echo "Error probe not attached - aborting"
         abort
      

      Now even if the condition IS MET (proved by the echo in console) the calling MacroA stops executiing any further g commands (following the call of MacroB) like an abort was executed by MacroB (without reporting anything - i call it silent abort).

      I turned my head 100 directions to figure out WTF was going on in the calling MacroA

      I solved it by putting an additional line in the MacroB at the end like this

      ( bla bla bla Gcode)
      if <condition>
         echo "Probe is attached to the tool"
      else
         echo "Error probe not attached - aborting"
         abort
      ; finish
      

      and now it behaves as expected an no "silent abort" is issued

      Looks like "abort" line at the end of a .g file does weird things

      P.S. This is with FW Rel 3.3

      @dc42

      o_lampeundefined gloomyandyundefined 2 Replies Last reply Reply Quote 0
      • o_lampeundefined
        o_lampe @oc_geek
        last edited by

        @oc_geek
        maybe there was no CR/LF behind 'abort' before?

        1 Reply Last reply Reply Quote 0
        • gloomyandyundefined
          gloomyandy @oc_geek
          last edited by

          @oc_geek Standalone or SBC? The macro handling for the two can be slightly different.

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