CAM Post Processors

Mastercam Post Processor Development

Mastercam is one of the most widely used CAM systems in the world. Its posts use a dedicated language called MP, together with machine and control definitions.

The parts of a Mastercam post

ComponentRole
Post file (.pst)MP language logic and output formatting
Machine definitionAxes, rotary configuration, limits, components
Control definitionController behaviour: arcs, tolerances, cycles, feed modes
Post text / stringsMessages, M-codes and custom strings

Postblocks

MP code is organised in postblocks, called by the post engine at events such as start of file, tool change and each move.

pheader$         # Start of file
      "%", e$
      *progno$, e$

ptlchg$          # Tool change
      pbld, n$, *t$, "M6", e$
      pbld, n$, *sgcode, *sgabsinc, pwcs, *xout, *yout, *speed, *spindle, e$

plin$            # Linear move
      pcan1, pbld, n$, sgplane, `sgcode, sgabsinc, pccdia,
      pxout, pyout, pzout, feed, strcantext, e$

This excerpt is simplified to show structure; real posts use many more postblocks, variables and formats. The * forces output and e$ ends a line.

Formats

Format statements control decimals, leading and trailing zeros and prefixes for each address, which is essential for controllers with strict number formats.

Encrypted and reseller posts

Many Mastercam posts are supplied by resellers or machine dealers and may be encrypted. Modifying them may require permission or the unencrypted source. Where that isn't available, we develop a new post from a suitable generic base.

Development workflow

  1. Choose the closest generic post and machine/control definitions.
  2. Configure the machine definition to match kinematics and limits.
  3. Modify postblocks for header, tool change, cycles and M-codes.
  4. Post the test set; compare with proven programs.
  5. Simulate and prove on the machine.
A Mastercam post is three things working together: post, machine definition and control definition.

Mastercam post development

See our CNC post processor development service and Mastercam 3-axis posts.

EM
ENGIMANDI CNC Team

We develop, customise and commission CNC post processors for Fusion, NX CAM, Mastercam, SolidCAM and other CAM systems.