NTMA
Published

Macro Economics

Instead of NC programs that are dedicated to particular parts and machines, this plant now uses macro programs that react to geometric variations across broad part families. The plant wrote these macros itself, and the return on this investment has been dramatically greater productivity.

Share

Leaders-In background

In theory, CAM software offers a fast, easy and flexible way to generate the NC code to machine a part. If the CAD geometry is clean and complete, then the programmer simply needs to make the right choices in CAM to allow the software to quickly generate even a long machining cycle for a part in need of numerous machining operations.

However, in practice, there are various reasons why the resulting NC program might require further attention before the part can be produced effectively. Any of these problems might arise:

  • A cutting parameter such as speed, feed rate or depth of cut may need to be changed because an intended tool is not available, or because the properties of the workpiece material proved to be different than expected.
  • A tool path may need to be slightly modified. Perhaps a drill needs to penetrate a little farther, or perhaps a machined feature requires a small and simple geometric change.
  • A chosen machine may not be available. The program may therefore need to be rewritten for the capabilities of another machine, or at least postprocessed for a different control.

When faced with one of the first two problems, an experienced operator might be able to wade into the NC program to make the appropriate change directly through manual editing. Needless to say, relying on this approach is risky. Far more often, the only practical way to deal with any problems like these is to return the program to the programmer.

Black Box


The production facility for Sandvik Mining and Construction in Mansfield, Texas, faced all of these problems. With three programmers, the plant was short-staffed. Machine tools often sat idle because programmers could not supply programs fast enough to keep up with production demand. The need to rework programs because of problems like the ones described above only added to the programming demand.

Since then, the plant lost a programmer—now there are only two. However, machines no longer sit waiting for programs. The difference, according to senior CNC programmer Guillermo Bosque, is that single-use NC programs have been replaced by macros that reside at each machine tool’s CNC. In many cases, an operator does not even need to rely on a programmer anymore, but instead can simply input the correct geometric variables to describe the part for the appropriate macro. Rather than being a dedicated program for one particular part, this macro is instead a “black box” (to use Mr. Bosque’s term) that generates the correct tool paths according to the entered part variations.

With this approach to programming, machine tools are now interchangeable. Machines with very different configurations and controls are equally ready to make a given part because the relevant macros have been written for these machines. The only dedicated “program” consists of the variables describing the part. Thus, there is no postprocessing of programs for the intended machine tool—variables can simply be entered at the available machine.

Operators are more interchangeable, too. Simply by adjusting the variables that the macro reads, a very experienced operator and a very inexperienced operator can both adapt the machining process as needed with a similar level of success.

Mr. Bosque was tasked with writing these macro programs. Initially, he wrote them by hand on a pad of paper. He says that by implementing macro programming in this way, the company has made the production process more lean. In fact, he bristles just a bit at the term “lean” as it is often applied, because he thinks many plants “go lean” by streamlining processes that are fundamentally inefficient from the outset.

He asks: What about going back to the beginning instead?

That is, what about questioning the very first step in the process by which a model becomes a finished part?

Family Matters


Relying on macros this way requires a family of parts, Mr. Bosque says. A job shop could not program in this way. Most of the machining in his plant does involve family parts, even though a family can be quite large. In fact, thanks to special orders, the part families can acquire new members on a routine basis.

The products this plant manufactures are bits and pneumatic hammers for drilling wells and other deep holes in the ground. Pistons, stems and cases for the hammer assemblies all have designs that vary according to the size of the bit, the style of the hammer and the equipment the customer is using to drive the tool. The bits themselves range in size from 3 to 30 inches in diameter, with earth-cutting geometries that are either specified or customized for the conditions of the soil and rock in the customer’s application. Each bit features some particular pattern and combination of sludge grooves, flushing holes and holes for carbide buttons. Despite the variation, though, the geometry of a bit can be completely defined using a set of 10 to 20 variables entered into the macro program. By looking at the part print, either the programmer or the operator can quickly identify and enter parameters such as the bit diameter, the quantities and sizes of particular hole types, the angular positions of particular holes (around the circle of the part) and the angles of penetration of various holes. In cases where speeds or feed rates may need to be adjusted after the part is at the machine, these parameters are available as input variables as well.

When writing the macros that rely on all of these variables, Mr. Bosque says he simply thought slowly through the logic by which he or another programmer might generate the program for a particular part. The macros that resulted from this work use “if/then” statements to select tools and machining processes based on the variables and even to check for data-entry errors. The macros also use trigonometry, as angles of the part are used to determine tool paths or part orientations, particularly in 3+2 machining.

Taking the time to write these programs did represent an investment for the plant, but not a large one. Mr. Bosque spent about two weeks writing and proving out the macros for the first of the plant’s machining centers to be programmed in this way. The first lathe to receive macros required less time than this. After that, writing macros for subsequent machines was much easier, because the existing macros could simply be adapted. Later on, macros were also written for a machine that is both a machining center and a lathe—the multitasking Mazak Integrex e-650H, which can completely produce many of the shop’s larger parts that formerly would have required multiple setups on different machines.

The “e”-series Integrex is the newest, largest and most sophisticated machine tool in the shop. The effectiveness of such a machine tool might normally be expected to depend on the effectiveness of the postprocessor. However, because this machine arrived at the Sandvik plant after macro programming was already established, the postprocessor for this machine has yet to be used.

Programming Vs. Productivity


Freeing programmers to initiate machining more quickly, along with freeing operators to reliably make certain machining modifications on their own, has dramatically increased the plant’s machining output. In the past, the programming department often needed to generate 40 new NC programs in a day. Given this workload, the plant simply became accustomed to the idea that programming could be a bottleneck, and that some machines would sit ready and waiting until the moment when a program was ready to go. Once the plant started using macros, however, one CNC machine increased its productive output by 40 percent. Other machines showed comparable gains. At the very beginning of the plant’s investigation into macros, there was a question of whether it would be worth the expense of $700 to upgrade the control of one older machining center to allow macro programming. But at the rate of increased output that this machine ultimately realized, the $700 investment was repaid in less than one week.

Old machines and new machines now perform more interchangeably than ever before. It is still true that every different CNC speaks its own dialect. Different CNCs, therefore, require different macros to perform the same work (just as they require different postprocessors). However, this need for different macros was Mr. Bosque’s problem—and it was a one-time problem. The macros for the different CNCs have now been written to perform identically, from the operator’s perspective, from one machine to the next. Regardless of the type or model of the control, the operator knows where in the program file to enter the numbers for the variables that change from part to part.

As a result, in the process of freeing the shop floor from programming bottlenecks, the plant has also overcome a common source of inefficiency in machine shops—the fact that some operators are knowledgeable about only certain controls. Some shops insist on using only one control type throughout the shop for this very reason. By contrast, the Mansfield plant will continue to use an odd mix of CNC machine tools from a variety of different suppliers without having to pay a penalty in terms of the flexibility of its shopfloor personnel.

Back To CAM


The next step will be to make programming even easier. Since implementing macros, the shop’s scrap rate has dropped to one-fifth of what it used to be. However, the need to manually input variables based on dimensions of the part’s features still leaves room for error. Therefore, the plant is now working within its CAM software to devise a system for inputting the variables automatically, Mr. Bosque says. The plant will read the CAD model into CAM not to generate an NC program in the same way that it used to, but instead to extract the appropriate variables so that it can generate the macro programs with the variables already filled in. In this way, Mr. Bosque says, the plant will return to more widespread use of CAM.

Gardner Business Media, Inc.
NTMA
NTMA
Become a NTMA member today!
To any Measurement Question there is an Answer
MMS Made in the USA
World Machine Tool Survey
Innovative Manufacturing for the Medical Industry
IMTS+
SolidCAM
Pat Mooney Saws
DN Solutions
715 Series - 5-axis complete machining
High Accuracy Linear Encoders
PMTS 2025 Register Now!
JTEKT

Related Content

Generating a Digital Twin in the CNC

New control technology captures critical data about a machining process and uses it to create a 3D graphical representation of the finished workpiece. This new type of digital twin helps relate machining results to machine performance, leading to better decisions on the shop floor.

Read More
Automation

Cutting Part Programming Times Through AI

CAM Assist cuts repetition from part programming — early users say it cuts tribal knowledge and could be a useful tool for training new programmers.

Read More
CAD/CAM

Can ChatGPT Create Usable G-Code Programs?

Since its debut in late 2022, ChatGPT has been used in many situations, from writing stories to writing code, including G-code. But is it useful to shops? We asked a CAM expert for his thoughts.

Read More
Sponsored

ERP Provides Smooth Pathway to Data Security

With the CMMC data security standards looming, machine shops serving the defense industry can turn to ERP to keep business moving.

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
NTMA