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

Set zero in current work coordinates

Scheduled Pinned Locked Moved
CNC
3
5
683
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
    chimaeragh
    last edited by 19 Sept 2021, 14:16

    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

    undefined 1 Reply Last reply 19 Sept 2021, 16:26 Reply Quote 0
    • undefined
      dc42 administrators @chimaeragh
      last edited by 19 Sept 2021, 16:26

      @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

      undefined 2 Replies Last reply 19 Sept 2021, 16:58 Reply Quote 0
      • undefined
        chimaeragh @dc42
        last edited by 19 Sept 2021, 16:58

        @dc42 Thanks. I will look into what you suggested

        Duet 2 Wifi, Ooznest Workbee CNC 1510

        1 Reply Last reply Reply Quote 0
        • undefined
          chimaeragh @dc42
          last edited by 20 Sept 2021, 11:10

          @dc42 Working now.

          G10 L20 X0 Y0 Z0
          M500
          

          Thanks a lot

          Duet 2 Wifi, Ooznest Workbee CNC 1510

          undefined 1 Reply Last reply 24 Oct 2022, 07:58 Reply Quote 0
          • undefined
            jjude @chimaeragh
            last edited by 24 Oct 2022, 07:58

            @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