HCL CAMWorks
Published

G Code Basics

Here are five program-related tasks every operator should know.

Share

If your company is like most, you probably expect a lot from your CNC operators. In addition to loading and unloading workpieces, and activating cycles, operators are commonly expected to measure workpieces, report measured sizes, determine if sizing adjustments are necessary and, if so, adjust offsets accordingly. They may even be expected to perform non-CNC related tasks like cleaning and deburring workpieces, as well as certain preventive maintenance tasks. And to top it all off, operators are often expected to run two or more CNC machines at the same time.

You may be so busy training operators to perform these tasks that you are overlooking some other important program-related information. These are instructions that a programmer or setup person may take for granted, but if you do not include them in your training, the CNC operators may miss out on basic, but needed information.

1. How to find restart commands. It is often necessary to rerun cutting tools in a program. After a program’s execution is stopped and the reason for the stoppage has been addressed, the operator should not rerun the entire program just to get to the cutting tool that was active when the program was halted. Doing so would be a waste of time and could result in additional machining on previously machined surfaces (due to the absence of tool pressure). On most machines, the operator should instead restart the program from the cutting tool that was active at the program stoppage.

In such a case, if an operator is expected to restart the program from the beginning of a given tool, he or she must, of course, be able to find and scan to the restart command. For turning centers, this is commonly the turret index command. For machining centers, it is commonly the tool-changing command (unless the cutting tool is already in the spindle, in which case it is the command after the tool-changing command).

2. How offsets are instated. Most sizing adjustments are made with offsets, and production-run documentation should specify which offsets should be used for each cutting tool. Even better, operators should be shown which offset is involved with machining each workpiece surface. This way, they will know which offset must be modified when a machined surface must be adjusted.

Unfortunately, production-run documentation, if it exists, is rarely detailed enough, and operators often must figure out on their own which offset is being used to machine critical surfaces. Programmers tend to use unwritten rules for selecting offset numbers, like making the offset number correspond in some way to the tool-station number. If you expect your operators to determine on their own the offset numbers for sizing, be sure they know how offsets are instated within the program (with the last two digits of the “T” word on turning centers, and with “H” and “D” words on machining centers).

3. How to determine current modal states. Some odd things can happen if a modal state is inadvertently changed. One classic example is related to subprogramming. Maybe the programmer of a FANUC-controlled turning center specifies a G98 to call the subprogram when, of course, he should specify an M98. Even after diagnosing and correcting this issue, there will still be a problem, however. The machine will be in the feed-per-minute mode, and any feed rate intended to be in feed per revolution (G99) will be taken as feed per minute. Similar problems involve inadvertently activating certain programming features like mirror image, coordinate rotation and scaling. All of these can be difficult problems to diagnose.

Whenever a machine is behaving in an unusual manner, operators should know to check to see which modes are currently active. This means they should know the related G codes. FANUC controls show currently active modal information on the Program Check page. 

4. How to find and alter spindle speed and feed rates. Companies’ approaches vary in terms of how much program control they allow their CNC operators. One of the first freedoms they may allow experienced operators is related to modifying cutting conditions. This is especially true when the company encounters variations in raw materials. Maybe hardness variations are causing cutting tools to wear out faster than they should.

At the very least, operators should know the words related to speed (S) and feed rate (F), and what their values represent. Speed, for example is always specified in revolutions per minute (rpm) for machining center applications but often is specified in surface feet per minute (sfm) for turning center applications. Feed rate could specify feed per revolution or feed per minute, based on the set feed-rate mode. The operators should also know the G codes related to speed and feed-rate mode selection. With this information, they will at least be able to determine what the various speed and feed-rate words in a program represent.

5. How coordinates are calculated. While you probably don’t expect operators to be able to manipulate tool paths, you should want them to understand the positions through which the cutting tools are moving. Be sure they can determine where the program zero point is located (the origin for coordinates). This should be specified in the setup documentation. Point out that almost all X, Y and Z coordinates are specified from this location, and show them how these positions often correspond to workpiece drawing dimensions. With this knowledge, operators will not be working blindly and may be able to spot simple motion mistakes.

ProShop
HCL CAMWorks
JTEKT
VERISURF
Koma Precision
Hurco
QualiChem Metalworking Fluids
IMTS+
World Machine Tool Survey
Techspex
Paperless Parts
Innovative Manufacturing for the Medical Industry

Related Content

Sponsored

How this Job Shop Grew Capacity Without Expanding Footprint

This shop relies on digital solutions to grow their manufacturing business. With this approach, W.A. Pfeiffer has achieved seamless end-to-end connectivity, shorter lead times and increased throughput.

Read More
Sponsored

How to Mitigate Chatter to Boost Machining Rates

There are usually better solutions to chatter than just reducing the feed rate. Through vibration analysis, the chatter problem can be solved, enabling much higher metal removal rates, better quality and longer tool life.

Read More
Automation

Fearless Five-Axis Programming Fosters Shop Growth

Reinvestment in automation has spurred KCS Advanced Machining Service’s growth from prototyping to low-and mid-volume parts. The key to its success? A young staff of talented programmers. 

Read More
Sponsored

Continuous Improvement and New Functionality Are the Name of the Game

Mastercam 2025 incorporates big advancements and small — all based on customer feedback and the company’s commitment to keeping its signature product best in class.

Read More

Read Next

Sponsored

Increasing Productivity with Digitalization and AI

Job shops are implementing automation and digitalization into workflows to eliminate set up time and increase repeatability in production.

Read More
Software

IMTS 2024: Trends & Takeaways From the Modern Machine Shop Editorial Team

The Modern Machine Shop editorial team highlights their takeaways from IMTS 2024 in a video recap.

Read More
Workforce Development

Inside Machineosaurus: Unique Job Shop with Dinosaur-Named CNC Machines, Four-Day Workweek & High-Precision Machining

Take a tour of Machineosaurus, a Massachusetts machine shop where every CNC machine is named after a dinosaur! 

Read More
HCL CAMWorks