Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Set zero in current work coordinates

    CNC
    2
    4
    90
    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.
    • chimaeragh
      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

      dc42 1 Reply Last reply Reply Quote 0
      • dc42
        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

        chimaeragh 2 Replies Last reply Reply Quote 0
        • chimaeragh
          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
          • chimaeragh
            chimaeragh @dc42 last edited by

            @dc42 Working now.

            G10 L20 X0 Y0 Z0
            M500
            

            Thanks a lot

            Duet 2 Wifi, Ooznest Workbee CNC 1510

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