Ingersoll Cutting Tools
Published

When Programmers Should Know G Code

The majority of programmers use some kind of CAM system to prepare their CNC programs. The product of any CAM system is a G-code program from which the CNC machine will run. While CAM systems simplify programming, most programmers have to know something about G code. How much they must know depends upon five factors.

Share

Leaders-In background

 

The majority of programmers use some kind of CAM system to prepare their CNC programs. The product of any CAM system is a G-code program from which the CNC machine will run. While CAM systems simplify programming, most programmers have to know something about G code. How much they must know depends upon five factors.
 
• How often are program modifications required at the CNC machine?
 
The more varieties of work a company takes on, the more often it has to handle new and unfamiliar processes. This often equates to imperfect CNC programs that must be optimized at the CNC machine, at the very least. More likely, unfamiliar processes will require more substantial program modifications once the job hits the machine.
 
Another condition that requires at-the-machine program changes is variation from one time a job is run to the next. Variations in material hardness, raw material, cutting tool selection and workholding setup will cause a program that ran well in the past to fail in the future. The long-term solution is to eliminate the variations, but if they occur, programs have to be changed at the machine.
 
Program modifications required at the machine must be done at G-code level. A programmer shouldn’t have to go back to the CAM system for every minor program edit. At the very least, programmers must be able to change cutting conditions such as speeds, feeds and depths of cut. With processing mistakes, programmers may also have to change the machining sequence— as in running one tool before another. They should also be able to catch and eliminate wasteful motions.
 
• How well optimized is the CAM system?
 
Most CAM systems allow users to fine-tune almost every aspect of CNC program creation. Doing so enhances efficiency and requires a good understanding of G code. Once the CAM system is optimized, a person with lesser G-code skills can use it. 
 
CAM systems vary with regard to how well optimized they are when they are first purchased. Some users set the defaults for worst case scenarios. While this may make them safer to use, especially for beginning CAM system programmers, the G-code programs they output will not be very efficient.
 
A programmer must be able to recognize wasteful G code. Programmers can watch a program run and notice obvious wasteful functions. These include wasted rapid motions such as approaching and retracting in one axis at a time as well as independently activated functions that could be activated simultaneously (such as spindle start within an approach motion).
 
Less obvious functions for machining centers include readying the next tool while the current tool is machining as well as orienting the spindle during the cutting tool’s retract to the tool-change position. Less obvious functions for turning centers include inappropriate use of constant surface speed, which can lead to wasted time; undue wear-and-tear on the spindle drive system; wasted electricity; and the absence of spindle range changes that can keep the spindle running at the appropriate speed for rough-machining operations.
 
There are many ways to improve the efficiency of G-code level CNC programs. In order to incorporate any of them into the G-code programs created by CAM systems, the programmer must understand the related G code.
 
• How complex is your work?
 
While CAM systems are great for simplifying complex work, they don’t tend to be as helpful with simple work. Generally speaking, many of the same tasks required to generate the program for a complex workpiece must also be done to create the program for a simple workpiece. For simple work, writing the program at G-code level (manual programming) may be easier than using the CAM system.
 
• How often are process changes made?
 
The more work you do of a similar nature, the more likely you are to use the same cutting tools for a variety of different jobs. If a process change is made that requires a change in cutting tools, it is probable that all of the programs that used the old cutting tool will need to be changed. The more programs you have, the more daunting this task will be. Depending on the complexity of the required changes, it may be faster and easier to make the changes at G-code level than from within the CAM system.
 
• Do you ever get program alarms when running new programs?
 
If a CNC machine sees a command it cannot execute, it will generate an alarm—regardless of whether the program was created manually or with a CAM system. The programmer must be able to diagnose and correct the problem that caused the alarm. While the alarms are pretty specific, it can still be a challenge to fix the program once the reason for the alarm is understood. A good understanding of G code will be required to do so.
Iscar
Ingersoll Cutting Tools
GWS Tool Group
Sumitomo
Horn USA
Kyocera SGS
Scientific Cutting Tools makes over 8,000 tools
IMCO
Paperless Parts
Hurco
Innovative Manufacturing for the Medical Industry
DN Solutions

Related Content

How to Choose the Correct Measuring Tool for Any Application

There are many options to choose from when deciding on a dimensional measurement tool. Consider these application-based factors when selecting a measurement solution.

Read More
Turning Machines

4 Commonly Misapplied CNC Features

Misapplication of these important CNC features will result in wasted time, wasted or duplicated effort and/or wasted material.

Read More

How to Calibrate Gages and Certify Calibration Programs

Tips for establishing and maintaining a regular gage calibration program.

Read More
Sponsored

Selecting a Thread Mill That Matches Your Needs

Threading tools with the flexibility to thread a broad variety of holes provide the agility many shops need to stay competitive. They may be the only solution for many difficult materials.

Read More

Read Next

Workforce Development

Building Out a Foundation for Student Machinists

Autodesk and Haas have teamed up to produce an introductory course for students that covers the basics of CAD, CAM and CNC while providing them with a portfolio part.

Read More

Registration Now Open for the Precision Machining Technology Show (PMTS) 2025

The precision machining industry’s premier event returns to Cleveland, OH, April 1-3.   

Read More

5 Rules of Thumb for Buying CNC Machine Tools

Use these tips to carefully plan your machine tool purchases and to avoid regretting your decision later.

Read More
Iscar