What’s Next for G-Code?

Marti Deans June 18, 2019 8 min read

g-code

 

Your cell phone, your laptop, and maybe even your car all run off some type of code. Have you ever had to read it or edited it? Have you ever even seen it? Unless you’ve hacked into your own phone lately, probably not.

 

Yet, in the machine shop, it’s fairly common practice to be familiar with the code that runs the machine, and many people still make hand edits or even write full programs by hand. Would you know how? Maybe more importantly, given advancements in the industry, should you know how?

 

At minimum, a fundamental understanding of  G-Code—CNC’s programming language—gives you a fast way to trouble-shoot, change feeds and speeds without editing the CAM program, and even to machine a simple part. At maximum, there are machinists who still program parts by hand, either because they want to or because their shop doesn’t have CAM software. Because it’s still a useful skill to have and an excellent compliment to CAM software savvy-ness, we recommend CNC programmers learn G-Code fundamentals. Know enough to troubleshoot and tweak. More if you can. It’s a language that will help you operate any machine any where…with a little help from your machine’s documentation.

 

Learning the dialect

 

Unlike manuals that come with our headphones and vacuum cleaner, make sure you keep your machine manual around. Those manuals contain useful programming information, including a machine’s specific G and M codes that you’ll use to get the most out of your machine.

 

But if all machines speak the same G-Code language, why do you need to know your machine’s specific dialect? Each machine has different capabilities, like lathes with dual spindles or mills with optional automatic tool changers. Different capabilities and configurations require different codes. And if you buy an upgrade, that means you need additional code to drive that additional functionality.

 

All these dialects make it hard for CNC programmers to jump in and hit the ground running on a new-to-them machine. So why don’t we have standardization? See friendly competition above. The goal for manufacturers is to get their machines and new features to market, and win the business of machinists like you. Standardizing information would require an enormous effort from all machine vendors, so it becomes secondary.

 

Until the industry comes together to find a way to make G-Code more cohesive, we have postprocessors. Think of them as the translator for all these different dialects. Most CAM companies or resellers offer post processor customization for a fee, typically around a couple hundred dollars. Autodesk offers fully customizable postprocessors for more than 100 CNC machines and controls for free with Fusion 360. Hopefully there’s one there that works for your machine, but if you need to make edits we allow you to do it yourself or you can find an authorized reseller to make changes for a fee on the Services Marketplace.

 

The way we interact with G-Code is changing

 

If it happens at all, it will take a long time before we see any sort of standardization with G-Code use. But because the way we interact with G-Code is changing, and will continue to change, it might not really matter.

 

Machine simulation software, like CAMplete TruePath, gives CNC machinists another reason to not learn G-Code. Simulation tools help confirm your toolpaths, fixturing, and machine components won’t interfere with each other, all well before you’re actually executing code on the machine. Some even post the G-Code themselves, solving singularities and other issues that can arise. Similarly, toolpath verification tools like backplotters allow you to check the code before it hits the shop floor. While not necessarily a full simulation tool, the software reads the code and shows you the results so any unplanned moves are caught and fixed.

 

Fusion 360 posts directly to CAMplete, one of the machine simulation programs we just discussed. As machine tool technology and CNC machines themselves become more advanced and complex, simulation will become an even more important step before heading to the machine.

 

The one gap in all this technological advancement lies in the “fixing things” step. If your simulation tool tells you there’s not enough clearance between your machine components, you have to go back and fix it. That means going back into the CAM system, making the fix, and pushing it back to simulation.

 

Even taking out the simulation step, if you you realize there needs to be a change after running the first part, you have to go back to your CAM system, make the change, regenerate your tool path, post your code again, and then start executing the revised operations. And hopefully write the change down somewhere in case you need to remember it later. That’s a lot for one person to handle on a regular basis.

 

I suspect there are companies and machine tool manufacturers out there working on ways to streamline the processes between CAM, controller, and machine. We may see controllers connect back to a PC or laptop to talk to CAM systems without the need run lines of code. I’d call that level of connectivity an industry disruption.

 

Controllers become more intuitive

 

machine programmin

 

Enough with the typing and button-pushing.  What if you could talk to your machine like you talk to your phone? It’s coming.

 

iTSpeeX developed a voice-operated assistant for CNC machine tools called Athena. Instead of using a push-button interface, the user gives a command using a dedicated headset.

 

For control, you might say, “Athena, begin warm-up sequence”. Or, “Athena, run job number 214”.  Athena repeats the command to you before performing it to make sure you understand each other. Then it runs the command.

 

I see Athena offering the most value as a maintenance and teaching tool. The device searches machine manuals and shop documentation to answer questions. “Athena, how do I change the coolant?” you might ask. Athena walks you through the process. It also gives you access to drawings and other reference materials that you can view as you go through the steps.

 

Athena has the potential to save operators tons of time in searching for information. And as a teaching tool, it’s awesome. When your shop brings in a new hire, Athena can act as their mentor.  Athena can guide them through steps on how to perform certain tasks, freeing up the shop manager for his or her regular shop-managing duties.

 

If you’re working on a new-to-you machine and need to change a tool, Athena will give you the code to do it. Athena works on any machine, any brand. (In other words, she’s got the instruction manuals down.) Suddenly, the learning curve that comes from figuring out all those different G-Code dialects gets a lot smaller.

 

Keeping you informed

 

Haas also has a couple new products that serve as an example of how much technology is changing our field. Haas Connect, a machine monitoring system that works on your phone, gives you live machine status for Haas machines. It will send you, and whomever else you designate, email notifications about the status of your machines. When you’re running machines unattended, you’ll know they’re running smoothly and get a notification if they’re not.

 

The Haas M130 Media Display M-Code lets machine operators and programmers communicate directly from the Haas control as a CNC program runs. You can display CAD images, setup instructions, tool lists…any kind of data. When the program reaches an M130, it displays that image or instruction on the control screen. The operator sees it and (hopefully) knows what to do. No more taping instructions to machines.

 

One of the most intuitive and easy to use controls I’ve ever seen comes on the Datron new. While it’s not fundamentally changing the program-post-run process, the control is essentially a touchscreen tablet bolted to the machine that’s equipped with Datron next software. Visual controls help guide you through operation, intuitive touch options like drawing a probing path make setup easy, and a camera on the spindle helps you see what’s happening inside the machine.

 

Finally, of the many apps that come and go for machinists, this one should stick around: CNC Machinist Calculator. The up to date app features turning, milling, drilling, gun drilling, and thread calculators, as well as more than 20 other functions. Calculate and export the G-Code. It’s available for iOS and Android.

 

The move to connected platforms

 

These are only a few examples of products that are helping lower the entry barrier to CNC machining. You don’t have to know lines of G-Code—or any G-Code—to make these things work. Instead of manual code, we have intuitive tools we’re familiar with—voice commands, apps, and software.

 

Across industries there’s a move towards connected platforms over discrete tools. Connecting some of these workflows from CAM, to simulation, to operation might be an indication that machining is moving in that same direction. It wouldn’t shock me to see some more formal offerings from CAM providers and machine tool providers alike in the near future. No matter how the industry evolves, G-Code isn’t going away anytime soon. To get the most out of your machine, and create the coolest products with the least amount of hassle, learn the fundamentals of our industry’s universal language.

 

Ready to see what you can do with (and without) G-Code? Try Fusion 360 for free today.

 

Tags and Categories

Get Fusion 360 updates in your inbox

By clicking subscribe, I agree to receive the Fusion 360 newsletter and acknowledge the Autodesk Privacy Statement.