(Change to metric units) G21 (stop the spindle) S0 (prompt the user to move the bit to within 1" of the probe edges, insert a 1/4" bit, and attach the probe) M0 (MSG, Attach probe and confirm that it is below the bit, the bit is within 1" of both probe lower edges, and the bit is 1/4" in diameter) (set the feed rate to 100 mm/min) F100 (probe to minimum z soft limit, which is -54) G38.2 Z-54 (set z-axis to the height of the probe) G92 Z22 (raise z to 30mm which is a safe travel height) G0 Z30 (move x incrementally by -25.4mm) G91 G0 X-25.4 (lower tip of bit to below the top surface of the probe) G90 Z18 (probe for the x-axis edge) G38.2 X25.4 (set x to the distance from the left side of the probe to the workpiece) (plus the radius of the bit) G92 X-10.175 (back away from the left edge) G0 X-20 (raise to a safeheight) G0 Z30 (move to the right to put probe back over the workpiece) G0 X25.4 (move y to a position in front of the front edge of the probe) G91 Y-25.4 (lower tip to below the top surface of the probe) G90 Z18 (probe towards the front edge of the probe) G38.2 Y25.4 (set y to the distance from the front side of the probe to the workpiece) (plus the radius of the bit) G92 Y-10.175 (back away from the front edge of the probe) G0 Y-20 (raise to the safe height) G0 Z30 (move to the front left corner of the workpiece) G0 X0 Y0 (prompt the user to remove the probe) M0 (MSG, Remove probe) (end of program) M2