# Possible unit bug in tool change wizard

**URL:** <https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443>\
**Category:** 🐛 Bug\
**Created:** [October 30, 2026, 9:13pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443 "2026-10-30T21:13:15Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Michael](https://forum.sienci.com/user_avatar/forum.sienci.com/_michael/32/2962_2.png) [@\_Michael](https://forum.sienci.com/u/_Michael)\
**Post date:** [October 30, 2026, 9:13pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/1 "2026-10-30T21:13:15Z")

</div>

This topic is closed in gSender-\>Questions so I thought it might be worth posting here in case it wasn’t noticed by the gSender devs.

> [@Units issue in tool change wizard](https://forum.sienci.com/t/units-issue-in-tool-change-wizard/27263):
>
> Trying to run a file with a tool change in it for the first time today. I’m running the Standard Re-zero wizard and when I resume the program at the end of the wizard, it sends the machine in rapid mode to X-3.619, Y 31.575 which is out of the working area of the machine. Now this happens to be the correct last position of the machine in metric units, but the machine is moving in inch mode at this point. From the console I see: (Returning to initial position) ok G21 ok G90 G20 G0 X-3.619…

This thread is also relevant.

> [@Setting $13 in a macro](https://forum.sienci.com/t/setting-13-in-a-macro/27412):
>
> I run most of my gcode files in inches, so for multi tool files with a tool change, I need to have $13 set to 1 for the tool change wizard to work correctly. However, when I run my XYZ probe macro, $13 must be set to 0 for that to run correctly. I am wondering if I can set $13=0 at the start of the macro in the code and then reset it to $13=1 at the end of the macro. if I have to remember to change $13 manually every time I do an XYZ probe and tool change, I’m sure to miss that at some point …

EDIT: I think this boils down to if the ‘Standard Re-zero’ tool change strategy is supposed to work with inch mode G-code and $13=0. The macro problem, while not gSender’s problem stemmed from setting $13=1 to make the tool change work.

---

<div class="post-metadata">

**Author:** ![gwilki](https://forum.sienci.com/user_avatar/forum.sienci.com/gwilki/32/366_2.png) [@gwilki](https://forum.sienci.com/u/gwilki)\
**Post date:** [October 30, 2026, 9:46pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/2 "2026-10-30T21:46:26Z")

</div>

@_Michael I may be misunderstanding the $13 problem. It seems to be an issue with a 3rd party tool change wizard that the OP is using with gSender. Am I correct? If so, I don’t see how is issue can be categorized as a gSender bug. Feel free to explain why I am wrong. 😀

---

<div class="post-metadata">

**Author:** ![\_Michael](https://forum.sienci.com/user_avatar/forum.sienci.com/_michael/32/2962_2.png) [@\_Michael](https://forum.sienci.com/u/_Michael)\
**Post date:** [October 30, 2026, 10:08pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/3 "2026-10-30T22:08:06Z")

</div>

Am I mistaken? I thought it was the tool change wizard in gSender. I may very well be wrong because I don’t do tool changes in a file.

My understanding is that needing to set $13 in a macro is because of the tool change wizard running as if mm was used when it had inserted a G20 command to use inches. I assumed, and you know how that goes, that knowing a G20 was used was from examining the console output when @davebmck was diagnosing his problem.

I’m basing this mostly on this part of post #3 in the second link.

> but I ran into a problem when using the tool change wizard in Gsender. If I’m running an inch based gcode file, when the tool change wizard returns the spindle to the position it was located at the M6 command, the command line uses the metric units, but puts a G20 in the line which executes the move as inch units. I think this is a bug in the wizard, but I can get it to work fine as long as I have $13=1.

So I think in the first thread he discovered a workaround by setting $13=1, but that led to a problem in the probe macro not working because he needed $13=0 there, that’s the second thread I linked. I think he wouldn’t need $13=1 at all if the tool change wizard had worked correctly.

---

<div class="post-metadata">

**Author:** ![davebmck](https://forum.sienci.com/letter_avatar_proxy/v4/letter/d/71e660/32.png) [@davebmck](https://forum.sienci.com/u/davebmck)\
**Post date:** [October 30, 2026, 10:25pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/4 "2026-10-30T22:25:18Z")

</div>

I’ll see if I can explain. The root problem is not with the macro. It expects $13=0 which is the default. The problem (bug?) is with the tool change wizard that I outlined in the referenced thread. If I’m running an inch based gcode file and $13 is set to 0, the wizard sends the spindle to the wrong position because of the G20 in the command line. The work around is to set $13=1 and the wizard will work for inch files.

Now the next time I run the probe macro, it will fail unless I remember to reset $13=0. My post about changing $13 in a macro is another work around so I can just leave $13 set at one value.

---

<div class="post-metadata">

**Author:** ![davebmck](https://forum.sienci.com/letter_avatar_proxy/v4/letter/d/71e660/32.png) [@davebmck](https://forum.sienci.com/u/davebmck)\
**Post date:** [October 28, 2026, 12:49am UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/5 "2026-10-28T00:49:01Z")

</div>

I run most of my gcode files in inches, so for multi tool files with a tool change, I need to have $13 set to 1 for the tool change wizard to work correctly. However, when I run my XYZ probe macro, $13 must be set to 0 for that to run correctly. I am wondering if I can set $13=0 at the start of the macro in the code and then reset it to $13=1 at the end of the macro. if I have to remember to change $13 manually every time I do an XYZ probe and tool change, I’m sure to miss that at some point and my machine will go somewhere its not supposed to.

---

<div class="post-metadata">

**Author:** ![\_Michael](https://forum.sienci.com/user_avatar/forum.sienci.com/_michael/32/2962_2.png) [@\_Michael](https://forum.sienci.com/u/_Michael)\
**Post date:** [October 28, 2026, 7:24pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/6 "2026-10-28T19:24:00Z")

</div>

I don’t have an answer to your question. I do have a suggestion that may work for you instead.

From what I’ve seen hanging around here for awhile, what usually works best is to leave $13 at 0. It’s possible, at least in the design programs that I’m familiar with, to design in inches but use a mm post processor. gSender is also capable of displaying inches, for coordinates and visualization, when it’s running a mm G-code file.

Inches are a second class citizen as far as grbl is concerned. Millimeters are more accurate and avoid several problems that crop up when inches are used. That said using the setup described above you don’t have to look at millimeters anywhere unless you are looking at the G-code itself.

The tool change settings might need to be changed if they are in inches. I’ve never used tool changes so I don’t know.

You do you but $13=1 never seems to work out from what I’ve seen.

EDIT: Don’t quote me on this because I work in mm from start to finish but I don’t think $13=1 is even needed for inch G-code files. Isn’t that what G20(set units to inches) and G21(set units to millimeters) are for?

Wanted to make sure I wasn’t hallucinating so I searched a bit. gSender may handle $13=1 better than it used to but posts like this have stuck with me.

> [@What are the units for the numbers next to feed and spindle?](https://forum.sienci.com/t/what-are-the-units-for-the-numbers-next-to-feed-and-spindle/4170/24):
>
> This means that your controller is always reporting values as Inches. Default for grbl and almost every OEM config I’ve seen is $13=0 (report in mm). This has no effect on the dimensions of your job, just on how values are reported. gSender seems to assume grbl is reporting in mm (again, default and almost universal), so it’s taking your 40in/min and thinking that it is 40mm/min and doing the appropriate conversion to convert those mm to inches (because you’re in G20 mode) resulting in displ…

---

<div class="post-metadata">

**Author:** ![davebmck](https://forum.sienci.com/letter_avatar_proxy/v4/letter/d/71e660/32.png) [@davebmck](https://forum.sienci.com/u/davebmck)\
**Post date:** [October 30, 2026, 3:31am UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/7 "2026-10-30T03:31:29Z")

</div>

Thanks for the response Michael. You are correct that standard gcode runs fine in either inch or metric regardless of the value of $13. I’ve always left $13 at the default 0, but I ran into a problem when using the tool change wizard in Gsender. If I’m running an inch based gcode file, when the tool change wizard returns the spindle to the position it was located at the M6 command, the command line uses the metric units, but puts a G20 in the line which executes the move as inch units. I think this is a bug in the wizard, but I can get it to work fine as long as I have $13=1. However, when I run my XYZ probe macro, $13 must be set to zero for that one to work correctly. That’s why I’m asking if I can just set $13 in my macro.

---

<div class="post-metadata">

**Author:** ![gwilki](https://forum.sienci.com/user_avatar/forum.sienci.com/gwilki/32/366_2.png) [@gwilki](https://forum.sienci.com/u/gwilki)\
**Post date:** [October 30, 2026, 11:26am UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/8 "2026-10-30T11:26:09Z")

</div>

@davebmck I think that, to get a definitive answer, you will need to post your probe macro.

---

<div class="post-metadata">

**Author:** ![davebmck](https://forum.sienci.com/letter_avatar_proxy/v4/letter/d/71e660/32.png) [@davebmck](https://forum.sienci.com/u/davebmck)\
**Post date:** [October 30, 2026, 12:15pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/9 "2026-10-30T12:15:51Z")

</div>

It’s the CNCjs macro that KGN pointed me to in my previous thread. [nomad3-cncjs-macros/bitzero-v2-probe-xyz.macro.nc at master · vsergeev/nomad3-cncjs-macros · GitHub](https://github.com/vsergeev/nomad3-cncjs-macros/blob/master/bitzero-v2-probe-xyz.macro.nc)

---

<div class="post-metadata">

**Author:** ![\_Michael](https://forum.sienci.com/user_avatar/forum.sienci.com/_michael/32/2962_2.png) [@\_Michael](https://forum.sienci.com/u/_Michael)\
**Post date:** [October 30, 2026, 5:20pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/10 "2026-10-30T17:20:59Z")

</div>

Thanks for the additional context. I hope my post didn’t come across in a negative way.

Apparently, in the post apocalyptic wasteland that is my mind, the $13 trip wire really rattles the cans in my alarm system! I wanted to make sure it was really necessary to go there.

Unfortunately I haven’t been able to find any info on how to change a firmware setting in a macro.

EDIT:

> [@davebmck](#):
>
> I think this is a bug in the wizard

If you haven’t done so already consider creating a post in the gSender Bug category or GitHub to get this fixed if it is indeed a bug.

---

<div class="post-metadata">

**Author:** ![\_Michael](https://forum.sienci.com/user_avatar/forum.sienci.com/_michael/32/2962_2.png) [@\_Michael](https://forum.sienci.com/u/_Michael)\
**Post date:** [October 30, 2026, 5:51pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/11 "2026-10-30T17:51:41Z")

</div>

I think I may have something here.

I made two macros.

Set Firmware 13=1

```auto
$13=1 %wait
$13 %wait

```

Set Firmware 13=0

```auto
$13=0 %wait
$13 %wait

```

Here is the console output from running:

- the first macro
- $13 in the console (extra verification)
- the second macro
- $13 in the console (extra verification)

```auto
$13=1 %wait
ok
$13 %wait
$13=1 (Report in inches, boolean)
ok
$13=1 (Report in inches, boolean)
ok
$13=0 %wait
ok
$13 %wait
$13=0 (Report in inches, boolean)
ok
$13=0 (Report in inches, boolean)
ok

```

This was done using the grblHAL simulator not my actual SLB but I could test that if needed. Maybe you tried without the %wait?

Actually, I never tried without the %wait because I saw a line in the Variables drop down, in the create/edit macros window, that was ‘$# %wait’ to get the value of a setting so I tested based on that.

---

<div class="post-metadata">

**Author:** ![davebmck](https://forum.sienci.com/letter_avatar_proxy/v4/letter/d/71e660/32.png) [@davebmck](https://forum.sienci.com/u/davebmck)\
**Post date:** [October 30, 2026, 8:40pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/12 "2026-10-30T20:40:01Z")

</div>

That looks like it works. I’m running standard grbl, but I think it should work the same. Unfortunately, I’m traveling again this weekend, but I’ll test this when I get home on Monday.

I posted about the problem with the wizard in the general questions sections. Do you think it would get additional attention in the bug section?

---

<div class="post-metadata">

**Author:** ![\_Michael](https://forum.sienci.com/user_avatar/forum.sienci.com/_michael/32/2962_2.png) [@\_Michael](https://forum.sienci.com/u/_Michael)\
**Post date:** [October 30, 2026, 9:15pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/13 "2026-10-30T21:15:44Z")

</div>

Let us know how you make out when you get back home.

I took the liberty of posting in the bug category with links to this thread and the one you mentioned just in case.

> [@Possible unit bug in tool change wizard](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443):
>
> This topic is closed in gSender-\>Questions so I thought it might be worth posting here in case it wasn’t noticed by the gSender devs. [https://forum.sienci.com/t/units-issue-in-tool-change-wizard/27263](https://forum.sienci.com/t/units-issue-in-tool-change-wizard/27263) This thread is also relevant. [https://forum.sienci.com/t/setting-13-in-a-macro/27412](https://forum.sienci.com/t/setting-13-in-a-macro/27412) EDIT: I think this boils down to if the ‘Standard Re-zero’ tool change strategy is supposed to work with inch mode G-code and $13=0. The macro problem, while not gSender’s problem stemmed from setting $13=1 to …

---

<div class="post-metadata">

**Author:** ![davebmck](https://forum.sienci.com/letter_avatar_proxy/v4/letter/d/71e660/32.png) [@davebmck](https://forum.sienci.com/u/davebmck)\
**Post date:** [October 30, 2026, 10:36pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/14 "2026-10-30T22:36:44Z")

</div>

Thanks for posting it there for me. I was going to do that later, but you probably have more cred than me on this forum.

---

<div class="post-metadata">

**Author:** ![\_Michael](https://forum.sienci.com/user_avatar/forum.sienci.com/_michael/32/2962_2.png) [@\_Michael](https://forum.sienci.com/u/_Michael)\
**Post date:** [October 30, 2026, 11:00pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/15 "2026-10-30T23:00:32Z")

</div>

I did it because you mentioned you were traveling and I thought it might save you some phone typing. It also seemed just as easy as answering if I thought it would get more attention. Since then you’ve had to type it all anyway to clarify that thread. 🤷

Safe travels!

EDIT: Some people are wizards at phone typing but I’m at least 10 times faster on my PC keyboard than mobile devices!

---

<div class="post-metadata">

**Author:** ![gwilki](https://forum.sienci.com/user_avatar/forum.sienci.com/gwilki/32/366_2.png) [@gwilki](https://forum.sienci.com/u/gwilki)\
**Post date:** [October 31, 2026, 1:17pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/16 "2026-10-31T13:17:59Z")

</div>

@_Michael @davebmck I’ve moved all the posts to the “possible bug in tool change wizard” topic. This way, all the conversation is in one place, and there will be no more duplicate posts.

I would suggest to @davebmck that he open a support ticket with Sienci. Keep in mind that this is a user forum and your issue may not be addressed here as promptly as you would like.

---

<div class="post-metadata">

**Author:** ![davebmck](https://forum.sienci.com/letter_avatar_proxy/v4/letter/d/71e660/32.png) [@davebmck](https://forum.sienci.com/u/davebmck)\
**Post date:** [November 2, 2026, 9:33pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/17 "2026-11-02T21:33:56Z")

</div>

@_Michael Just to let you know, I tried changing the value of $13 in my probe macro and it does work. I can set it to 0 at the start of the macro and back to 1 at the end. The only difference I ran into was that adding the %wait to the line gives me an error:3 (invalid statement) and no change is made. Without the %wait it works fine. Maybe it has to do with me running standard grbl vs. grblhal.

---

<div class="post-metadata">

**Author:** ![KGN](https://forum.sienci.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@KGN](https://forum.sienci.com/u/KGN)\
**Post date:** [November 3, 2026, 4:37pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/18 "2026-11-03T16:37:22Z")

</div>

We’re looking to get this fixed for the next release for standard and flexible where it seems to be the issue - fixed is working as expected.

---

<div class="post-metadata">

**Author:** ![davebmck](https://forum.sienci.com/letter_avatar_proxy/v4/letter/d/71e660/32.png) [@davebmck](https://forum.sienci.com/u/davebmck)\
**Post date:** [November 3, 2026, 6:13pm UTC](https://forum.sienci.com/t/possible-unit-bug-in-tool-change-wizard/27443/19 "2026-11-03T18:13:25Z")

</div>

Thanks for the response. I’ll be sure to check out the next release.
