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

    Set zero in current work coordinates

    Scheduled Pinned Locked Moved
    CNC
    3
    5
    713
    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.
    • chimaeraghundefined
      chimaeragh
      last edited by

      I am trying to write a macro for a button in the BtnCmd plugin to set X, Y and Z zeros in the current work coordinates like it appears in the dashboard panel.
      Referencing the gcode wiki, it seems I have to specify which work coordinate system number I am setting it for. This will mean different macros for each work coordinate system. I'm sure there's a more elegant solution.

      Screenshot_20210919-134906_Firefox.jpg

      Duet 2 Wifi, Ooznest Workbee CNC 1510

      dc42undefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @chimaeragh
        last edited by

        @chimaeragh you can use object model variable state.workplaceNumber to retrieve the current 0-based workplace coordinate system number, and use the value in conditional GCode.

        However, won't the command G10 L20 X0 Y0 Z0 do what you want?

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        chimaeraghundefined 2 Replies Last reply Reply Quote 0
        • chimaeraghundefined
          chimaeragh @dc42
          last edited by

          @dc42 Thanks. I will look into what you suggested

          Duet 2 Wifi, Ooznest Workbee CNC 1510

          1 Reply Last reply Reply Quote 0
          • chimaeraghundefined
            chimaeragh @dc42
            last edited by

            @dc42 Working now.

            G10 L20 X0 Y0 Z0
            M500
            

            Thanks a lot

            Duet 2 Wifi, Ooznest Workbee CNC 1510

            jjudeundefined 1 Reply Last reply Reply Quote 0
            • jjudeundefined
              jjude @chimaeragh
              last edited by

              @chimaeragh I want to make a macro that interrupts the work in progress (doesn't have to be able to continue) and moves the blade to these coordinates. How ???

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