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

    Fully automatic xyz cnc probe macro

    Scheduled Pinned Locked Moved Solved
    CNC
    4
    18
    1.8k
    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.
    • HebigTundefined
      HebigT @tyrod
      last edited by

      @tyrod

      Cool if G68 works!

      I feel like I'm doing a lot of guessing here, but i'm fairly certain you can calculate the angle you need using meta commands.

      RRF supports the atan function which you can use to calculate the small angle in a right triangle.

      Here's a drawing and some notes (super messy, sorry!).

      angle.JPG

      tyrodundefined 1 Reply Last reply Reply Quote 0
      • tyrodundefined
        tyrod @HebigT
        last edited by

        @hebigt
        Wow! All Greek to me! Trigonometry etc was a long time ago 😵‍💫 I just turned 64 on the 13th. Anyway I searched through the info on meta commands and it’s nothing I can deal with. That being said, I went online and found what I think I need to calculate the angle in degrees(for g68)D2F37710-CCD2-48CA-AB04-1EA7A0F49180.jpeg
        Not sure but I think picture b would be the correct way. Side note, I believe probing y would have to come after doing this but not z height.
        I’ve searched to see if there is a complete formula to do this that is usable as a meta command but I’m not sure of what to do with it even if I did😵‍💫. I need help!!

        alankilianundefined 1 Reply Last reply Reply Quote 0
        • alankilianundefined
          alankilian @tyrod
          last edited by

          @tyrod

          Since you have a vacuum table, I would flip the problem:

          • Insert a pointy thing in your chuck.
          • Do a G0 move to location (0,0)
          • Align part of the part at that location
          • Do a G0 move to location (100,0)
          • Rotate the part to align rotation in the X-Y plane
          • Turn on the vacuum

          I get that the part may be unusually-shaped, but you need known coordinates on the part to locate it using the coordinate-system transformation method anyway, so instead of doing that, just make G0 moves to those known locations and orient the part correctly.

          SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

          tyrodundefined 1 Reply Last reply Reply Quote 0
          • tyrodundefined
            tyrod @alankilian
            last edited by

            @alankilian
            Ahh, the k.i.s.s method 😁
            I already do that but the issue is that it’s difficult to keep the original 0,0 from shifting in some cases. I really believe a software solution would benefit all cnc users. As a lot of cnc users are probing it seems an automatic probing solution is a logical step forward. I’m really hoping someone can help.

            1 Reply Last reply Reply Quote 0
            • tyrodundefined
              tyrod @tyrod
              last edited by

              @tyrod
              Just found m673 align plane on rotary axis. Alas, it doesn’t support xy axis! I wonder if there’s a workaround?

              tyrodundefined 1 Reply Last reply Reply Quote 0
              • tyrodundefined
                tyrod @tyrod
                last edited by

                @tyrod
                I guess there’s not enough interest in this at this time since it’s mainly a cnc thing. I can still use a macro to probe twice on x axis then use tan on a calculator to get what I need. Maybe dc42 or another of the many smart contributors could comment on this idea? I think this may need its own gcode like the m673 align plane on rotary axis one. I’ll carry on and try to write a macro with a pause to input the g68 and degrees. Thanks to everyone who replied!

                OwenDundefined 1 Reply Last reply Reply Quote 0
                • OwenDundefined
                  OwenD @tyrod
                  last edited by

                  @tyrod
                  You could put a request in the firmware wishlist section for an R parameter to be added to G10

                  http://www.linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G10-L2_

                  tyrodundefined 1 Reply Last reply Reply Quote 0
                  • tyrodundefined
                    tyrod @OwenD
                    last edited by

                    @owend
                    Thanks owend, I looked at the link and I noticed it says “ when a rotation is in affect jogging an axis will only move that axis in a positive of negative direction and not along the rotated axis” does that mean only jogging ignores the rotation but gcode follows the rotation? I assume so, I hope 😆

                    tyrodundefined 1 Reply Last reply Reply Quote 0
                    • tyrodundefined
                      tyrod @tyrod
                      last edited by tyrod

                      @tyrod
                      Owend, I would still need to find the rotational offset required to shift xy axis to line up with my stock shown in my drawing. That’s why I thought g68 was a good way to go. I was looking at meta commands and found reference to tan under function subheading, dc42 was referring to deamon.g and I followed that link and that’s when I found it. I have some idea how to: 1st probe x, set to g92 x0 as the base, move, say,50mm and do second probe and that would give me the distance of the perpendicular. So now I know length of base and length of perpendicular to be able to use the tan function to calculate the degree rotation of xy plane. I think(not sure) I can use m114 to report x and y coordinates to host. From here I have no idea if it’s possible to get the required calculations performed by meta command(or daemon.g) or however it’s done to then add the angle in degrees to g68 and run it which would theoretically rotate the xy axis to match the stock material. Easy to remove by using g69 as well

                      HebigTundefined 1 Reply Last reply Reply Quote 0
                      • HebigTundefined
                        HebigT @tyrod
                        last edited by HebigT

                        @tyrod OwenD wrote an intro-document for g code meta commands. Check it out!

                        https://forum.duet3d.com/topic/16495/conditional-g-code-introduction-tutorial-pdf

                        tyrodundefined 1 Reply Last reply Reply Quote 0
                        • tyrodundefined
                          tyrod @HebigT
                          last edited by

                          @hebigt
                          Hey Hebigt, thanks for that! I read through it. While I now have a better understanding how I could make macros do a lot more work for me, unfortunately my knowledge on the language is nil. I think I have found a c++ program to calculate the angle in degrees that g68 needs. But have no idea how to use it🤔. I just don’t have the knowledge I would need and a crash course in c++ or whatever needed is not in the cards.

                          tyrodundefined 1 Reply Last reply Reply Quote 0
                          • tyrodundefined
                            tyrod @tyrod
                            last edited by

                            @tyrod I just found “Feature request-workpiece angle compensation CNC” by jay_s_uk and in it he wrote a script to do exactly what I wanted. I just searched for g68 and it’s on the second search page. I haven’t the time right now to try it. Thank you jay_s_uk! (And everyone else)!😀

                            1 Reply Last reply Reply Quote 1
                            • tyrodundefined tyrod has marked this topic as solved
                            • First post
                              Last post
                            Unless otherwise noted, all forum content is licensed under CC-BY-SA