Skip to content
From Cutting Tool Engineering

Becoming Familiar With Code: General Industry Coverage

With the advent of CAM software, generating G code is no longer the big deal it was a few decades ago. A CAM system will generate all the G code you need in a matter of seconds. Presented here is the first part of a multiple-part series of columns on the subject.

October 15, 2016By James Harvey

With the advent of CAM software, generating G code is no longer the big deal it was a few decades ago. A CAM system will generate all the G code you need in a matter of seconds. Presented here is the first part of a multiple-part series of columns on the subject.

Becoming Familiar With Code

An adapter plate can be machined using manually written code. Image courtesy J. Harvey.
An adapter plate can be machined using manually written code. Image courtesy J. Harvey.

Becoming Familiar With Code

“G code” is an all-encompassing, informal term used when referring to CNC programming code. For example, when troubleshooting, you may hear someone say, “The drawing is correct; the problem must be in the G code.” This means the problem is in the CNC program. Not all controllers use the same G code, but, generally, there are many similarities.

Finish task to continue reading

Review the print ads from this magazine to continue

This quick advertiser review unlocks the rest of the article and keeps the full-screen reader focused on the ads instead of the page chrome.

Advertisers included in this article experience

Print placements connected to this article

Supermill.

We bring it!

When it’s a matter of machining difficult materials, achieving maximum productivity, creating geometries and coatings designed for your applications, the choice is clear. Top of the line for 25 years. New catalog. New website. New tool styles. Breadth. Depth. Precision crafted products. Superior end mill performance. We bring it!

We bring it! When it’s a matter of machining difficult materials, achieving maximum productivity, creating geometries and coatings designed for your applications, the choice is clear. SUPERMILL. Top of the line for 25 years. New catalog. New website. New tool styles. Breadth. Depth. Precision crafted products. Superior end mill performance. We bring it! Tomcat Best for HSM Steel

Print page 11

Visit Supermill. View this placement in the issue record

Learning G code may seem tedious at times, but becoming familiar with it is necessary to edit programs at the machine. As good as CAM systems are at spitting out G code, if you don’t know the functions of the code and how to edit it, you will be at a disadvantage in terms of making adjustments at the machine. Many unproven programs have issues that must be fixed or fine-tuned.

The majority of machining operations can be undertaken with just a handful of G and M codes. G codes can loosely be described as tool-positioning codes, and M codes as switches for actuating mechanisms, such as the toolchanger, the chip auger and valves that open and close to allow and restrict coolant or air flow. M codes have other functions as well. If you’re new to CNC programming, it may look complicated. However, simple patterns will soon emerge that appear over and over again.

Now that machining operations are created with CAD/CAM applications, G code can be output for a specific machine using the appropriate post-processor, which is just a computer file. With the correct post-processor, incompatibility is not that much of a problem anymore, at least not for computers. Operators may still have issues with variations in G code as they move from one machine to another.

Writing programs manually is a good way to become familiar with G code. I have always preferred learning something by doing a project, so that’s how I’m going to present the material for this series of columns. Specifically, in the December issue of CTE, I will present a manually written program for machining an adapter plate. The adapter plate is similar to one I made for a hydraulic valve for an existing molding machine.

Glossary terms in this article

  • toolchanger
    Carriage or drum attached to a machining center that holds tools until needed; when a tool is needed, the toolchanger inserts the tool into the machine spindle. See automatic toolc…
MFGAxis MFGAxis Discussion Be part of the shop-floor conversation Like, save, or comment on this CTE story.
Be the first to engage.

MFGAxis Discussion

Be the first to engage.
Scroll for the next article