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

    M98 of Invalid Macro (axes not homed) does not error (HTTP)

    Scheduled Pinned Locked Moved
    DSF Development
    2
    3
    228
    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.
    • tristanryerparkeundefined
      tristanryerparke
      last edited by tristanryerparke

      I've got a SBC+MB6HC machine which I'm sending commands to via the POST /machine/code http request. Everything is running 3.5.1 stable.

      My config.g has a M564 S1 H1 in it to keep the axes from being moved until homing is complete.
      This means that if I send a command like G0 X436.5 Y-105.3 Z5 from the console or an http request, I get the correct error back: Error: G0: insufficient axes homed.
      However, when I have a macro /macros/test_limit_macro.g with G0 X436.5 Y-105.3 Z5 as the contents, running M98 P"/macros/test_limit_macro.g" in the console returns the red error line plus a green bar as if the command completed successfully. In addition, running M98 P"/macros/test_limit_macro.g" via http returns an empty string result as if the command completed successfully.

      Is this intended? If so it makes it hard to raise a meaningful error in the program that is making the http requests.

      If its not a bug, are there any workarounds or alternatives to be able to extract the error output when running a macro via http request?

      Cheers,
      T

      chrishammundefined 1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @tristanryerparke
        last edited by

        @tristanryerparke Yes, that is intended. M98 starts the macro successfully but only as soon as the following action fails you get a generic error message. You need to subscribe to the object model to keep track of incoming messages, then you can handle that as well. See here for further API details.

        Duet software engineer

        tristanryerparkeundefined 1 Reply Last reply Reply Quote 0
        • tristanryerparkeundefined
          tristanryerparke @chrishamm
          last edited by tristanryerparke

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