UGS/Fusion 360 Z axis problem

Sounds like there might be a zeroing issue, but, as Luke said, share the Fusion file.


I put this project away for a couple of days. I was able to get it to run perfectly this time. Several things I did differently this time. I deleted the toolpaths and started over on those, making sure all my settings were as accurate as I know how to make them. I also switched to a new 2 flute flat 1/8" end mill. That made a big difference in quality of the cut with no tear out. The edges aren’t very smooth, so I’ll experiment a little with that. The problem with the Z raising up to hit the limit switch was a problem in the toolpath. Retract height for some reason defaulted to a large number.

Thanks everyone for your assistance!


Ha! Yes, I know this answer! It drove me nuts for a day while I figured it out.

Take out this line “G28 G91 Z0”, save, and it works perfectly. I had to dig into this using Fusion 360, post processing into GRBL, and then using UGS.

Do you have a G28 set? That line just moves Z to its G28 location.

@neilferreri is on point as usual. I had the same issue the first time I used the Fusion360 post (that has this line that you removed) AND after I upgraded to the HDZ. Turns out, I had not redefined/reset my G28 reference, so the command was trying to reach a Z position that was no longer reachable mechanically.

A better fix than removing the line is to home and then type:


This will set/reset your G28 home position, (among which the Z0 that the G28 G91 Z0 wants to reach), and all will be good.


Interesting, I didn’t find that solution in my search and I hadn’t run into an issue just removing that line. UGS would actually flag errors if I didn’t remove that line. The other issue I found are tool changes. I had to make a folder to remove those since UGS didn’t know what to do with them.

I took care of that tool change issue by telling UGS to ignore them:

in the Options/UGS/Controller options menu, you can declare a “regular expression pattern remover”, and just fill it with “M6 T1”. Boom, no more need to hack your generated g-code files, UGS will ignore these lines.


Here’s a F360 CAM post that gives the options to:
Use G28 or not
Use Tools or not (will omit the M6 commands if not)
Return to work zero or not

Just remove the “.zip” from the extension (it’s not actually zipped). (17.8 KB)


Ah, thanks. I hadn’t gotten around to looking for that, but I figured something must be in there to ignore the tool changes. Of course, I’d want to ignore any tool number (e.g. those from Carbide Create), so a regular expression like “M6 T[0-9]+” should do.

cool, thanks. I’ll replace Carbide’s F360 post with yours, I knew it was out there but did not find it when I moved to F360, and then forgot.

1 Like

Mine is based on the grbl default, not Carbide’s as I haven’t used motion since the first time I used it. I always use metric, and I’ve never had an issue with it.

Yep, that’s what I did for tool changes. I meant to type filter but autocorrect changed it.

Excellent! Thanks for this. I hate remembering to delete the G28 line every time.

Try this one:

If you don’t use more than one tool in a post run, set “minimize tool changes” in it, and there will be no tool changes in the file.

Just removing the T commands automatically is a little prone to error. If you generate a file accidentally with more than one tool, it’ll just run and cut improperly, which is almost surely not what you want to happen. If you use the “minimize tool changes” (which just stays set unless you change it again) method, you still get an error if you use multiple tools in the toolpath.

This file actually is zipped…not because it’s big, you can’t upload .cps files. (5.5 KB)

1 Like

Good point. I’ll try it too, and diff them out of curiosity. Sooner or later I’ll want to customize one to my taste I guess.

I used a Custom GRBL POST Processor and disabled G28 Safe retracts. “G28 G91 Z0” lines are gone!

I also Set Write Tools list and Output M6 to No because GRBL stopped with invalid Command. (Openbuilds Control)


I just wanted to update this thread with a link to the newest version of my Fusion post that uses your clearance height, as set in the CAM settings, for the initial Z move.
Lots of other configurable options.


Thank you! I updated to that version.

1 Like

I had similar issues when milling the Chippendale Desk Legs. It’s operator error, and a balancing act; meaning you ca’t get program more Z travel than what’s available above my stock. (See the Z+1.3?)

The solution was to change the default Clearance and Retract heights to remove this error, and then everything posted and worked great.

1 Like

Let me know if you have any issues. The update came because of a request to handle the Z retract at the beginning of a job.