Mastercam Post Processor Editing -

Before you open a file in a text editor, you must understand what you are looking at. Mastercam posts typically have the .pst or .psb extension.

You can buy a $100,000 CNC machine, but if your post processor outputs bad code, the machine is a paperweight. Conversely, a well-edited post allows you to program complex 5-axis parts, automate tool breakage checks, and eliminate manual G-code edits forever.

Mastercam post processor editing is not a skill you learn in a weekend. It is a journey of debugging, late-night breakthroughs, and the sheer joy of watching your first custom G-code run perfectly.

Your Next Steps:

The machine is waiting. Happy editing.


Disclaimer: This guide is for educational purposes. Always verify G-code on your machine using single-block mode and no tools before running production parts. The author assumes no liability for crashed machines or damaged parts resulting from post processor edits.

This document presents a comprehensive technical deep dive into the architecture, logic, and methodology of editing Mastercam Post Processors. It is structured for CNC programmers, manufacturing engineers, and post processor developers seeking to move beyond basic modifications into structural customization.


Posts use modal variables to avoid redundant output. For example, if X and Y haven't moved, the post won't output them again. Editing involves tweaking the prapid$, plin$, and pcir$ blocks.

To force a feedrate on every linear move (safety for some controls): mastercam post processor editing

plin$            # Linear move
  if feed$ > 0, pbld, n$, "G01", pxout, pyout, pzout, "F", feed$, e$
  else, pbld, n$, "G01", pxout, pyout, pzout, e$

The Problem: Mastercam outputs M8 for mist, but your machine uses M7 for mist. The Fix: Locate the pcool$ post block. It looks something like this:

pcool$      # Coolant output
      if cool_ant$ = 1, result = force$ ("M8"), e$
      if cool_ant$ = 2, result = force$ ("M7"), e$

Simply swap the strings:

Or, if your machine uses Flood (M8) and Thru-spindle (M88), you change the string entirely: result = force$ ("M88"), e$

The post processor reads these integer codes and maps them to internal variables. Before you open a file in a text

The Editing Implication: You cannot output data that does not exist in the NCI. If Mastercam does not output a "Custom Parameter" to the NCI, the post processor cannot "invent" it without external lookups or user-defined variables.


You will break a post. It is a rite of passage. Here is how to fix it.

Mastercam Post language looks like a hybrid of C and BASIC from 1995. But the core rules are simple:

Invest 10 hours in the Mastercam Post Processor Guide (PDF included in your install folder). Download the free MP Documentation from the official Mastercam forum. The machine is waiting