# Tool changes And Z Height

**URL:** <https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715>\
**Category:** Original/PRO Series (Buildbotics) (Gen 1)\
**Created:** [September 14, 2021, 4:10pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715 "2021-09-14T16:10:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![KCBrown](https://avatars.discourse-cdn.com/v4/letter/k/d2c977/32.png) [@KCBrown](https://forum.onefinitycnc.com/u/KCBrown)\
**Post date:** [September 14, 2021, 4:10pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/1 "2021-09-14T16:10:13Z")

</div>

I have tried a couple of carves with took changes. I am using Carbide Create Free now. I have been setting my retract height to 1/4-1/2" so it can speed things up. However, when the machine pauses for the tool change, it only retracts to that short height, making it impossible to change the tool. Is there a trick where I can add code to make the Z go up several inches to accomplish the tool change?

---

<div class="post-metadata">

**Author:** ![MikeH](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@MikeH](https://forum.onefinitycnc.com/u/MikeH)\
**Post date:** [September 14, 2021, 9:03pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/2 "2021-09-14T21:03:40Z")

</div>

V-Carve has a setting you can use to set the height when it stops for a change - but I don’t know how to make Carbide Create do that. Most people create different files for each bit - so you can move the machine around and re-probe for Z when you change files/bits.

---

<div class="post-metadata">

**Author:** ![pootaholic](https://avatars.discourse-cdn.com/v4/letter/p/8e7dd6/32.png) [@pootaholic](https://forum.onefinitycnc.com/u/pootaholic)\
**Post date:** [September 14, 2021, 9:23pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/3 "2021-09-14T21:23:40Z")

</div>

When the spindle/router retracts for the tool change, just raise your z-axis enough to be able to change your bit then re-zero your Z-axis and you should be right to go.

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.onefinitycnc.com/ben/32/1298_2.png) [@ben](https://forum.onefinitycnc.com/u/ben)\
**Post date:** [September 14, 2021, 9:32pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/4 "2021-09-14T21:32:02Z")

</div>

You can raise the Z-axis from the control panel or with the joypad.  
You will need to probe the Z axis after the tool change anyway since the new tool height is very likely to be different from the previous one.

---

<div class="post-metadata">

**Author:** ![woodart](https://avatars.discourse-cdn.com/v4/letter/w/ea5d25/32.png) [@woodart](https://forum.onefinitycnc.com/u/woodart)\
**Post date:** [May 16, 2022, 1:53pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/5 "2022-05-16T13:53:10Z")

</div>

I am new to cnc, I am using Carbide Create, mainly because I am a Mac user and refuse to buy a PC just for my cnc. Anyways, I have create a design that will require multiple tool paths with bit changes, my question is, when I create the gcode, how will the machine know what tool path to do first or in what order? is it simply the order in which you create the tool paths? thx.

---

<div class="post-metadata">

**Author:** ![OnefinityCNC](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.onefinitycnc.com/onefinitycnc/32/7_2.png) [@OnefinityCNC](https://forum.onefinitycnc.com/u/OnefinityCNC)\
**Post date:** [May 16, 2022, 3:00pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/6 "2022-05-16T15:00:47Z")

</div>

you must separate each tool into their own file.

---

<div class="post-metadata">

**Author:** ![woodart](https://avatars.discourse-cdn.com/v4/letter/w/ea5d25/32.png) [@woodart](https://forum.onefinitycnc.com/u/woodart)\
**Post date:** [May 16, 2022, 3:15pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/7 "2022-05-16T15:15:44Z")

</div>

THX! I will do that.

---

<div class="post-metadata">

**Author:** ![fredcal2](https://avatars.discourse-cdn.com/v4/letter/f/49beb7/32.png) [@fredcal2](https://forum.onefinitycnc.com/u/fredcal2)\
**Post date:** [October 10, 2022, 2:02pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/8 "2022-10-10T14:02:13Z")

</div>

joy stick does not work in the middle of a tool change

---

<div class="post-metadata">

**Author:** ![349iq2345](https://avatars.discourse-cdn.com/v4/letter/3/bb73d2/32.png) [@349iq2345](https://forum.onefinitycnc.com/u/349iq2345)\
**Post date:** [October 10, 2022, 2:39pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/9 "2022-10-10T14:39:51Z")

</div>

Hey Fred,

> [@fredcal2](#):
>
> joy stick does not work in the middle of a tool change

this is a known missing feature. While you’re in **program mode** , [jogging](https://buildbotics.com/manual-v1-0/#ControlPageJogTab) is not available. This also applies when the machine encounters a _[M6 (tool change)](https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m6)_ event in your g-code program.

The ability to jog during pause or tool change is a feature that is requested under

- [Tool change jogging plus notifcation/ETA of toolchange](https://forum.onefinitycnc.com/t/tool-change-jogging-plus-notifcation-eta-of-toolchange/6091)
- [Here’s a key element missing from the BB controller](https://forum.onefinitycnc.com/t/heres-a-key-element-missing-from-the-bb-controller/10405)
- [here](https://forum.onefinitycnc.com/t/like-many-new-forums-the-excitement-and/9209/21)
- [here](https://forum.onefinitycnc.com/t/like-many-new-forums-the-excitement-and/9209/25)

However you can modifiy the behaviour at tool change. Should you just want to raise your Z higher during a tool change event, or alter the behaviour at tool change in another way (e.g. [bitsetter](https://forum.onefinitycnc.com/search?q=bitsetter)-like tool change at home position), you can insert g-code in the ‘tool-change’ field of the [General Configuration Tab](https://buildbotics.com/manual-v1-0/#generaltab). The code in this field is executed when a M6 (tool change) command is encountered. Regarding _what to insert there_, I cited some information [here the other day](https://forum.onefinitycnc.com/t/like-many-new-forums-the-excitement-and/9209/14).

Welcome to the forum!

---

<div class="post-metadata">

**Author:** ![JimChilders](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@JimChilders](https://forum.onefinitycnc.com/u/JimChilders)\
**Post date:** [November 2, 2022, 12:40am UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/10 "2022-11-02T00:40:46Z")

</div>

New to forums, first post, this looks like an old thread but only one I see on topic. My first carve I screwed up twice and I think this answers question. I have 4 tool changes in my gcode. Did it in VCARVE and didn’t know to do separate files for separate tool paths. My first pocket worked great. Then the spindle moved in front of the piece and told me to change the tool and probe z, but height was too low to fit probe block between wood and spindle. So the collet was in front of my piece and too low both times. First time I didn’t even get probe to touch. It did the emergency stop and I screwed around with the second tool until I got it in. The. It restarted the code at the top and I had to probe XYZ, went to wrong spot and it destroyed that piece. So I repeated my first tool path on a new piece of wood and the first tool path worked fine. I did get the block under the tool on the tool change but it didn’t raise back up after I started router and hit continue. Broke my bit in half.

First carve frustration.

---

<div class="post-metadata">

**Author:** ![drivett](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@drivett](https://forum.onefinitycnc.com/u/drivett)\
**Post date:** [December 23, 2022, 1:19pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/11 "2022-12-23T13:19:03Z")

</div>

I have yet to figure out how to set my resting Z higher for tool changes without creating separate files.  
One way I found to cheat it for most bit changes is unscrewing the collet nut and wiggling out the collet too. This gives room for most bits I use. If you do t get enough height to set your Z I create a separate file. I am learning every day. Like it a lot.

---

<div class="post-metadata">

**Author:** ![KenA](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@KenA](https://forum.onefinitycnc.com/u/KenA)\
**Post date:** [December 23, 2022, 2:05pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/12 "2022-12-23T14:05:27Z")

</div>

I can’t think of an argument for not creating separate files for each tool path.

---

<div class="post-metadata">

**Author:** ![349iq2345](https://avatars.discourse-cdn.com/v4/letter/3/bb73d2/32.png) [@349iq2345](https://forum.onefinitycnc.com/u/349iq2345)\
**Post date:** [December 23, 2022, 3:06pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/13 "2022-12-23T15:06:56Z")

</div>

Hey Dan,

> [@drivett](#):
>
> I have yet to figure out how to set my resting Z higher for tool changes without creating separate files.

why don’t you simply use forum search engine functionality and read one of the many answers to this most frequently asked question, e.g. here:

- [Bit change during a carve](https://forum.onefinitycnc.com/t/bit-change-during-a-carve/17488/3)

or many practically identical answers? One of the many answers to this question is even only two posts above yours.

Anyway, there’s no reason to fear inserting a simple but comfortable g-code example into the ‘tool-change’ field of the [General Configuration](https://buildbotics.com/manual-v1-0/#generaltab) Tab, [as described here](https://forum.onefinitycnc.com/t/like-many-new-forums-the-excitement-and/9209/14). G-code is not rocket science 🙂, and with a tested example you can break nothing. You can mill air to test the example and see if it’s comfortable enough for you.

**I would try the second example** , it is made for the Onefinity Touch probe height.

It is made for the case where you touchprobe on your workpiece top (=part zero is on workpiece top). Should you touchprobe on the machine bed instead (=part zero is at wasteboard height =at workpiece bottom), simply remove the “`G0 X0 Y0`” line. Probing will then be done at machine home position.

---

<div class="post-metadata">

**Author:** ![drivett](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@drivett](https://forum.onefinitycnc.com/u/drivett)\
**Post date:** [December 23, 2022, 4:12pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/14 "2022-12-23T16:12:33Z")

</div>

Thanks. Most appear to be adding lines in gcode. Sounds good but I am not that good with doing stuff like that. But I am learning. Thanks. Dan

---

<div class="post-metadata">

**Author:** ![349iq2345](https://avatars.discourse-cdn.com/v4/letter/3/bb73d2/32.png) [@349iq2345](https://forum.onefinitycnc.com/u/349iq2345)\
**Post date:** [December 23, 2022, 4:15pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/15 "2022-12-23T16:15:14Z")

</div>

Hey Dan,

> [@drivett](#):
>
> Sounds good but I am not that good with doing stuff like that.

It’s not that complicated: On most computers, it is Ctrl-A (select all), Ctrl-X (cut), Ctrl-C (copy), and finally Ctrl-V (paste).

EDIT: Sorry, I forgot that maybe not everybody has a keyboard and a mouse connected to the Onefinity Controller, or runs the Onefinity Controller User Interface from a remote computer (which would have the additional advantage that you can see the [CAMotics](https://camotics.org/) 3D toolpath simulation and can also easily make screenshots of the Onefinity Controller User Interface), but instead most users are probably used to work with this ugly stupid on-screen keyboard on the touch display (which on top of being an on-screen keyboard, is missing important system keys ☹). Of course, such a distasteful thing can discourage users from doing anything at all. But, you don’t forcibly need to add a keyboard and a mouse, the on-screen keyboard will also do it.

Of course, instead of clicking into the ‘tool change’ field of SETTINGS page, then typing Ctrl-A (select all), Ctrl-X (wipe it out), going to the new browser tab that you previously opened on Onefinity Controller’s chromium window or on your remote computer, where you opened the [page with the example](https://forum.onefinitycnc.com/t/like-many-new-forums-the-excitement-and/9209/14#razi-ullahs-tool-change-script-2), marking the example, typing Ctrl-C (copy to clipboard), and then back on the Onefinity SETTINGS page in the first browser tab, pasting it with Ctrl-V (paste clipboard content), of course, instead of doing this, you could very well, as you suggested, simply look **which lines perhaps are already there (as shown below)**, and then **just add the additional ones from the example**. This should even go with the on-screen keyboard 😉 You actually thought more practically here than I did in my joke above 🙂

#### Making the ‘tool change’ routine usable

For example, if the content of your ‘tool change’ field on your [SETTINGS page](https://buildbotics.com/manual-v1-0/#generaltab) **already contains the following** (it usually should, as of up to version 1.0.9):

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

then what [Razi Ullah](https://forum.onefinitycnc.com/t/like-many-new-forums-the-excitement-and/9209/14#razi-ullahs-tool-change-script-2)’s excellent example would change is just the following **(add the text in bold letters and press “Save” on the flyout menu)**:

`(Runs on M6, tool change)`  
`M70`  
`G21`  
`S0`  
**`G28`**  
`M0 M6 (MSG, Change tool and` **`tighten collet`** `)`  
**`G0 X0 Y0`**  
**`M0 (MSG, attach probe)`**  
`F100`  
**`G91`** _; (added by Aiph5u, this was missing!)_  
`G38.2` `Z-10.0`  
`G92 Z15.4`  
`g0 Z30`  
`M0 (MSG, Remove probe, start spindle)`  
`M72`

**What will this little change do? Much!**

Instead of being stuck over your workpiece at tool change, with too little room to be able to change the bit, the added **[G28](https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g28-g28.1)** command will move the router to the _machine origin_, which is at home position, and ask you to change the bit **THERE**. Isn’t that comfortable? Plenty of room to change the bit, and no need to lean over the machine. Then, after you have confirmed that you are done with changing the bit, the **[G0](https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g0) X0 Y0** command will move the router from the machine origin to the _part origin_ (also called _workpiece zero_), which means the position where you probed your workpiece at the beginning, and allow you to probe Z again. Probing Z is necessary after every tool change, since usually the bits have different lengths, so this is to make the machine know the new tool length. And after you’re done with this, the machine will restore all settings and positions with the [M72](https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m72) command that it previously saved with the [M70](https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m70) command at the start (including your possibly chosen imperial measurements mode 🙂), and voilà, the machine resumes the program and goes on with the next part with the new bit. A beautiful tool change within the program, isn’t it?

Note that this example assumes you have your **workpiece zero on top of the workpiece** and that you probe the top of the workpiece. Even as often there may be the case that instead you defined a 3D model with the **workpiece zero on the bottom of the workpiece** , which means, as you surely know, this has to be Z-probed directly on the machine bed. The Onefinity Touch Probe is used upside down in those cases. In this case you can still use nearly the same ‘tool change’ example, you would simply remove the line “G0 X0 Y0” (or better just make it temporarily inactive by prepending a semicolon ( ; ) at the beginning of the line), and the Z probing will then simply be offered at home position too, where you already changed the bit.

One thing that you could change too, is to increase the “-10” value on the [G38.2 (Probe)](https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g38) command to a higher negative value.

This value does nothing more than to tell the machine for how much Z travel it should move downwards in order to find the touch probe before aborting. By increasing this value you can get plenty of reserve to avoid the annoying “Probe not found” error, but dependent on at which height the workpiece zero of your g-code program is, you will have to select the value that accomodates your needs.

Finally, what you can still adjust later, after you’ve tested this example, is from where you want the Z to start probing, perhaps from a lower position. If you know e.g. that your workpieces are usually rather low in height and how long your longest bit in the program will be, you can add an additional command for moving Z to a lower position prior to start probing. You can get help for this later here in the forum.

#### References

- How to understand and to use the content of the ‘tool-change’ field of the SETTINGS page, [is to be found here](https://forum.onefinitycnc.com/t/like-many-new-forums-the-excitement-and/9209/14) ←.

EDIT: There is an updated example of the ‘tool-change’ routine in the [newer posting below](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/29)

---

<div class="post-metadata">

**Author:** ![349iq2345](https://avatars.discourse-cdn.com/v4/letter/3/bb73d2/32.png) [@349iq2345](https://forum.onefinitycnc.com/u/349iq2345)\
**Post date:** [December 23, 2022, 9:55pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/16 "2022-12-23T21:55:13Z")

</div>

Hey Jim,

sorry that noone answered to your post (I was absent at that time).

For the answer, [see above](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/15#making-the-tool-change-routine-usable-1).

Welcome to the forum!

---

<div class="post-metadata">

**Author:** ![349iq2345](https://avatars.discourse-cdn.com/v4/letter/3/bb73d2/32.png) [@349iq2345](https://forum.onefinitycnc.com/u/349iq2345)\
**Post date:** [December 23, 2022, 9:55pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/17 "2022-12-23T21:55:47Z")

</div>

…ah and I forgot:

Welcome to the forum!

---

<div class="post-metadata">

**Author:** ![scamp](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@scamp](https://forum.onefinitycnc.com/u/scamp)\
**Post date:** [February 15, 2023, 7:24pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/18 "2023-02-15T19:24:59Z")

</div>

How do you confirm that you changed the bit? Will it ask that question? I put the changes in, now I will make a program and test that out to make sure I entered it correctly. It sounds like it will be very nice to change bits.  
Thank you very much for your reply.

---

<div class="post-metadata">

**Author:** ![349iq2345](https://avatars.discourse-cdn.com/v4/letter/3/bb73d2/32.png) [@349iq2345](https://forum.onefinitycnc.com/u/349iq2345)\
**Post date:** [February 15, 2023, 7:28pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/19 "2023-02-15T19:28:32Z")

</div>

Hey Steve,

> [@scamp](#):
>
> How do you confirm that you changed the bit?

a popup window with two buttons, “Continue” and “Stop”

> [@scamp](#):
>
> Will it ask that question?

sure.

---

<div class="post-metadata">

**Author:** ![scamp](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@scamp](https://forum.onefinitycnc.com/u/scamp)\
**Post date:** [February 16, 2023, 2:42pm UTC](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715/20 "2023-02-16T14:42:37Z")

</div>

I tried the changes. for some reason something is wrong. I get a message that says no fit after I probe the first time. I get an error message before I probe the second time. I will try to attach a picture of them.

 ![GOPR0699](https://us1.discourse-cdn.com/flex022/uploads/onefinitycnc/original/3X/3/1/318e07e788855aebdc23c041e08477fd0859c689.jpeg)  
 ![G0010697](https://us1.discourse-cdn.com/flex022/uploads/onefinitycnc/original/3X/8/1/818fb681d4bfa9d8a43ff6378a4e2cb78107e4f3.jpeg)

[Next page](https://forum.onefinitycnc.com/t/tool-changes-and-z-height/7715.md?page=2)
