A note on Fusion 360 for the big CNC

The gcode emitted by Fusion 360 using the default settings does not work on our big CNC. Rama figured out that manually editing the gcode and removing the first six lines gets around the issue.

I was curious about this and decided to investigate. I reverse-engineered the codes in the preamble, but all seemed to be perfectly valid Mach 3 g-code. Finally, I found the culprit: G28.

g28screenshot

It turns out that there’s a simple solution: Click post process to create the gcode.  Then open the Properties pane and un-check useG28. This option also controls some related codes at the end of the file.

g28codeshot

I do not recommend deleting the entire six-line preamble! It sets up various values in Mach 3’s brain, and omitting them may be give unexpected results. It sets units to Metric or Imperial, for example. If omitted, your job might be unexpectedly scaled to a weird size.

That’s all you really need to know! Read on if you’re interested in the details.

The issue is covered in this article:

http://discuss.inventables.com/t/learning-about-g28/12205

Briefly, G28 is used to return the cutter-head to the home position. If your CNC machine has end-stop switches, Mach 3 can be configured to move to the physical limits of its travel, which is often a convenient parking place for the cutter-head at the end of the job. It also resets Mach 3’s zero position in case you have some kind of permanent workpiece mounting arrangement that always positions the workpiece in the same place.

We don’t use the big CNC this way. Instead, we mount workpieces in a variety of ways and manually set the zero position before each the job. The article above makes a case for implementing G28, but I don’t think it’s applicable for us.

I figured this out by digging into the code. It turns out that the tool-path is converted to gcode by a nicely commented Javascript program. Search your system for ‘mach3mill.cps’ It will be buried down in the bowels of your application tree somewhere, and is probably in a different place for PCs vs. Macs. I looked for the G28 code, found it was controlled by an option, then finally googled for that option to locate the above post. Anyway, it’s good to know that we have flexibility if we need to further customize gcode generation.

2 comments

  1. FloppyDisk says:

    Hmmm, that’s good to know. On a side note, I’ve successfully used HSMExpress with Solidworks and selected the Mach3 post processor output and it worked for me on a few projects. I think (not sure) that HSM express will also work w/ Fusion 360, HSMexpress and Fusion 360 are both autodesk products. Eitherway, I’ll look out for that pesky G28!

Comments are closed.