Gcode: Where is M6 - Tool change?

I’m pulling my hair out, what is left of it. There are some great posts in here about dealing with tool changes, or splitting the gcode into multiple files to accomodate different tools. I’m sorry if I just can’t find the right thread, but each post I read refers to the M6 command, like this one:

I’m on the most recent firmware, in the ‘tool-change’ field of my controller, I have the new code to raise the bit, change the bit, probe for z, and resume…


I’m using Carbide Create Pro, trying to do Advanced VCarves, and in all the gcode I export, it does not use M6, a tool change is written like this: with M0 ;T302 as the tool change prompt, but nowhere in the code is M6 written, and so the ‘tool-change’ code is never run. Like this:

M0 ;T302

I know the T302 is just the tool number, but I don’t know how to change the code so the firmware will recognize to run a different set of commands.

I’ve exported (Post Processor) from Carbide Create as Basic and as GRBL, I can’t find any difference, and both use T rather than M6.

I’m I just missing the point completely? Any help on how to adjust the code or the ‘tool-change’ option in the settings?

Many thanks

Hey Tyson,

from what I know there will no effect by a T command unless a M6 command is encountered.

However in Carbide3D → Software FAQList of supported gcodes, it says:

M6 — Tool change — this is implemented in Carbide Motion to facilitate the Nomad tool length sensor for changing tools

where it says:

Carbide Motion is only available for the Nomad and Shapeoko CNC machines

Maybe it is not supported?


Could be that it is not supported… any chance you (or anyone) knows if there is a code snippet I could swap out? The tool change - T command is easy to find, could it be exchanged with a comparable M6 code?

Hey Tyson,

if you manage to insert a M6 command into your g-code program, then the code you previously entered into the ‘tool-change’ field in the General Configuration Tab of the Onefinity Controller will be executed.

Regarding what to insert there, I cited some information here the other day.

I don’t have any experience with the Carbide 3D products, but they have a forum. Maybe you ask there if there is a way to activate M6 commands in the g-code output?

Thanks @Aiph5u

Ya, I’ll head over there shortly, I found the code snippets here first, so thought I’d start here. I didn’t mean to call you out directly by quoting your earlier post, but it was a good example, so thanks for that.

I did wander over to the Carbide Create forums, but thankfully a bit of trial and error showed that it’s a simple code swap. In code like I shared above, replace:

M0 ;T302


M6 T302

(302 is just the tool number, so it will vary based on the bit you’ve specified) So ya, swap the M0 for M6 and remove the semi-colon. I’m guessing this is obvious for someone who knows gcode.

As referenced, I think it’s also helpful to add one line to the default tool-changer macro to raise the router higher, as explained in this thread:


Hey Tyson,

yes this was already clear, but you did not find an option in the Carbide Create program on how to enable M6 being inserted by the program?

No luck or responses over in those forums, and once I posted my found solution, the thread was closed by an admin.

Hey Tyson,


I wouldn’t consider having to edit every g-code file manually really a solution. Maybe you should not have posted your “solution”. Now the question if there is a way to enable M6 commands being inserted into the g-code output by Carbide Create remains unanswered.

1 Like