DRO half function with a 1 line macro
-
So I recently got an edge finder for my CNC and wanted to replicate the half function found on many DROs I have worked with in the past to easily find the center of a part. After scratching my head for a bit and playing around I realized it could be done with one Meta Gcode line in a Macro file. Here is the X version of it:
; Half X G10 L2 P1 X{move.axes[0].workplaceOffsets[0] + (move.axes[0].userPosition / 2) }
To use this I touch off on one side of the part and set that as zero for that axis. Next I go to the other side of the part and touch off. Then I run the above macro. This sets the new work offset half way between the old zero and the current position.
For completeness here is the Y version:
; Half Y G10 L2 P1 Y{move.axes[1].workplaceOffsets[0] + (move.axes[1].userPosition / 2) }
I figured I would share as this has proved to be super useful.
-
@cthulhulabs thanks for sharing!
-
@dc42 You are welcome
Honestly this might be a good addition to the actual DWC interface when in CNC mode. Just a thought.