Duet3D Logo

    Duet3D

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

    G code formula to compensate for X and Y probe offset

    General Discussion
    2
    3
    78
    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.
    • mitch
      mitch last edited by

      I am playing with some macros and I would like to command the probe to the center of the bed. I could manually calculate the position because I know the offsets but if the offset is ever changed I would have to manually update the macro.

      Is it possible to include the probe offset in a G code equation (possibly using G31) of some sort so my macro would adapt if my offsets are changed?

      G1 X112.5 Y112.5 F6000	; Move probe to bed center
      

      G31 would return my probe offset values but it is unclear to me how to incorporate that into my X and Y values above to compensate. Essentially, I just need to a syntax example or to know if this is possible.

      1 Reply Last reply Reply Quote 0
      • Phaedrux
        Phaedrux Moderator last edited by

        I think this could be done with RRF3 and conditional gcode if the G31 offsets were part of the object model.

        As a work around I have macros called nozzlecenter and probecenter which just have an absolute coordinate move to put the head in the right place. Then I call those from other macros when I need that move.

        It doesn't update automatically with G31 changes, but at least then there is only one place I have to change it if I do change the G31 offsets.

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 0
        • mitch
          mitch last edited by

          I just found this today. Sounds promising to automate some configuration wizards:

          G code meta

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