set current height as maximum z-height
-
Hi everyone,
I was wondering if anyone had any advice for me. I have a MPCNC and am using the z-end stop with a touch plate to set a z-height at the beginning of my project. What I am looking for is a way to move the z-height to the highest possible position and tell the duet that it should not go beyond the current height, otherwise it skips steps and ends up drilling deeper than I want.
I have tried G30, which pops up a manual z-height menu where I can select 0. However, is there a different Gcode that sets the z maximum at the current height without me having to click a button? Essentially, I use the touch probe to get the tip of my cutter to a height of 20mm. I would then want to move up the z axis to the highest point it is allowed to go, which would then be up in the 40mm range. Because the bits are different sizes, I would essentially home z to 20 mm with the touch probe, move it up manually then set the z maximum to whatever height I am at. to make it even more interesting, I would also like to use a 6th endstop to do that. I am using a duet 2 wifi with the DWC on RRF 3.2. I have all five drivers and end stops used up, is there a possibility to add another end stop and have a macro that sets the maximum z height when it is triggered?
essentially I want to make it as foolproof as possible to avoid having the machine go through the roof so to speak.
thanks
-
I'm not 100% clear on what you're trying to do, but there are a couple of homing switch options that might help you out.
https://duet3d.dozuki.com/Wiki/Gcode#Section_G0_G1_Move
H3 terminate the move when the endstop switch is triggered and set the axis limit to the current position, overriding the value that was set by M208.
H4 terminate the move when the endstop switch is triggered and update the current positionAs for using an endstop but you have all of the endstop ports in use, there may be a way to tap the pins on the expansion port.
What ports do you have free on the Duet at the moment?