About Post Processing
Post processing, or posting, refers to the process by which the toolpaths in your part files are converted to a format that can be understood by your machine tool's control (for example, G-codes). A program called a post processor, or post, reads your part file and writes the appropriate NC code. Generally, every machine tool or control requires its own post processor, customized to produce code formatted to meet its exact requirements. In addition, you can customize a post to reflect job or shop preferences, such as safety blocks, tolerances, etc.
Post processors have two components:
- Executable file: This is the piece of software that actually generates your NC code. Mastercam includes MP.DLL for this purpose. Other DLLs can be developed for advanced applications or are available from other companies.
- Post customization script: A post customization script (.pst or .mcpost) is used by MP.DLL to customize the post output for your machine tool. It includes format statements, processing logic, miscellaneous integers and custom variable definitions, system variables, etc. Mastercam makes available a wide variety of working posts for common machines and NC controllers. These can be further customized for specific needs.
A single post executable like MP.DLL is used to produce NC output for many different machines by reading different .pst files. A typical Mastercam user has one post executable (most often MP.DLL), and several post files—one for each machine in their shop.
Post processors do not read your part files directly. Instead, Mastercam creates an NCI file as an intermediate file format to be used by the post processor. The NCI file is written in a text format so that you can review it directly. This is useful when customizing posts, debugging post problems, or analyzing problems with your NC code because it lets you see the exact data that the post is reading.
Follow these steps to create a machine-readable NC program from your Mastercam part file:
- Go to the Toolpaths Manager.
-
Select the operations to be posted.
NOTEYou can select operations from more than one machine group, however, a separate NC file will be created for each machine group.
-
Click the Post icon in the Toolpaths Manager toolbar:
-
The Post processing dialog box displays. Use it to tell Mastercam what types of files to create and whether you want to view them in a text editor as they are created. You can also choose to send the NC files directly to your machine tool control.
-
If you have not selected all the operations in a machine group, Mastercam will ask if you want to post all the operations. Choose Yes to post all the operations, or choose No to post just the selected operations.
- Click OK to generate the NC files.
Producing the right NC code for your machine and application depends on your properly configuring the machine definition, control definition, and post file.
- Use the machine definition to tell Mastercam
about the physical capabilities of your machine. These include:
- the linear and rotary axes that are mounted on the machine.
- the linear, rapid, and rotary motion capabilities of each axis, including travel limits and axis orientation.
- coolant options.
- other components such as tool changers, spindles, turrets, and chucks.
- Use the control definition to provide
information to the post processor about the processing capabilities
of the control. These include:
- tolerance values.
- machine cycles.
- subprogram support.
- feed rate dimensions.
- tool settings and offsets.
- The post file reads the information from the machine and control definitions. It contains the processing logic and format statements to generate the proper NC code for your machine.
Use the Machine Definition Manager to select the post that will be used with the machine. Mastercam's modular architecture makes it easy to share a single control across multiple machines; define several posts for a single machine; or update components when your equipment changes.
Post files contain the following major areas:
- Definition area: Contains format statements and assignments, variable declarations and initialization, etc.
- Postblock area: Contains predefined and user-defined postblocks. Postblocks are the groups of commands which contain the processing logic.
- Post text area: Contains text strings that are used to customize Mastercam's interface with options specific to the post or your machine. These include names and parameters for drill cycles, custom variables for toolpaths and transform operations, and canned text options.
Every time you configure a control definition to work with a particular post file, Mastercam appends another post text area to the post file, separated by a header.
Through post customization, it is possible to support machine tool/controller options that you cannot set through Mastercam directly. Contact your Mastercam Reseller for more information on post support.
Mastercam also supports binary post processors. These are posts in which the processing logic is encapsulated in a special binary file with a .psb or .mcbpost extension. These cannot be edited in a standard text editor.
Customizing the post file is an advanced task that should only be attempted by knowledgeable users. Programs created with incorrect posts can cause your machine tool to crash or behave in unpredictable ways. If you have any doubts, please consult your Mastercam Reseller for assistance or more information!





