Post Processor Engineering

Coolant and M-Code Customisation in CNC Post Processors

A few M-codes are nearly universal. Most others are defined by the machine builder, and differ from machine to machine. Getting them right is one of the most practical post customisations.

Common vs builder-specific codes

FunctionCommonlyVaries by machine?
Spindle CW / CCW / stopM03 / M04 / M05Rarely
Tool changeM06Rarely
Flood coolant on / offM08 / M09Rarely
Mist coolantOften M07Sometimes
Through-spindle coolante.g. M88/M89 (Haas)Yes
Air blaste.g. M83/M84 (Haas)Yes
Rotary clamp / unclampe.g. M10/M11Yes
Chip conveyor, doors, palletBuilder definedYes

Coolant logic in the post

  • Map CAM coolant choices (flood, mist, air, through-tool, combinations) to machine codes.
  • Turn coolant off before tool changes, rotary moves or probing.
  • Wait for through-spindle pressure before cutting (dwell or builder signal).
  • Avoid repeated on/off codes between operations with the same coolant.

Example: through-spindle coolant with pressure delay

T4 M06
G00 G90 G54 X0. Y0. S6000 M03
G43 H04 Z50.
M88              (through-spindle coolant on - Haas code)
G04 P2000        (wait 2 s for pressure - dwell units depend on controller)
G83 X0. Y0. Z-40. R2. Q5. F250.

M-code sequencing

Some controllers allow only one M-code per block, or process multiple M-codes in a particular order. The post outputs M-codes in separate blocks where needed to guarantee the right order.

The machine builder's M-code list is one of the most important documents in any post project.

M-code customisation

See our CNC post processor development service and Haas CNC posts.

EM
ENGIMANDI CNC Team

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