Bit setter macro v2.0


I’ve written a bit setter code that functions more closely to Carbide Motion for those who are used to that workflow this is nearly identical. Same idea as my previous post but this one probes the tool length at the beginning of the file. This means that you only have to probe the NEW tool when the tool change happens. Very similar to how Carbide Motion works. The only real difference is that you zero your workpiece before the tool is measured.

For those that do a lot of carves with more than 2 tools, this is a quicker way to use the bit setter. The only drawback is that it will measure the tool length at the beginning even if you are only using one tool and don’t have a tool change as well.

So for this one you need to modify the program-start dialogue box in the Controller>Settings>program-start. BACK UP YOUR CONFIG FILE FIRST IN Settings>General.
Delete existing commands in program-start dialogue and replace with the following:

G21 G40 G49 G17 G90
G53 G0 Z-10
G53 G0 X780 Y50
M0(MSG, Attach Probe Magnet, Attach Dust Boot, Click “Continue”)
G0 Z10
G38.2 Z-133 F100
G53 G0 Z-10
M0(MSG, Remove Probe Magnet, Click “Continue”)
G0 X0 Y0
G90 G17

Also, you will need to delete the existing commands in Controller>Settings>tool-change and replace them with the following:

G21 G40 G49 G17 G90
G53 G0 Z-10
G53 G0 X780 Y50
M0(MSG,Remove Dust Boot, Change Tool, Attach Probe, Click “Continue”)
G53 G0 Z-70
G38.2 Z-133 F100
G0 Z25.4
G92 Z[#5000-#4999+25.4]
G53 G0 Z-10
M0(MSG,REMOVE MAGNET!!!, Replace Dust Boot, Click “Continue”)
G0 X0 Y0

So you just set your zero as usual, probe or no probe however you prefer. Press the play button to run the file and it will run you thru probing the tool that is loaded to measure the length. When the tool change comes you now remove the first tool insert the next tool and follow the prompts. And continue this for all subsequent tool changes.

The G53 G0 X780 Y50 can be changed to wherever your probe is, to find these coordinates turn off the controller, restart it, home machine, and then use the controller and move to where you have your probe. Note the coordinates for X and Y and enter those coordinates in place of X780 Y50. You’ll need to do this in both dialogue boxes. Firmware 1.0.5

Has been tested with Vectric, but should work with all software that allows M6 tool changes. Makita router lowest Z slider position 3/4” wasteboard. Z values in macro may need altering with different configurations of router/spindle and slider position.

Video link, sorry for my poor videographer abilities.


Hi Mike!

Wow, thank you for that awesome intro to your bit setter macro. :slight_smile:
I must admit: I’m still pretty new to all this…

So I work with Fusion360. I try to optimize the manfacture workflow in such a way that there are as few as possible tool changes required. I then generate the Gcode for each operation. Those become separate files. How does your bit setter macro come into play, given that I need to upload and run every Gcode file separately?

Assumption: I copy-paste the Gcode into a single file, and put your macro in between the operations that require a tool change, then upload it in the 1F as a single file?

I’d be very happy to learn how to integrate your macro into my workflow, as it seems to reduce the number of possible probing anomalies.

If using separate files it isn’t needed. You would just rezero the z after bit change before hitting go on the next file. That is my current work flow. This would allow you to build a file with multiple toolpath and a pause between to allow the bit change and rezero via this code

Hi Mike,
This is awesome. Looking forward to getting my new machine in April :frowning:

How would I modify the macro so the router stops in the middle of the workspace instead of above the probe on the right to do the bit change?

I just think it would be easier to access the router bit there rather then in the corner. But maybe I am wrong as I do not have my machine yet to play around with.

Thanks and great job.
Hopefully @OnefinityCNC will add these to the machine and make it available when you purchase the machine.

Hi Stephane,

To modify where on the machine the router stops you would modify the fifth line in both portions of the macro G53 G0 X780 Y50. Just change the X and Y to wherever suits you this is best done immediately after homing the machine. Move the router to where you like and then use the coordinates the display is showing as the new values on those lines. I put way in the corner just to maximize work area. There’s actually no reason that there couldn’t be a pause added to the middle, change bit and then continue to the corner as well. So many ways to do this it’s all about what works best for you.

Keep in mind depending on your setup the Z values might need some modification as well. Also, this version will want to measure the tool length every time you start a file. There is a different version posted that probes only if you have a tool change but requires that the old tool and the new tool are measured.

This video shows the other macro in action.

Feel free to message me if you have any questions, I’m on the 1F FB group and can be reached via Messenger.

Hope this helps!


Hi Dennis,

I haven’t done any work in Fusion with this machine to this point. I have used it to make some clamps and such in the past.

This macro actually gets put into the controller not the gcode file. Having said that I suppose it could be added to the file itself would just need to be careful about where it was inserted.

So, you should be able to remove the M2 command at the end of the first gcode of file and then add an M6 command and paste in the next gcode, and continue this process with subsequent tool paths. I’ve only ever done single tool work with Fusion but would assume there should be a way to build files with multiple toolpaths instead of having to copy and paste.

If I get some time in the next few days I’ll play around with Fusion and see what works.

Is there a 1F post processor for fusion? If not which one have you been using?

Ho Lee Krap, dude! I do a lot of 2-sided 3D items and this looks like it will solve a lot of difficulties! Mad props!

1 Like

Awesome glad it will help. Just be careful of the Z values if you’re using a spindle or in a different mounting position than the lowest you might need to make some adjustments. If you need any help feel free to reach out!


This is great Mike! I am a long time app developer so this is a whole new language for me to learn! I did notice that you are setting the macro to MM is it going to matter if the system settings are in inches and using an inches post processor. Or does the firmware convert everything to MM anyways in the back ground. Thank you in advance for you info.

Hi Scott,

In my experience it doesn’t matter the M70 command is suspending the modal commands. The factory settings are in MM so I didn’t actually give it any thought but haven’t heard of it causing any issues for anyone.

IMO you are better off leaving the machine in metric. Of the 2 machines I’ve owned metric is native. I’ve seen some issues with some software not working properly when saving toolpaths on the FB group and almost always comes back to an metric/imperial issue with the post processor.

Here’s a link to a different thread in here with a bit different version of this with some explanations of what each line is doing.

Hi all,

I have a project that uses 2 bits and I saved the toolpaths to 1 file.

Am I wrong in thinking that when I generated the gcode from VCarve Pro using the Onefinitty PP, there should be some M6 codes in the file for the bit change? If so, I must be doing something wrong because there are none.

Just trying to wrap my head around the whole concept.


Surprised there isn’t a tool change prompt however you have no way to zero the bit or raise the router with the normal default setup so it is best to save one file per tool

Yes there should be one M6 per tool change command. But as @Hermsen.BJ pointed out unless you’re going to use the bit setting macro I wrote it can be challenging to make bit changes work with factory M6 command. I’ve been using the macro for a 2 or 3 months now and love it.

I’ve found probing between tools manually can lead to some variation in DOC between tools. The macro is VERY accurate for DOC.

In V-Carve, if you put multiple tool paths into a single file, the M06 is present. It allows you to change tools, put the probe underneath the tool, and it will probe for Z. The “home” position in the material setup will be used to “park” the router for the tool change - so you can raise the Z height there, and have plenty of room to change the tool. The only issue is that you can’t move anything during the tool change - so -0,0 will be used as the spot where the Z probe will happen, unless you put something different there.

Once I figured out how to set the Z height at tool change, this has worked very well for me.

1 Like

Darned idiot I am. :slight_smile:
I was looking for M6 and not M06.
Found the tool change prompt.
Can’t wait to get my machine. It should be here next week some time.

I added your G-code and it works, sometimes. Depending on the file I load, I get this error:

Any ideas how I can fix this?

Can you send me a screen shot of the code entered into settings in the controller? Also, which version are you using?

I have not had any errors of this nature. The only thing I’ve found is Z will often say over or under but in now way effects machine running.

Hi Mike,

When the macro prompts for tool changes, is it possible to have the macro tell you the actual tool to use?
At the moment, it simply says “Change Tool”.
In multi tool carves, it would be very convenient to be told which tool to insert in your router :slight_smile:
I use the tool numbers as I have assigned a number to each tool in the database.


1 Like

Well, that’s a a yes and no. I modified the PP for Vectric to have it display the next tool number in the first dialogue box. So if you’re using the macro version that measures both tools at tool change it will show the tool number before the first measurement of original tool not when prompted to change tool for the new one. It’s better than nothing I suppose. If you’re using v2.0 that measures only new tool at tool change then it would display tool number at the correct time.

I am pretty sure I am using the V2.0 of the macro.
But I think I am using the default PP from OF for VCarve Pro.
I am using firmware version 1.0.7 that came with my machine.

I will go through the process later today and take notes of the steps I see.

I will get back to you.