A Post Processor is a translator. Mastercam speaks an internal, generic language called NCI (Numerical Control Intermediate). Your Haas, DMG MORI, or Mazak speaks a unique dialect of Fanuc, Heidenhain, or Siemens.
The Post takes the NCI data (e.g., "cut a 0.5" hole at X1.0 Y1.0") and converts it into a line of G-code specific to your machine.
Example translation:
If the Post is wrong, the G-code is dangerous. mastercam post processor editing
If you don't know why a post is skipping a line, force it to stop.
Insert this debug code into the line you are testing:
"M00 (DEBUG: Coolant turned on here)", e$
When your machine runs, it will stop, and you can see if the code appeared before or after your motion.
The Problem: Your post outputs X0.0000 (4 decimals) but your Fanuc control only reads 3 decimals. This causes rounding errors.
The Fix: Look for the Format Statements. These are defined using fmt.
Example:
fmt "X" 2 x$ means: Use Format #2 for variable x$. A Post Processor is a translator
Find the fs2 (Format Statement 2) definitions.
fs2 1 0.7 0.6 # Default for decimal
fs2 2 0.4 0.3 # Absolute, 4 place decimal (This is the bad one)
Change 0.4 0.3 to 0.3 0.3 for three decimal places. If the Post is wrong, the G-code is dangerous
When a post fails or outputs incorrect G-code, the editor must trace the execution.
If your post has a .psb file of the same name (e.g., 5Axis_Mazak.psb), you cannot customize much without the original developer’s source code. You are limited to:
For advanced logic (if/then decisions based on tool axis), you need the source. Pay the developer for modifications.
The post processor reads these integer codes and maps them to internal variables.
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.