Help with a tool setting macro
-
Hi all
I'm using a Duet2 to drive a small CNC machine (PrintNC) and everything is good. I'm looking to make toolchanges easier and so have added a toolsetter. This is alongside my current XYZ work 0 finder.
I'm struggling to get my head around how to make a macro that will update tool lengths.My Z homes to Z max
Ideally my workflow will be this:
Home machine
Jog machine above XYZ probe
Run my XYZ find 0 macro - which works fine and sets work 0 in WCS G54 system 1Run tool length macro which does the following:
Move machine to the tool setter
Probe against the tool setter to establish my baseline tool length - which I'm assuming will be 0 offset for the first toolDo some cutting
Tool change
Probe against the tool setter with the new tool to establish the delta between my original tool length and this new tool
Apply offset to WCS so that Z=0 is in the same place as it was initiallyAny help greatly appreciated.
-
@rilot I hope someone more familiar with CNC will jump in with some advice. My initial thought is leaving the WCS as they are and updating the tool offset. That way the tool offset for the first tool does not need to be 0 (maybe your tool setter is not exactly aligned in Z with your XYZ work 0 finder)...
thinking about it a bit more, In that case you could probably use a G30 probe to the tool setter which would set the end of the tool to whatever the z probe offeset was configured to, and that would need to be just the X difference between the WCS setter and the tool setter.
I might not be right about this though.
-
@rilot I presume the "tool setter" is some sort of switch. You can configure that as a secondary Z probe. You don't need to use WCS offsets to set the tool Z offset, you can use the G30 S2 command to set the tool offset by probing.
-
@dc42 Yes, it's essentially a switch wired to an endstop.
Will look at G30 but I'm guessing that I need to run the G30 on my first tool before probing the XYZ=0 of the stock.
Thanks. Will have a play later.