Many machines prefer G28 Z0. over G91 G28 Z0. because the latter changes the positioning mode.
Output a test G-code file using the unedited post. You will use this to run a text comparison against your edited post output later. 3. Anatomy of an MP Post Processor File
While Mastercam provides generic post processors out of the box, standard files rarely match your specific shop floor setup. Customizing these posts optimizes machine performance, prevents catastrophic crashes, and eliminates manual G-code editing. 1. Understanding Mastercam Post Architecture mastercam post processor editing
The journey from understanding the file structure to confidently editing post blocks is a rewarding one that will significantly boost your productivity and machining safety. Mastering post-processor editing is a challenge, but it's one of the most impactful skills you can develop.
# V01 – 10/24/2026 – AJM – Added M29 rigid tapping switch. # V02 – 10/25/2026 – AJM – Removed G91 in psof$ to fix home issue. Many machines prefer G28 Z0
Before you edit a single line of code, you must understand Mastercam's modern architecture. Your post processor does not work in isolation. It relies on two siblings:
You can access the editor through the Mastercam Machine Definition manager or directly by opening the .pst file. 2. Understanding the File Structure A post processor file consists of several key areas: Output a test G-code file using the unedited post
Modifying how tools are swapped (e.g., calling subprograms or specific M-codes).
A neat trick for professional setups is to force the post to scan the NCI file before posting to generate a tool list. You can modify the pwrtt$ (Write Tool Table) block to output a header like: (T1 - 1/2 EM - MAX DEPTH - Z-1.5) . This requires reading thr$ (Thread) and z_depth variables. In many advanced posts like MPMaster, this functionality is already present but often commented out with # signs; simply uncomment the lines.
Most simple changes occur at the top of the file in the configuration section. Look for toolchg parameters. Enable/Disable Coolant Options: Look for coolant variables. Set Output Units: Change metric to Step 3: Customize Motion Output (Advanced)