Custom Gcode command's block as a replacement for a Gcode command

Issue #129 closed
Marius Stanciu created an issue

One possible application is to be able to duplicate the feature found in the pcbgcode.ulp from Eagle eCAD software, that allow to change tools and preserve the Z zero position when drilling. That could be done by replacing the M06 command (tool change) with the following block:

M05 **spindle stop**
G00 Z25.4000  **rapid to Z height 25.4mm**
G00 X0.0000  Y0.0000  **rapid to zero position, origin on x and y axis**
M06 T06  ; 1.0000  **tool change with tool T06 from a possible tool list. it's a 1.000 mm drill bit**
G01 Z0.0000  F300 **descend with feedrate (speed) of 300 mm/min**  
M06 **tool change again, coupled with MACH 3 option to stop on tool change it is just a pause**
G00 Z2.5400  **move at the previous selected feedrate, to Z = 2.54mm / it is the height to travel between drill holes**
M03 **spindle start, clockwise**
G04 P3.000000 **a small pause, dwell for 3ms**

Important is the fact that when an M06 command is issued there is a pause (at least there is a setting in MACH3 that allows that) until you hit continue.

At first M06 command it stops at a certain Z above the X=0 & Y=0 location.

You change the drill bit leaving it not tightened in the chuck. Then you press continue and it start descending to Z=0 at a custom feedrate.

When the spindle it's at Z=0 position then you can adjust the drill bit to touch the surface of the material, tighten the drill bit in the chuck and hit continue, the spindle is raising to the travel position height and resume operation.

Comments (3)

  1. Log in to comment