Skip Navigation LinksIntroduction-to-Post-Builder


Introduction to Post Builder 

Continuing with the CAM theme, I am going to introduce Post Builder in this NX A to Z article. A postprocessor is probably the first customization that everyone does when they get NX CAM, simply because without a good postprocessor, your CAM programs are useless. Fortunately, NX comes with a graphical postprocessor editing tool called Post Builder. Furthermore, there are hundreds of postprocessors available between those that come with NX and those that are available for download from GTAC.

The Post Builder Interface

If you go to the folder in the Start->All Programs->UGS NX 7.5->Manufacturing Tools and click on Post Builder, you will see a command prompt pop up and go through some licensing stuff and then if you have a valid license, you will see the window below come up after PostBuilder has loaded.

From here you can create a new postprocessor or open an existing one for editing. A postprocessor is a combination of three files, the tcl file that contains the logic for the post, the def file that contains the format definitions and the pui file that contains the information used by Post Builder to display the postprocessor through the graphical interface. The pui file is the one you select when opening a postprocessor. Shown below are the files for some of the postprocessors that come with NX.

As you can see, there are some generic posts as well as some machine/controller specific posts. Since we are not going to be getting into any specific type of postprocessor, I will choose to create a new 3 axis mill postprocessor and use that to introduce Post Builder. So, click New and you will see the dialog below.

Give your post a name and a description and click OK and Post Builder will start as shown below.

The Post Builder interface is set up using tabs. As you can see, the main tabs are Machine Tool, Program & Tool Path, NC Data Definitions, Output Settings, and Virtual NC Controller. I will go through each of them briefly.

The Machine Tool tab is used for specifying the parameters and configuration of your machine. Axis limits, feed rates, home position and for 4 and 5 axis mills, you specify the rotary axis labels and configuration on this tab.

The Program & Tool Path tab is where the meat of the postprocessor is. This is where you specify the NC blocks that make up each section of your program. As you can see, there is a subset of tabs for the Program & Tool Path tab. The first is the Program tab and is shown below. The Program tab is where you arrange the blocks for each section of your program. In the figure below, you would select a block from the drop-down that says New Block and then you would drag it where you want in the list of blocks that make up the Start of Program section. Each item in the tree view on the left presents more sections of the program where you can add blocks.

The G Codes and M Codes tabs allow you to specify which codes control which functions on your machine. The G Codes tab is shown below and the M Codes tab is the same.

The Word Summary tab shows the definitions and the formatting for each word in the postprocessor. It provides a means for quickly reviewing all of the words in the postprocessor. It isn’t a good idea to make changes to the formatting on this tab because the format of each word is determined by its format definition, which you define on the N/C Data Definitions tab. If you start changing to format for a word on the Word Summary tab, you will see other words change as well because they have the same format definition, but the only way to know what format definition is assigned to each word is through the N/C Data Definitions tab.

You use the Word Sequencing tab to specify the order in which words are arranged in the blocks. Most machines require the words to be in a specific order and you control this through the Word Sequencing tab. The Word Sequencing tab is shown below.

The Custom Command tab is used for writing code to do things that are not typically part of a post processor. Post Builder is built on a scripting language called TCL and you can write TCL scripts to do just about anything with Post Builder. There are quite a few custom commands that come with Post Builder that you can import into a postpocessor for things like a tool list or enabling helical outputs, etc.

The linked posts tab is used for selecting other posts that you need to link to the post you are working on. This is primarily when you have a mill turn machine so that you can link a mill post with a lathe post – this is how you create the postprocessor for a mill turn machine. Because the machine has different sets of kinematics, it requires multiple postprocessors.

The Macro tab is used for creating and storing expressions that can be used throughout the postprocessor.

The N/C Data Definitions tab is where you define the blocks and words and their formats. The Block tab is shown below. You create blocks by putting dragging words from the Add Word drop down. You can assign a name to the block in the tree view on the left and then you can add the block to different sections of your program from the Program & Tool Path tab.

The Word tab is where you assign the format, the limiting values and the modality to the words. The Word tab is shown below

The Format tab is where you define the formats for the words. Things like the number of digits and whether or not to include leading or trailing zeros for numeric formats. The Format tab is shown below.

The Other Data Elements tab is used to define things like the sequence numbering, the operator message start and end characters and you can also specify a custom user defined events file you have one. The Other Data Elements tab is shown below.

The Output Settings tab has two sub-tabs. The Listing File tab allows you to specify whether or not you want a listing file generated with the NC program and set some options for the listing file. The Other Options tab allows you to specify the file extension for the postprocessor and a few other things. One thing of note is the Review Tool. Activating the Review Tool is a very good way to debug your postprocessor when you are not getting the output you need. The Post Files Preview tab allows you to see your postprocessor files before and after the changes you have made. The Other Options tab is shown below.

The Virtial N/C Controller thab is used for creating files that are used for running a postprocessor driven machine tool simulation. You first select to Create the Virtual N/C Controller and the you specify the paramters and options needed to simulate how your machine functions. The Virtual N/C Controller Configuration tab is shown below.

That is Post Builder in a nutshell. Stay tuned for more articles on how to actually write postprocessors.

Dave Holland