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

How to automatically cancel job/routine when G29 fails?

Scheduled Pinned Locked Moved Solved
Gcode meta commands
2
4
248
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
    oozeBot
    last edited by oozeBot 28 Feb 2023, 15:08

    Background: Our printers only probe where needed for the active job.

    Issue: We just had a printer fail to complete the mesh bed probing (G29 S0) portion of our startup routine. When that happened, the error was logged to the console, but the job continued on as if nothing happened..

    Question: How can we programmatically verify G29 S0 completes successfully and, if not, immediately pause the job to warn the user?

    Firmware: RepRapFirmware for Duet 3 MB6HC 3.4.4

    undefined 1 Reply Last reply 28 Feb 2023, 19:50 Reply Quote 1
    • undefined
      OwenD @oozeBot
      last edited by 28 Feb 2023, 19:50

      @oozeBot
      You can check the result returned from each command
      https://docs.duet3d.com/User_manual/Reference/Gcode_meta_commands#named-constants

      In my mesh.g I use it to check the validity of the M557 values.
      I'm not 100% sure what it would return if a single point in a mesh failed

      e.g

      G30
      if result !=0
      abort "Error during probing - print cancelled"
      undefined 1 Reply Last reply 28 Feb 2023, 19:57 Reply Quote 1
      • undefined
        oozeBot @OwenD
        last edited by 28 Feb 2023, 19:57

        @OwenD perfect! I had it in my head that wouldn’t work outside of specific macros.. I’ll give this a go and report back on this thread if it for sure works for future reference.

        Thanks!

        1 Reply Last reply Reply Quote 1
        • undefined Phaedrux moved this topic from General Discussion 28 Feb 2023, 20:30
        • undefined
          oozeBot
          last edited by 6 Mar 2023, 19:00

          Confirmed this works:

          G29 S0
          if result !=0
          abort "Probing Error - canceling job"
          1 Reply Last reply Reply Quote 4
          • undefined oozeBot marked this topic as a question 6 Mar 2023, 19:00
          • undefined oozeBot has marked this topic as solved 6 Mar 2023, 19:00
          1 out of 4
          • First post
            1/4
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA