The power behind shop automation
Diminishing numbers of skilled tradesmen in the workforce and the need to reduce production costs have caused machine tool automation to proliferate during the past decade.
Diminishing numbers of skilled tradesmen in the workforce and the need to reduce production costs have caused machine tool automation to proliferate during the past decade. At one time, only the largest manufacturers took advantage of machine tool options such as part probing, tool setting and conversational programming. Often, these options were only available on more expensive machine tools and out of reach for most small shops. Now, even the smallest, lowest-cost, commodity machine offers probing and tool setting.
Parametric programming is the vehicle that drives these automated processes. Parametric programming stores data in external tables or files, rather than within the part program itself, and the program accesses the data when needed. This enables users to change data values with relative ease.

Courtesy of All images: C. Tate
Figure 1. The flange and inlet are probed, and the coordinates are used to calculate the position of the oblique exit face.
In addition, parametric programming is typically the foundation on which a macro program is based. Macro programs drive part probing, tool setting and many canned cycles found on a conversational CNC. Macros allow the user to invoke numerous program commands with only a few characters.
Macro programming and parametric programming are independent concepts. However, the machine tool world has adapted “macro” to describe all of the functions associated with parametric and macro programming. Therefore, I will use macro in the same context throughout this article.
Macros are a powerful tool and available on almost every machine tool control. Macro programming allows a programmer to be creative, and creativity can help drive efficiency.
CNC code consists of basic commands that control the direction of tool motion, cutting speeds and machine tool functions. Macro programming lets the machine “think” by allowing the programming to perform arithmetic operations, use logic statements, access the control memory and poll the machine tool for positional information.
The following is an example of CNC code that demonstrates the arithmetic capabilities of a program.
#551=[COS[52]*#550]+441
#552=COS[38]*[ABS[#7621]]
#553=#551-#552
#554=-1*[1800-[ABS[#553]]]
#555=-1*[1800-[#550+[ABS [#7624]]]]
#556=-1*[1800-[[ABS [#7621]]+563]]
It is a portion of a program that I developed for setting the coordinate systems for one of our more complex parts, a large weldment machined in three different planes (Figure 1). Tolerances, part size and desired cycle times dictate we machine it in one setup. Because the part is a weldment and all of the components are formed, there are no reliable surfaces to use for positioning the part in a fixture.
Review the print ads from this magazine to continue
This quick advertiser review unlocks the rest of the article and keeps the full-screen reader focused on the ads instead of the page chrome.

MFGAxis Discussion