How to configure RepRap/Duet for single mount tool changing with Mutant v2

How to configure RepRap/Duet for single mount tool changing with Mutant v2

This is a guide on how you can configure a printer with RepRap firmware like a Duet3d board and be able to different tools on it one at a time.

If your printer runs Marlin firmware instead Wham Bam Systems has provided a pdf on how to do this: .

This is not a tool change done during prints to get multiple color/material prints this is tool changing done in between prints so you can have different hot ends, or other tools like a pen, cutting knife, paste extruder, laser, etc.

The way RepRap firmware works is it starts by loading a file called config.g on your sd card located in the sys folder. In the config.g are all the gcodes necessary to tell the printer how it is configured and how it will run. By changing the config.g you can change just about any configuration on your printer. One feature of reprap is that the configuration can be changed while the printer is running, and that is the feature we will be taking advantage of to be able to change the configuration for different tools.

What we are going to do is create a macro that will change the gcodes that handle the configuration, this way we can just run a macro whenever we physically change a tool.

Like I stated before the config.g file is what handles all start configuration, but that config file can load other files like the config.g while it is starting up. Which can extend the functionality of the config file. So we can have a config.g that calls and runs a tool.g file and inside the tool.g will be all the gcodes to setup that tool. So all we need to do it change the tool.g every time we change a tool leaving all the other gcodes in their place.


I would suggest to start by backing up every file on your sd card, either take the sd card and put it in a pc and copy everything to a safe place, or if you have access to the web interface then connect to the web select all the systems files and download them.

Gathering gcodes to change

Once everything is backed up we will open the config.g file

Here we will look for the gcodes that configure the tool

They may be in different places in your config.g

But the codes we will be looking for are the ones that control everything that is changed about your printer with this tool

For example when placing a direct drive extruder and hot end on my printer the codes I need to change are

M569 – Set motor driver direction, enable polarity, mode and step pulse timing

M92 – Sets axis steps per unit (in this case we are changing the esteps)

G31 – Sets Z probe parameters

M550 – set printer name (makes it easy to see what tool is loaded if you add it to the printer name)

You may need to add more gcodes if other things are changed for example you may need to change the M305 and or M143 Which configure the thermistor and max temperatures allowed.

Copy all the gcodes you wish to change to a temp document like a notepad or word document, then in your config.g you will place a semicolon in front of each of the commands you will change. This makes it so the commands are ignored but you aren’t deleting them in case you need to go back.

After the last command you added a semicolon to you will add a new line
M98 P”tool.g”;
This is the command that will call upon the tool.g file that will be created by the macro running all the changes we wanted

I added my M98 line after the section for fans and heaters in case I needed to add those to the macros at some point later on

Creating the macro

Now we will go into the Macro folder and create a new macro that will create the tool.g that the config will load. In my case I created a separate folder call Tool Selection to keep all my tool macros together as I plan on having multiple in the future. The click on “New File” and enter a descriptive name for the new tool.

In this new file you will set it up to create the new tool.g, close the tool.g file, run the file and then finally restart the printer to make sure everything is ran correctly.

Make your new macro look like below:

Then replace the four semicolons with the codes you copied from your config.g

At this point save the new macro and run it, it should create a new tool.g and restart the printer. Go into your system folder and make sure you see a tool.g. In my case it looks like below, and it should contain evert change we need without the text after the semicolons as that part is ignored and not needed by the printer.

Double check everything runs as it should, the extruder moves in the correct direction, your z probe still works, heaters and fan turn on, etc. If it all passes the preliminary test you are good to go.

You can copy your new macro and change the settings withing for any new tools you create for your printer.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: