Skip to content

Tips, Tricks and Best Practices for Efficiently Generating Productive CNC Programs

Kip Hanson
By Kip Hanson Contributing Editor, SME Media

Last May, the consulting firm Deloitte and The Manufacturing Institute—the workforce development arm of the National Association of Manufacturers (NAM)—published a joint study. Among its many alarming conclusions was the news that finding the right manufacturing talent “is now 36 percent harder than it was in 2018, even though the unemployment rate has nearly doubled the supply of available workers,” and that the “skills gap in the U.S. could result in 2.1 million unfilled jobs by 2030.”

CGTech-DSF0719.jpg
For most machining operations, consistent chip thickness requires continuous adjustment of the programmed feedrate. According to CGTech, its Force product is the best way to achieve this. (Provided by CGTech)

Defining the Need

The solution, of course, is automation. Lots and lots of automation. When lathes, machining centers and other CNC machine tools have robots tending them, much of the angst over finding skilled operators falls by the wayside. Not only that, but with some additional investment in automated workholding, machine monitoring software, in-process probing systems and no small amount of effort and planning, machine shops can gain a shift or two of unattended operation.

It won’t be easy—and some will be more successful at it than others. But rest assured that American manufacturing will find its way past this seemingly disastrous situation, just as it has so many others.

Except for one thing: Robots can’t program themselves—not yet at least. Nor can they program the CNC equipment they’re responsible for keeping operational. Until they’re able to perform this complex task, the machining and sheet metal fabrication world will still need CNC programmers—people skilled in manufacturing and proficient with computers and software systems.

There’s certainly no lack of people with these skillsets. Those who belong to Generation Z and even many Millennials began using mice and keyboards while still mastering their ABCs. Unfortunately, there are no shortcuts to teaching them about manufacturing, CNC machine tools and the most effective way to drive end mills and turning tools through big chunks of metal. It takes years of training and experience before most shop folks make the leap to programming, during which shops will continue to struggle with the ongoing shortage of skilled CAM operators.

Even here, though, there’s good news on the horizon: CAM systems are getting smarter by the day, thus lowering the proficiency bar to some degree. Automated feature recognition, knowledge-based machining, advanced toolpath simulation and digital twins are just a few of the CAM technologies making programming more of a technical exercise than the tribal knowledge-inspired art form it has long been.

No Tricks, Just Hard Work

There are very few “tricks” to programming CNC machine tools. Developing accurate, efficient toolpaths depends in large part on the programmer’s skill as a machinist, together with the CAM software’s capabilities. The job is getting easier as CAM becomes more intelligent, but it remains challenging work—and very few machine shops can boast they have no room for improvement.

HCL-3X-Mold-Machining.jpg
According to HCL CAMWorks, one of the keys to fast, easy toolpath generation is reliance on advanced programming features such as automatic feature recognition and knowledge-based machining. (Provided by HCL CAMWorks)

Marc Bissell of Scottsdale, Ariz., certainly thinks so. A senior applications specialist for HCL CAMWorks, he offered a number of recommendations on how to make machine tool programming easier and more effective:

Fully document tool assemblies, tool and fixture offsets, machine setups and CNC programs. Bissell noted that in many shops, particularly job shops, this documentation is often an afterthought and left incomplete due to the pressures of getting parts delivered on time. CNC machines are like player pianos, he said—if everything is identical to the last time the job was running and making good parts, you can push the cycle start button and make a good part the first time.

Take the time necessary to set up your CAM software to get the most out of your investment. This includes thorough training, the establishment of standardized tooling and the creation of virtual tool cribs for each CNC machine tool. Doing so can take time but is a worthwhile investment—a few hours upfront can save tens or hundreds of hours over months and years.

Record and store proven feeds, speeds and depth of cut (DOC) values for a given material along with each tool assembly. If the CAM software is capable, this information, along with specific machining strategies for features such as tapped holes and milled pockets, should be stored within the system’s database. This allows easy—and sometimes automatic—retrieval on repeat jobs, depending on the software.

Standardize programming and machining practices, enabling all the shop’s programmers to create consistent, accurate programs. In many companies, it’s all too common to see individual programmers go their own way, with different tools and workholding devices as well as feeds, speeds, DOCs and even program formats. If you want to be successful, he advised, programmers need to work as a team to determine the best manufacturing processes and practices for the benefit of all. 

“Perhaps the most important tip I give to customers is to learn everything they can about their tooling,” Bissell said. “This may sound very basic, but it’s surprising how few programmers take the time to study their cutting tools and inserts and learn how to apply them in specific materials.”

Tool suppliers are often a great source for this information, he added. Without their input, it’s easy to end up with extended cycle times, poor-quality parts, shortened cutter life and broken tools. “Also, cutting parameters can vary depending on whether tool life or cycle time is the top priority, making it critical that programmers know what values to apply if they’re to realize the desired results.”

Moving Beyond Pretty Pictures

Another step toward achieving the desired results is to rely on toolpath simulation for program prove-out; this starts with creating an accurate digital twin. That’s according to Derek Patrick, product manager for production software at Hexagon’s Manufacturing Intelligence division, North Kingstown, R.I., makers of ESPRIT CAM. He pointed out that synchronization of the virtual world and the physical one is key to successful programming.

ESPRIT.jpg
Programming a multitasking CNC lathe requires mastery of the various synchronization codes used to control the machine’s different axes of motion. (Provided by Hexagon Manufacturing Intelligence)

“In order to generate a simulation that the user can truly rely on, you first need a very accurate capture of the machining environment,” said Patrick. “This means defining the kinematics of the machine tool, its control parameters and mechanical behavior, the different tool lengths and work offsets and everything else that will impact the finished part—all of which must be precisely choreographed with NC-code for the various machining operations. Without all that, you’re merely looking at pretty pictures that don’t necessarily reflect reality.”

This step is especially necessary with multitasking lathes, mill-turn machines and Swiss-style CNC equipment, all of which present huge opportunities for cycle time reduction through simultaneous operations. Unfortunately, these wonder machines also present significant crash potential, which is why many programmers might choose to take a less arduous toolpath generation journey and avoid such optimization.

But by spending the time to establish accurate simulation, it becomes much easier to create even the most complex G-code. “Virtual twinning is a very easy—and ultimately much less expensive—way to perfect any machining strategy, multi-axis or otherwise,” he said.

The caveat, though, is production quantity. Patrick pointed out that it doesn’t make much sense to optimize a complex machining process when you’re only making a handful of parts. If you’re producing thousands of them, however, that’s a game-changer. “So even though some systems now make it much easier to manipulate the different axis motions, place the synchronization codes in the correct place and see in great detail how the code all fits together, the programmer should still take time to decide whether there’s a payoff in doing so,” he said.

Forget About Feed Rates

Someone who feels quite strongly about the benefits of toolpath simulation and optimization is Pete Haas, Vericut product specialist at CGTech Inc., Irvine, Calif. He and his colleagues are staunch advocates for the virtual world and are more than happy to discuss the company’s flagship product at great length. But Haas suggested that many programmers should address a more fundamental concern than simulation: improper feeds and speeds.

“While working for a large company some years ago, I did a Six Sigma project as part of my Green Belt certification,” Haas recalled. “For two years, I collected data on various machining problems. When we put it all into a Pareto chart, it quickly became evident that the programmers were more often than not using the wrong feeds and speeds; usually, they were running everything too slowly for the cutting tools and materials.”

This reinforces what Bissell said earlier: Programmers would do well to lean on their cutting tool suppliers for feed, speed and DOC recommendations. Couple that with widespread access to a wealth of online machining information sources, and there’s little reason any programmer should be applying improper machining values.

Yet Haas indicated that the problem runs deeper than that. Based on studies CGTech has conducted in collaboration with Okuma, Sandvik Coromant and others, he now recommends that programmers quit thinking about feeds and speeds and start thinking about chip thickness instead. “We know that cutting tools perform far better when the chip thickness is constant,” he said. “But as cutting conditions change throughout the toolpath, the feed rate needs to compensate or you won’t achieve constant chip thickness. This is the idea behind our Force product.”

Take It Easy

Aside from investing in Force, Haas advised that shops apply newer programming strategies such as high-speed milling (HSM) and high-efficiency milling (HEM), also known as peel milling. With relatively light radial cutter engagements and far faster feed rates than offered by traditional toolpaths, these cutting methods are not only easier on the machine tool but result in higher metal removal rates, less heat in the cut and lower tool wear.

Mastercam expert Ben Mund couldn’t agree more. A senior market analyst for CNC Software LLC, Tolland, Conn., he suggested that the company’s Dynamic Motion and similar high-performance strategies are a no-brainer for anyone looking to reduce cycle time. That said, he recommends that the adoption of any new toolpath approach be done gradually. “Shops should get their training up to speed and fully understand the process before attempting to pull in a new type of toolpath.”

Mastercam-5-axis-turbine-programming-focus.jpg
When faced with difficult programming tasks or unfamiliar toolpaths, it’s often easier to break the job down into smaller, more manageable components. (Provided by CNC Software LLC)

For example, most CAM companies offer sample files that can be used to familiarize oneself with the technology before diving in on customer parts. Mund said to play with these for a while and see how everything works in a simulated environment. Also, make sure that any basic training needs have been met before moving into more advanced toolpaths. Each of these steps will establish realistic expectations upfront and avoid scrapping expensive parts or breaking equally costly cutting tools.

Mund offered an example from CNC Software’s machine shop, where some of the application people were working on a complex aerospace component for one of their customers. At the same time, they also wanted to try new toolpaths from the development department. Rather than generate the entire program at once, they programmed each section individually, “taking apart the watch” to understand how it worked. It was only after they were comfortable with the results that they moved on to the rest of the part.

Said Mund, “They told me the same thing I’m suggesting here—start small, and work on the simple things first until you understand the results. Break programming jobs down to the smallest logical components possible. Once you have a little bit of experience under your belt, it’ll be much easier to expand out to bigger projects.”

Keep on Truckin’

Ernie Dickieson, a technical sales specialist at Boston-based Open Mind Technologies USA, developers of the hyperMILL CAD/CAM suite, offered advice in keeping with the company’s name: have an open mind.

“People are stubborn,” he asserted. “Much of the industry suffers from an attitude of, ‘Well, that’s the way we’ve done it for the last few years. Why would we change?’ It’s often not about having the best tool. It’s about having the tool that you’re most comfortable with. And like anything else, you’re not going to move forward if you’re only staying within your comfort zone.”

One of the best ways to change this mindset is to capture company best practices, Dickieson added. And for that, he advised what was mentioned earlier: Establish a robust database that contains clean, accurate data relevant to your shop’s machining operations. For instance, capture the entire cutter assembly—one that includes the cutting tool, extensions, the toolholder and the hardware that holds it all together.

The same is true for the vises, chucks and other workholding devices; the rotary table if one exists; and, in the case of turning equipment, the entire turning tool assembly should be checked. This is the only way to assure realistic simulations of the machining environment, experts agree.

Of course, it takes more than hardware and machine tool models to simulate toolpaths. Cutting tool data with proven feeds, speeds, depths of cut and various cutting strategies must also go into the database, Dickieson said. “Once everything’s in there, the programmers will never have to worry about it again. The NC code will come out clean and consistent no matter who’s generating it, and the programming itself becomes much faster. A well-implemented CAM database just makes everything easier.”

In summarizing his thoughts on CNC programming best practices, Dickieson explained: “CAM is getting quite powerful. To me, it has evolved from basic toolpath generation software to more of a process development tool, so when the operator pushes the green button, there are no surprises. It’s also making it easier for less seasoned people to program CNC machines, especially if you’ve gone through the setup efforts I just suggested. And for experienced programmers, they’re now able to focus more on how they want the toolpath to work, as opposed to if it will work, and whether they burn up the cutter on the first part. These capabilities are what make the difference between a great CAM system and one that’s just mediocre.”

  • View All Articles
  • Connect With Us
    TwitterFacebookLinkedInYouTube

Always Stay Informed

Receive the latest manufacturing news and technical information by subscribing to our monthly and quarterly magazines, weekly and monthly eNewsletters, and podcast channel.