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

    CNC probing in XY plane

    Scheduled Pinned Locked Moved
    CNC
    3
    9
    1.0k
    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.
    • lukasundefined
      lukas
      last edited by lukas

      Hi, I’m configuring my new CNC (Ooznest Workbee alike) with DuetWifi controller and I’m absolutely excited with this setup!

      The only thing I’m struggling with is probing the stock in XY plane.

      Configuration - regular endstops for XYZ connected to X=X Y left=Y Y right=E0 and Z=Z. The E1 endstop input is connected to drill bit and XY touch plate like in the picture (credit to Ooznest). This works like a switch, the bit hits metal part and the circuit is closed.

      Screenshot 2019-11-02 at 23.28.42.png

      I’m able to probe in Z direction with the following macro :

      ; Configure touchprobe
      ;M558 P4 I1 F100 H50 C4	; Set touch probe type to normally open switch on E1 endstop input
      
      ; Probing itself
      G30 S-1			; Probe at current XY position and stop
      M400			; Wait for move to finish
      G10 L20 P2 Z20		; Adjust Z in coordinate system 2
      G91			; Relative positioning
      G0 Z10			; Lift Z for probe removal
      G90			; Absolute positioning
      

      This works great however I’m not able to think of the same for X and Y direction. Would anyone have a thought how to achieve this?


      Firmware Electronics: Duet WiFi 1.02 or later
      Firmware Version: 2.03 (2019-06-13b2)

      1 Reply Last reply Reply Quote 0
      • lukasundefined
        lukas
        last edited by

        I came across command "M577: Wait until endstop is triggered" but I'm not sure if can be used and how. How is it supposed to wait? Can it be combined with G0 command?

        1 Reply Last reply Reply Quote 0
        • Danalundefined
          Danal
          last edited by Danal

          1. Use G38.2 to probe. Of course, you must G1 or G0 or manually jog to a position near, but not touching, the edge of the workpiece you wish to probe, THEN issue the G38.X with appropriate X,Y to move toward that workpiece.

          2. In your macro, when G38.2 has stopped, set whatever work coordinate you wish to set, etc, etc. Then G1 or G0 off the piece. etc, etc. Whatever you want in the macro.

          Note: The need to pre-position sort of implies there will need to be four macros: Probe +X, -X, +Y, -Y.

          Test this CAREFULLY so as to not break a bit. Put the bit well away from the piece, start the probe, and immediately touch the piece with the clip. The carriage should stop. BE READY ON THE PHYSICAL ESTOP SWITCH.

          Your CNC does have a physical estop, right? Not just the one on the DWC screen. Right?

          Delta / Kossel printer fanatic

          1 Reply Last reply Reply Quote 0
          • jannauundefined
            jannau
            last edited by jannau

            Have you seen the probing macros in Ooznest's Duet3d Firmware which are using M585 for workspace probing?

            A single endstop/probe can be used for all 3 axes. M585 and G38.2 just probe a single axis at a time but the same contact is always triggered. G38.2 was just added to RepRapFirmware 3 and appears still a little buggy. I seems to accept only absolute target positions even after G91.

            1 Reply Last reply Reply Quote 0
            • Danalundefined
              Danal
              last edited by

              Good point on the single endstop wiring. I changed my post.

              M585 sets a tool offset, which is OK-ish... but... using Work Coordinate Systems is a better habit for CNC. That is a macro with G38.2 followed by whatever WCS setting you wish.

              Delta / Kossel printer fanatic

              1 Reply Last reply Reply Quote 0
              • jannauundefined
                jannau
                last edited by

                G38.2 is only available in RRF3 beta11 and beta12. The Ooznest's macros are setting offsets for a work coordinate system. They use M585 for probing, reset the tool offset to X0Y0Z0 after probing and then set the offset for the work coordinate system. As far as I can see this is done because M585 is the only available probing tool in RRF2 for X and Y.

                1 Reply Last reply Reply Quote 0
                • Danalundefined
                  Danal
                  last edited by

                  Well... I stand corrected!! I didn't notice the V3 in the documentation. I run CNC on several controllers, but to be clear, not on a Duet.

                  @lukas , do go down the path @jannau is suggesting. Much, much better!

                  @jannau, THANKS. Good info.

                  Delta / Kossel printer fanatic

                  1 Reply Last reply Reply Quote 0
                  • jannauundefined
                    jannau
                    last edited by

                    I opened issue 333 on github for the unexpected interpretation for the G38.x positions in RRF3.

                    1 Reply Last reply Reply Quote 0
                    • lukasundefined
                      lukas
                      last edited by

                      As Ooznest had video and guide only for CNC xPro (apparently that changed recently) I haven’t looked into Ooznest macros to be honest.

                      As you pointed to M585 command I have tried that now with successful stop at the plate, exactly what I need! I will have a look at that macro to learn how they deal with tool offset vs. wcs offset.

                      Thank you for showing me the way @jannau and @danal !

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