Custom Macro Enables Automated CNC Program Generation

Rex Materials Group uses a custom macro from DP Technology to automate CNC programming.


Facebook Share Icon LinkedIn Share Icon Twitter Share Icon Share by EMail icon Print Icon

Automation doesn’t always have to take the form of robots or unattended machining cells. Rex Materials Group used a custom macro from DP Technology (Camarillo, California) to automate CNC programming of custom-engineered insulation products. In fact, the macros completely eliminated engineering from the production process, enabling the company to produce the product faster and at a lower price.

Fowlerville, Michigan-based Rex Materials specializes in high-temperature insulation products made from materials including vacuum-formed ceramic fiber, fused silica, insulating refractory and a ceramic/ceramic-metal matrix composite. These products are custom-formed to fit water heaters, kilns, injection molding barrels and more. Production involves mixing components, such as fiberglass flakes, water and other chemicals, in a batch tank, pumping the mixture into a mold and baking it in an oven. Normally, the products are cast to near net shape and then cut to final dimensions on a CNC machine.

One of Rex Materials’ newest products, Rex TCS, is designed to control barrel temperature in plastic extrusion and injection molding applications. To ensure the product line’s competitiveness, the company needed to decrease the cost by reducing the manufacturing engineering time needed to ready the design for production. “There’s a lot of variability in the lengths and diameters of barrels, which require a custom layout for the different heaters,” explains Adam Boyd, Rex Materials manufacturing engineer. Depending on the complexity of the part, it can take 2 to 12 hours to program the company’s MultiCAM and CNT Motion cutting machines. “If this product was going to make it to the widest possible market, we had to reduce programming time,” Mr. Boyd says.

The first step in achieving this goal was moving the TCS from manual to CNC production. A year and a half earlier, the company had adopted Esprit CNC programming software from supplier DP Technology in an effort to reduce engineering time. Esprit’s KnowledgeBase CAM software helps determine the best method to machine a given part or feature by automatically selecting the most appropriate machining cycles, cutting tools and machining parameters. “We bought Esprit because we were trying to avoid the expense of having an engineer look at every part,” Mr. Boyd explains. “Having software that could make some of the machining decisions would be a step toward that.”

A programmer begins by importing a SolidWorks CAD model into Esprit and selecting and organizing part features. The next step is defining machining operations. For each toolpath, the programmer selects a tool and defines its diameter, length, toolholder and speeds and feeds. After the toolpath is generated, the programmer uses the software’s simulation functionality to visualize the cutting process. The entire machining process, including each individual cut, is rendered in dynamic 3D solids. The program also generates a representation of the finished part for comparison to the original design.

Esprit helps program complex parts quickly, Mr. Boyd says, because the software can recognize and apply tool paths to complex curvatures. The mold function enables the operator to apply a roughing operation first, if necessary, and tells the software what can and cannot be touched. It then runs simulation to ensure the operation performs as expected. In addition to saving time, Esprit saves the cost of having to purchase special tools.

For the TCS, Mr. Boyd decided to take advantage of Esprit’s macro programming functionality. Macros simplify the creation of CNC programs by prompting the programmer to enter dimensions and other basic information for each type of part. He says the macro is well-suited for TCS production because the length, height and width of the products vary according to the shapes of customers’ injection barrels.

Esprit’s macro programming language is based on the industry-standard programming language Microsoft Visual Basic for Applications (VBA). Esprit enables programmers to use VBA to access virtually all of its capabilities. However, rather than developing the macro in-house, Mr. Boyd decided to have DP Technology create it for the company. He supplied a model of the basic heater, which is a hollow cylinder, and indicated all the dimensions and how they could vary. He also provided a sample CNC program to show the cutting strategy.

The macro that DP Technology created completely eliminates engineering from the TCS production process. “It uses information obtained by the sales person to automatically generate the CNC file,” Mr. Boyd says. A sales person enters values for the length, height, outside diameter and inside diameter of the product into a configurator. Special instructions, such as needing a flat instead of a rounded top, can also be entered into the configurator. The information then is exported into a Microsoft Excel file. In Esprit, a technician opens the macro and selects the Excel file. “Nearly everyone coming into our plant knows how to use Microsoft Windows, and that’s all they need to know to create the TCS machining programs,” Mr. Boyd says. Using the information in the Excel file, the macro writes the CNC program. As an added benefit, it also creates a drawing and a bill of materials.

Before implementing the Esprit macro, the company’s traditional programming process took at least 2 hours per part. Now, the TCS products can be automatically generated in 15 to 20 minutes. At 40 such programs a month, the macro saves 13 hours per month. Also, because the work is done by a technician rather an engineer, the cost savings enables the company to sell the new product at a more competitive price.


  • Programming A Robot The Way You Program A CNC Machine Tool

    Programming a robot with the same CAM software used for a multi-axis machine tool makes it unnecessary to “teach” the robot by jogging it manually from point to point and recording these point-to-point moves as the robot’s motion commands. Robotmaster is a software package that provides this CAD/CAM-based, off-line programming for robots. It runs fully integrated inside Mastercam CAM software for CNC machine tools.

  • Five Problems With CNC Milling Cutter Radius Compensation

    The many rules of programming CNC cutter radius compensation can make machining problems difficult to diagnose and correct. 

  • There Are Apps For That, Too

    These two iPhone apps provide manufacturing professionals and students with quick access to helpful cutting tool information directly from their smart phones.