ProShop
Published

VBA Macros Ease CAM Program Creation

Taking advantage of the open architecture of Esprit CAM software to write Visual Basic for Applications (VBA) macros simplifies CNC programming at this manufacturer of automotive presses.

Share

 

Machining a wide variety of complex, tight-tolerance parts that often involve special customer requirements can be time-consuming and expensive, but that doesn’t necessarily have to be the case for programming. Such has been the experience at Prensas Schuler, a Sao Paulo, Brazil-based manufacturer of automotive industry press systems. Using macros to program parts in Esprit CAM software from DP Technology (Camarillo, California) has helped manage complexity and significantly reduce programming times, in some cases from hours to minutes. Moreover, the software’s open-architecture design and use of the Visual Basic for Applications (VBA) programming language makes it easy to find and train new macro programmers, receive technical support, and customize the system to suit individual applications, says Fabio Avila, who heads Prensas Schuler’s machine shop.
 
Prensas Schuler is the second-largest subsidiary of the Schuler Group, a Goppingen, Germany-based supplier of metalforming presses that has plants throughout the world. The Brazilian operation distributes the parent company’s full product line, but its manufacturing resources are dedicated to press lines, servo presses, transfer presses, progressive die presses, blanking presses, try-out presses, forging presses and press automation solutions. Components for these systems are produced mostly on large gantry mills and horizontal machining centers.
 
Accommodating special customer requirements requires creating dozens of new CNC programs each month. The company reports that this task is especially challenging because parts tend to be geometrically complex, and they often require special programming touches to avoid damage. Tolerances tend to be tight, so programs must include built-in trial cuts and touch-offs. Finally, programs require detailed annotations to guide operators through setup and machining processes.
 
Mr. Avila says writing macros for each major category of press component helps simplify the programming process, reduce errors, reduce programming time and make special customer requests easier to accommodate. Prensas Schuler had been using macro-based programming for some time before adopting Esprit, and the process is similar with both the old software and the new. In essence, macros boil the programming process down to a series of questions about the part and the equipment and tooling used to produce it. Based on the programmer’s input, the system generates a finished G-code program.
 
However, Esprit enables programmers to write macros using the industry-standard VBA programming language. In contrast, the company’s previous software used its own language. According to the company, it was difficult to find people who knew that language, so it often had no choice but to train new programmers from scratch. “We looked for a program that uses a standard programming language,” Mr. Avila says. “There are many programmers who already know VBA, and Esprit provides an application programming interface that opens the door for communications with many Windows programs.”
 
The fact that so many programmers have already mastered VBA is a major benefit because they can readily write macros for a variety of applications, including those at Prensas Schuler. Compared to the previous system, this eases hiring and training. Additionally, Esprit’s application programming interface (API) provides seamless integration with VBA, the company reports. For example, all of the CAM software’s menus and toolbars are accessible from within a VBA macro. This enables programmers to use macros to adapt the Esprit interface according to the individual needs of an application or business.
 
Prensas Schuler has several VBA programmers who write Esprit macros. The process begins with parametric models in CATIA V5, the CAD software the shop uses to design presses. Once imported into Esprit, those CAD files serve as the basis for macros dedicated to specific families of parts. Then, the CNC programmer uses the macro to create programs for individual parts within the family. For example, a typical dialog box might ask the programmer to define a hole by entering parameters such as diameter, depth, X-Y-Z location and hole type. Once the programmer enters that information, the system automatically creates the holes, selects the cutting tools, creates the drilling operations and produces the G-code program, complete with a tool list and a tool setup diagram that shows the zero point for the tooling on the part.
 
In addition to macro programming with VBA, Mr. Avila says he appreciates Esprit’s simulation capabilities. The software provides a graphical representation of not only the programmed tool paths, but also the entire machining environment, all in dynamic 3D solids. Such simulation provides benefits in addition to simply preventing collisions. For example, simulation has helped programmers discover that the final part geometry does not match the design intent and requires tweaking prior to any actual cutting. In other cases, programmers have recognized opportunities to reduce machining time by cutting a feature with a different tool or changing the order of operations. 
 
“Esprit macros have improved the CNC programming process for forming press components, and its use of the VBA programming language makes it much easier to find and train programmers,” Mr. Avila concludes. “Our goal is to continue to improve our macro programming capabilities in order to further reduce programming time and eliminate machine setup errors.”

 

SmartCAM
ProShop
Surface finishing in Fusion
HCL CAMworks
SolidCAM
JTEKT
IMTS 2024
Universal Homepage Package W4900 Indicator
VERISURF
Gardner Business Intelligence
Hurco
World Machine Tool Survey

Related Content

Measurement

6 Machine Shop Essentials to Stay Competitive

If you want to streamline production and be competitive in the industry, you will need far more than a standard three-axis CNC mill or two-axis CNC lathe and a few measuring tools.

Read More

5 Tips for Running a Profitable Aerospace Shop

Aerospace machining is a demanding and competitive sector of manufacturing, but this shop demonstrates five ways to find aerospace success.

Read More

When Handing Down the Family Machine Shop is as Complex as a Swiss-Turned Part

The transition into Swiss-type machining at Deking Screw Products required more than just a shift in production operations. It required a new mindset and a new way of running the family-owned business. Hardest of all, it required that one generation let go, and allow a new one to step in.

Read More
CAD/CAM

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

Read Next

Encountering Surface Finishes in the Everyday World

Surface measurement is becoming increasingly important to ensure proper performance of a manufactured product. Advanced surface measurement tools are not only beneficial in the manufacturing industry but also have unconventional applications.

Read More
Turning Machines

A History of Precision: The Invention and Evolution of Swiss-Style Machining

In the late 1800s, a new technology — Swiss-type machines — emerged to serve Switzerland’s growing watchmaking industry. Today, Swiss-machined parts are ubiquitous, and there’s a good reason for that: No other machining technology can produce tiny, complex components more efficiently or at higher quality.

Read More
Basics

Obscure CNC Features That Can Help (or Hurt) You

You cannot begin to take advantage of an available feature if you do not know it exists. Conversely, you will not know how to avoid CNC features that may be detrimental to your process.

Read More
Deburring in Fusion