Tool-change gcode backup

I was trouble shooting my CNC, and so I removed the gcode in the tool-change section in settings. However, my backup for it failed, so does anyone have the code for it?

(Runs on M6, tool change)
M0 M6 (MSG, Change tool and attach probe)
(probe to minimum z soft limit, which is -10)
G38.2 Z-10
G92 Z15.4
g0 Z30
M0 (MSG, Remove probe, start spindle)

1 Like

I notice during m6 tool change when I use a very long bit 2in LOC z probing procedure sometime would fail. What it does is after the initial touch off, immediately the spindle would plunge into the probe at a very rapid speed. Luckly my stock was a piece of some, is this normal?

I use fusion 360 my cam is program in inches not metric, does it effect the tool change?

thanks henry.

I use Fusion as well and for me on M6 tool change it will probe Z one time only unlike when I trigger a probe Z from the touch screen, then it probes 2 times. If you use bits that are vastly different in length you may hit the probe soft limit of 10mm which would e-stop the controller, not send it plunging down.

I use metric for all my machining operations, no issue there - if you look at the code that runs on a tool change it specifically sets the controller to metric

(Runs on M6, tool change)
M70 (save modal state - M Codes )
G21 (set to metric)
S0 (set spindle speed to zero - I suspect it would be difficult to change the tool while it’s spinning)
M0 M6 (MSG, Change tool and attach probe) (pause program, display message “Change tool and attach probe”)
F100 (set feed rate to 100 units/minute - in this case mm since we’re in metric)
G38.2 Z-10 (probe to minimum z soft limit, which is -10, if it travels more than 10mm without finding the probe block = estop)
G92 Z15.4 (set Z offset 15.4mm from probed distance - the thickness of the probe block)
g0 Z30 (raise the Z axis to 30mm above the new work offset)
M0 (MSG, Remove probe, start spindle) (pause program, display message “Remove probe, start spindle”)
M72 (restore the modal settings saved by M70 at the beginning - if you were working in imperial units, set back to imperial for example)

If you have a long bit, then switch to a short one - you may need more than the 10mm Z soft limit above so you could increase that value.

1 Like

thank you for your clarification. I guess what I experience was an freak occurrence. :slight_smile: