A software engineer from CNC Software, makers of Mastercam programming software, discusses what a postprocessor is and what it does. He explains the different types of postprocessors, the different types of postprocessor users, and the different levels of functionality in postprocessors.
software engineer, CNC Software, Inc.
The bridge between computer-generated tool paths, such as this pocketing routine prepared by Cliff Lengtat at the Jet Propulstion Laboratory in Pasadena, and the specific machine tool that will produce this part is the postprocessor, or “post.”
To write a postprocessor, begin by locating a generic post or a post from a similar machine that you can modify. This is typically easier than writing a post from scratch. It is important to create a set of reference parts for consistent and repeatable testing. When the post is done, archive all files and parts used for development. This will make it easier to maintain the post in the future as your CAM software is upgraded.
A dedicated postprocessor editor color-codes different types of NC words to make your program easier to read. Multiple code streams can be displayed side-by-side.
Good CAM systems import all sorts of CAD models and use them as virtual environments where tool paths for hundreds of CNC machine types can be generated. CAD and CAM systems are visually exciting. In their shadow, however, is an equally important piece of software. It is the bridge between computer-generated tool paths and the CNC equipment. It is called the “postprocessor” or “post” for short. Although it’s not as graphically interesting as CAD or CAM, there is a lot more to the post than meets the eye. Understanding those things can help your shop become more capable and productive.
What is a Post?
Say you are going to manufacture a part on a mill, lathe or multi-axis machining center. To do this, you create the tool paths in your CAM system, and then you “post it.” That means you send the instructions for making your part to the postprocessor, an intermediary piece of software that translates the tool motions calculated by your CAM software into NC code that can be executed by your particular machine.
A good post is also capable of “flavoring” this information in ways that best suit your shop’s workflow, data handling procedures, and most importantly, the requirements of your machine tool and control. For example, your control will expect information such as work offsets, tool offlsets and canned cycles to be formatted and presented in a specific way. Examples of shop-specific customization might include your standards for safety blocks or required comments. The post can also generate additional outputs such as alarms or signals to equipment performing secondary operations. Some posts can be programmed to deliver functionality beyond what is currently available in your CAD system.
Open vs. Closed
CAM vendors offer postprocessors that are either open or closed. Closed postprocessors allow no one but authorized parties (that is, the post vendor) to customize the post. Open postprocessors have an architecture that allows anyone—vendors, resellers and customers—to make modifications to customize the postprocessor’s behavior.
The benefit of the closed approach lies in its simplicity and safety. Users get what they pay for, and ideally, the CAM software will give them everything they need in functionality and performance. If not, the vendor will create customizations for a fee.
Open postprocessors give their users more options to make this software fit their preferences and requirements. Today, there is a large community of experts who know how to develop post customizations, and they share their knowledge with each other. Open postprocessors provide their own layer of safety, too. Because extensive modifications can be made entirely outside the main CAM program routines, it is less likely that a user’s CAM software code might be corrupted by poorly developed customizations.
The ready availability of customization expertise means that resellers and users can be more involved in flavoring the post so that the user’s preferences are realized sooner. In addition, users with the right expertise can continue to make modifications as needed so that the post’s contribution to quality and productivity may increase substantially over the years.
As a software engineer deeply involved in the development of open postprocessors, I will keep my observations mainly to that arena.
Variety of Post Users
The first customers for new posts are the machine tool builders. When a new machine tool is being developed, leading CAM software developers work closely with the machine builder and controller suppliers to develop an initial “generic” post that satisfies a majority of output requirements for the new machine tool. The typical CAM software developer is likely to have relationships with many machine tool vendors. These relationships enable the software developer to create and test posts on new machine tools. Mastercam, for example, works with nearly a hundred machine tool companies.
These generic posts can be used as written, with little (if any) customization, to put the new machine tools through initial testing by shops that are early adopters. There has to be enough functionality in the generic post so that the new users can operate the equipment productively. However, flavoring of the post should be kept to a minimum at this point. Otherwise, some customers may be satisfied, while others may find the post totally contrary to the way they structure their CNC manufacturing workflow. This approach enables the final configuration to be tailored closely to the specific needs of each end user.
End users generally fall into one of three categories. A great many will find that the generic post (with or without some minor modifications by the reseller) meets their needs. Others will need some specific customization, which could be minimal or extensive. In most cases, the cost of customization will only be a small fraction of what it would take to develop a completely custom post, because a generic version that already covers all or most of the end user’s requirements is likely to be the starting point.
The third type of end user includes CNC programmers and machine operators who have learned to go into the post and change lines of code to change its functionality. For example, most machinists who need to make a minor variation on a part that has already been programmed will simply modify the G and M code at the machine. However, if such part variations are made frequently, then it is far more efficient to edit the postprocessor to generate the code automatically by prompting for some dimensional variables.
Skilled post writers can create additional functionality for their equipment even when the desired routines are not supported in the CAM system itself, as these two examples show.
Canned Pocket Cycles: Many CAM packages have canned drilling cycles but few have canned pocketing. This is not a problem if you have an open post. You can customize the post to take data from a CAM drilling cycle and output a canned pocket routine instead.
Programming Robots: Although Mastercam does not support robots, enough data is available in the CAD file to drive one. The developers of RobotMaster (Jabez Technologies Inc.) grasped this fact and used the Mastercam postprocessor to create a specialized module to drive a wide variety of six-axis robots. Robot trajectories are programmed graphically within the CAM package. Then the RobotMaster module uses the CAM software’s machine definitions to define the outputs for particular robots.
The lesson here is simple: If the requisite data is in the CAD file, you can use a good CAM system and an open postprocessor to program a CNC machine to its full capability.
Getting Some Help
With the basic training that comes with a standard CAM installation, most programmers can soon make useful changes competently. Typically, users simply need to know how to post the program to their CNC machine or change some data in tables to get it to perform simple variations of programs created in the CAM package.
For those who want to learn more, there is an enormous amount of information on the Internet. Search engines such as Google can locate numerous websites with pertinent information, especially if multiple searches are conducted using a variety of key words. Patience and persistence is likely to be rewarded. Another option is to enter a question on an Internet forum, such as those hosted by the CAM developer for its community of users. (For example, emastercam.com is operated by In-House Solutions Inc., a Mastercam distributor.) The experience with this forum shows that usually it won’t be long before helpful suggestions and possible solutions are submitted in reply.
Finally, a user might consider taking an advanced postprocessor training course. For those with an aptitude for writing scripts, this knowledge can help them expand the productivity of their shop’s CNC machines.