Help with G-Code from Fusion 360

I have some code created from Fusion 360 that drills a bunch of holes. When I ran the code it went down to make the hole, but it looks like it did not retract correctly and started moving to the next location while down. I managed to hit the e-stop, however it did ruin a nice piece of walnut.

Before I ran the code, I double checked the zero point to make sure it was correct but telling the controller to goto to z0. The zero point was correct before, so I ran the code.

I have few questions:

  • Does the controller support the G98 G-Code?
  • Is the code correct?
  • In line 50, (N50 G98 G81 X2.625 Y2.625 Z-0.75 R-0.1 F30) is the retract above the top surface. If so then, I’m not sure where this comes from as in the file the retract height is set to .3
    Does the rest of the code look correct?

Here is the code used.
(T5 D=0.25 CR=0 - ZMIN=-0.75 - FLAT END MILL)
N10 G90 G94 G17 G91.1
N15 G20
N20 G53 G0 Z0
N25 S18000 M3
N30 G54
N35 G0 X2.625 Y2.625
N40 G43 Z1.4 H5
N45 G0 Z0.6
N50 G98 G81 X2.625 Y2.625 Z-0.75 R-0.1 F30
N55 X11.5667
N60 X20.5083
N65 X29.45
N70 Y11.5667
N75 X20.5083
N80 X11.5667
N85 X2.625
N90 Y20.5083
N95 X11.5667
N100 X20.5083
N105 X29.45
N110 Y29.45
N115 X20.5083
N120 X11.5667
N125 X2.625
N130 G80
N135 Z1.4

Good morning Martin,

It seems to me your “R-.1” value would be the issue. I would think that needs to be a positive value, assuming you have set Z zero off the top of your work piece. I would say double check your Heights again in Fusion.

I haven’t received my machine yet so take this as it comes. My machine will hopefully be here in another week or two!

Hope this helps,

I did check the heights and changed everything to .8 inch. same problem.

I redid the tool path using the bore command and that seems to work.

It would be nice to know if the function works.



It shows G98 as a supported code for the Buildbotics controller. Here’s a link for reference.

Could you change your R value to say R.25 and try that? maybe set Z zero high just incase and run it up above your part.


The r-.1 in your G81 line is what is causing it. That is the z Rapid position between hole locations.
It should be Z +.1

I am having this same issue. According to the documentation of G81 it should return to the last Z value if that value is greater then R. and only return to R if it is greater then the Z at the time of execution. My code below should return to Z5 not the R-2.35 but currently the retract is always to -2.35. G90 is declared at the top of my Code.

N915 G0 Z5
N920 G98 G81 X381 Y-381 Z-14.139 R-2.35 F254**

Looks like fusion 360 has a problem G98 should retract to the last Z before the G81. That being said your R should only be a negative if your drilling a surface that is below your Z zero. That is the purpose of G98 it allow the tool to rapid to a negative R but retract to above the surface of the part. G99 will retract to the R plane.

This also just happened to me. Simulation shows a proper retraction, no collisions. The drilling retracted but not to a safe distance, cutting through around 1/8 of material from the first drill to the second.


I’m having the same issue. Here is my code:

G90 G94 G17 G91.1
G53 G0 Z0
S18000 M3
G0 X1.063 Y1.063
G43 Z0.9 H1
G0 Z0.5
G98 G81 X1.063 Y1.063 Z-0.93 R0 F50

After drilling the first hole the tool should retract to the Z height before the G98 code was issued, since 0.5 is higher than 0. When I run the Fusion 360 simulator, that’s what happens. However the Onefinity only retracts to the R0 height. it appears that the G81 command is ignoring G98. I manually edited the G code file to change the R0 to R0.5 and it ran correctly. This appears to be a bug in the controller.

FYI I just noticed that if you look at the Cheat Sheet screen on the Controller, G98 is not supported, so is just ignored by the G81 command. I’m still somewhat new to this so I wonder if there’s some way to tell Fusion 360 not to use it when it generates the G code.

Make sure you are using the correct post processor in Fusion

I just downloaded version 43313 from Post Library for Autodesk Fusion 360 | Autodesk Fusion 360 and got the same result; i.e., it’s including the unsupported G98 code in the file.