Universal Homepage Package W4900 Indicator
Updated Published

Five Areas of CNC Machining to Simplify With G Code

Optimizing G code to make CNC setup and operation simpler is a great way to improve CNC productivity and sometimes prevent errors.

Share

CNC programmer
Photo Credit: Getty Images

Simple tasks can be performed faster than complex tasks — and with less potential for making time-wasting mistakes. This includes tasks required to run CNC machines. Simplify the complex tasks that setup people and operators perform and, in turn, CNC productivity improves. Conversely, if people are required to perform complicated tasks, productivity will likely suffer. This is especially disconcerting if there is something that could be done to simplify the complex task.

There are countless things that can be done within G-code programs to simplify things for a setup person or operator. Indeed, when a CNC user is struggling with a task, it should be taken as a signal that something can probably be done to help. I offer a few suggestions in five disciplines here, but my primary intention is to inspire some aggressive awareness. Instead of waiting to see someone struggling, actively seek out tasks that could be simplified and dig in.

Documentation

All CNCs allow users to document messages in the program and most use parentheses to delineate them. CNC users commonly waste time trying to understand what is happening in a program when a clarifying message would have quickly answered questions.

Here are a few suggestions:

  • Always start a program with a series of messages that tell users what the program does. Include information like part and revision number, operation number and name, programmer name, date created and run time.
  • Provide tool names at the beginning of each tool, including the perishable component (insert) number.
  • Specify what the tool should have done (include surfaces to measure) at the end of the tool.

Program Zero Assignment

If your machining center workholding setups are qualified, include G10 data-setting commands at the beginning of the program to enter the program zero assignment values into fixture offsets. This will keep the setup person from having to reenter them every time the job is run.

If setups are not qualified, be sure to make it as easy as possible to perform the task of program zero assignment. The best way to do so is to have setup people use spindle probes that measure and enter the program zero assignment values. But if a machine does not have a spindle probe, know that anything done with a spindle probe can also be done with a conductivity-type edge finder. The only difference is that the setup person will have to manually move the edge finder into contact with each program zero surface. The G-code program will do everything else, including positioning the edge finder, determining program zero assignment values and entering them into fixture offsets.

Cutting Tools

With machining centers, if tool lengths are assembled and measured off-line, be sure to have the tool length measuring device create a G-code program including G10 commands that specify tool lengths. The setup person will load this program and run it once to enter all offsets. This will eliminate the time-consuming and error-prone task of entering offsets through the keyboard.

With turning centers, eliminate the setup task of entering tool nose radius compensation offsets. Manual programmers that include G41/G42 in their programs can use G10 commands to enter the related offset values. Those using a CAM system should make sure it generates tool paths based on the tool nose radius intended for use in setup.

Trial Machining

For machines that allow cutting tools to be rerun, like machining centers and fixed headstock turning centers, setup people know they must test cut surfaces with small tolerances. This involves adjusting the tool’s offset, letting the tool cut, measuring the surface, adjusting the offset and rerunning the tool.

Knowing a surface must be trial machined, users can include a test cutting command in the program using the block delete function (/). If block delete is off, the machine will test cut. If on, it will not. Include block deleted commands that initially set the trial machining offset, machine enough of the surface for a measurement, move to a convenient measuring position and stop (M00).  At this point, the setup person measures the surface, adjusts the offset and restarts the cycle.

Completing the Production Run

One production run task that can benefit from help from the G-code program is making sizing adjustments (though there are surely others).

  • For long-running jobs and especially for bar-fed lathes, users can program the sizing adjustments after observing how the cutting tools behave as they wear. Set up a counter that counts the number of parts that can be run before an adjustment is required. Use G10 to increase/decrease the offset and keep counting. The counter can also track how many parts can be machined until the tool is dull and stop the machine.
  • Eliminate the need for an operator to use a calculator to determine how much to adjust the sizing offset. Instead, let the operator enter the measured value (in a special offset or a permanent common variable). The G-code program can determine the amount of deviation and modify the tool’s offset accordingly.
Universal Homepage Package W4900 Indicator
DN Solutions
Hurco
Paperless Parts
SolidCAM
OASIS Inspection Systems
Koma Precision
Discover a variety of the best CNC machines
DNS Financial Services America
JTEKT
World Machine Tool Survey
Paperless Parts

Related Content

Basics

10 Things to Know About Creep-Feed Grinding

Because of the high material removal rate creep-feed grinding can deliver in challenging materials, grinding might not be just the last step in the process—it might be the process.

Read More
Basics

6 Variations That Kill Productivity

The act of qualifying CNC programs is largely related to eliminating variations, which can be a daunting task when you consider how many things can change from one time a job is run to the next.

Read More
Basics

Understanding The Four Major Behavioral Styles

Companies today are expanding the role of teams in the workplace in an effort to empower employees and improve organizational effectiveness. The more we try to work as a team, the more important it becomes to recognize that people exhibit different behavioral styles.

Read More
Basics

Selecting The Right Welder

Many machine shops, on occasion, have a need for welding. It may be for maintenance purposes, repair or to fill the odd contract. This story is a welding process primer for those shops whose main business isn't welding but need to know some basics.

Read More

Read Next

Encountering Surface Finishes in the Everyday World

Surface measurement is becoming increasingly important to ensure proper performance of a manufactured product. Advanced surface measurement tools are not only beneficial in the manufacturing industry but also have unconventional applications.

Read More
Turning Machines

A History of Precision: The Invention and Evolution of Swiss-Style Machining

In the late 1800s, a new technology — Swiss-type machines — emerged to serve Switzerland’s growing watchmaking industry. Today, Swiss-machined parts are ubiquitous, and there’s a good reason for that: No other machining technology can produce tiny, complex components more efficiently or at higher quality.

Read More
Basics

Obscure CNC Features That Can Help (or Hurt) You

You cannot begin to take advantage of an available feature if you do not know it exists. Conversely, you will not know how to avoid CNC features that may be detrimental to your process.

Read More
Koma Precision