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

    Big ask... Z probing

    Scheduled Pinned Locked Moved
    CNC
    3
    6
    527
    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.
    • Nightowlundefined
      Nightowl
      last edited by Nightowl

      I was wondering if anyone would be prepared to give me some specific guidance on a method of detecting changes in tool length (on a CNC) as a step towards using multiple tools on a project.

      Normally, I set up the X, Y and Z of the project using the "eyes and paper" method and set the working zero using the appropriate button on the DWC interface. I do intend to use something like the Carbide3D BitZero in the future, but that's a future project.

      As I understand it, after the Work X, Y and Z zeroes have been set and I start the CNC machine on its journey, once the toolpath has completed and the tool has moved to a specific "safe" position (which I can set in the PP, without any difficulty), I'm assuming that, at this point, the X, Y and Z work zeroes are still "known" to the machine. So far, so good.

      If I need to change the cutting bit for a subsequent toolpath to be cut on the same project, I would like to use a macro to automate the task of measuring the length of the cutting bit and adjusting the Z height (+ or -) accordingly.

      I'm thinking I could use a switch like this at a fixed location on the baseboard, and connected to an appropriate i/o connector on my Duet3 MB6HC.

      This is similar to the workflow my old Shapeoko used.

      I have tried researching this on this forum and elsewhere, but translating anything I've found into my needs is where I stumble, as most refer to a printer, not a CNC.

      Thanks

      Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
      I'm still on my learning curve, so take everything I say with caution!

      RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

      dc42undefined 1 Reply Last reply Reply Quote 0
      • jens55undefined
        jens55
        last edited by jens55

        Wouldn't the procedure be exactly the same as homing z ? Your tool setting thingy becomes the z=0 switch and instead of going to what is usually the center of the build plate on a 3D printer, you go where the tool setter is located. The printer goes to the tool setter and slowly lowers the tool height until you connect with the tool setter. That will be your z0 position. Assuming the height of the tool setter is known, you can then reset z0 to the actual z0 position by subtracting the tool setter height from the current z0 and making that your new z0 position.
        Just take the homez.g file from your system files, copy it, tweak it and save it as a macro and call it 'set tool zero' or something similar.
        Of course you would also tweak your config.g file to have a second z home switch configured. See G30 in the gcode reference.

        Hopefully, with just tweaking existing files, it becomes manageable .....

        Nightowlundefined 1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @Nightowl
          last edited by dc42

          @Nightowl I suggest you set up the switch as a Z probe. Create a macro that moves to max height, positions the tool over the switch, and uses G30 S-2 to probe and set the tool Z offset.

          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

          Nightowlundefined 1 Reply Last reply Reply Quote 0
          • Nightowlundefined
            Nightowl @jens55
            last edited by

            Thank you, @jens55

            Technically it probably is, but I think I must be a bit slow on the uptake because the logic isn't working for me. I've got the process in my head, but it's just transposing that into my machine 😵

            Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
            I'm still on my learning curve, so take everything I say with caution!

            RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

            1 Reply Last reply Reply Quote 0
            • Nightowlundefined
              Nightowl @dc42
              last edited by

              @dc42 said in Big ask... Z probing:

              @Nightowl I suggest you set up the switch as a Z probe. Create a macro that moves to max height, positions the tool over the switch, and uses G30 S-2 to probe and set the tool Z offset.

              I think that's what I have in my head, but perhaps I'm tying myself in knots overthinking it, but is it really that simple?

              Would I need to set up the probe in the config.g file using the M558 command, like this:

              ; Z-Probe
              M558 P5 H5 F120 T500	; enable Z probe, set dive height, probe speed and travel speed
              

              (Is the H5 value critical, in as much as the probe has to be a maximum of 5mm - in this case - above the switch, or do I need to take account of the travel distance within the switch too, please?)

              And then, would the macro look something like this?

              ; Z-Probe Macro
              G91
              G1 Z{max(move.axes[2].userPosition+5,move.axes[2].max-5)} F2400	; move the Z axis to 5mm below Zmax		
              G0 Xnnn Ynnn F2400 ; move XY above the switch
              G0 Znnn F150 ; Probe slowly
              G30 S-2 ; Where the magic happens?
              

              Once the probe sequence is complete, I would like to position the tool back to where it was when the macro was initiated - but with the cutting tool 5mm above the workpiece.

              Alternatively, I could use the co-ordinates of the switch as the point at which the spindle goes, once the cut is complete. That way, all I would need to do is change the cutting tool, run the macro to adjust for the tool length and, when I run the subsequent cut, the spindle will move above the start point and the Z height will have been adjusted for the difference in tool length by the Z-Probe macro, yes?

              Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
              I'm still on my learning curve, so take everything I say with caution!

              RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

              dc42undefined 1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators @Nightowl
                last edited by

                @Nightowl said in Big ask... Z probing:

                G1 Z{max(move.axes[2].userPosition+5,move.axes[2].max-5)} F2400 ; move the Z axis to 5mm below Zmax

                I think that first max should be a min, in case Z axis is already at max.

                You will also need to use G31 to set the trigger height of the Z probe, normally in config.g after the M558 command.

                You can use G60 to save the position before probing, and G0 with the R parameter to go back to that position or a related position.

                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

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