You drew the part, picked your tools, and the toolpaths look perfect on screen. Then you post the program, load it on the Haas, and the spindle does something you did not ask for. Welcome to the part of CNC programming that quietly decides whether a job runs clean or scraps a fixture: the post-processor, the piece that in SOLIDWORKS CAM and CAMWorks takes the simulated motion on your screen and turns it into the exact G-code your specific control will actually accept. Get it right and you cut chips. Get it generic and you babysit every line. This guide walks through what a post-processor actually does, why a one-size-fits-all post is risky on a real machine, and how to prove one out before it ever touches your spindle.
What a post-processor is
A post-processor is the translator that converts the generic toolpath data inside SOLIDWORKS CAM or CAMWorks into the specific G-code and M-code dialect your CNC control understands. The CAM system stores motion as neutral cutter location (CL) data. The post reads that CL data and writes out the line numbers, work offsets, canned cycles, tool changes, and safety blocks formatted exactly the way a Haas, Fanuc, Mazak, or Heidenhain control expects to read them.
Why your CAM system needs a post at all
SOLIDWORKS CAM and CAMWorks do not think in G-code; internally they describe a toolpath in a neutral, machine-independent format that just says rapid here, feed to there, turn coolant on, change to tool 4, which is great for flexibility because the same operation can drive almost any machine. The catch is that no control on your floor reads that neutral format directly, so the post-processor has to bridge the gap, taking the CL data and formatting every block to match one specific control: how it expects work coordinate systems, spindle commands, feedrate modes, and where the program is supposed to start and end.
That is why the same part program can produce very different text files depending on which post you select. The geometry does not change. The translation does.
Why a generic post is dangerous on a real machine
CAMWorks and SOLIDWORKS CAM ship with a library of generic, starter posts. They are a fine place to learn, but a generic post assumes a generic machine, and you do not own a generic machine. Here is where a too-generic post bites shops:
- Canned cycles get expanded or skipped. A generic post may output long-hand drilling moves instead of a tidy G81 or G83 cycle your control supports, bloating the program and slowing the cycle.
- Work offsets and tool changes are wrong. A real machine has a specific tool change position, a safe Z return, and a particular way of calling G54 through G59 or extended offsets. A generic post guesses.
- Safety blocks are missing. The startup line that cancels old offsets, sets absolute mode, and forces a known state is what keeps the last guy's leftover modal command from wrecking your setup.
- M-codes do not match. Through-spindle coolant, high-pressure coolant, and probing macros are often custom M-codes that vary machine to machine.
- The operator becomes the post. When the post is close but not right, somebody hand-edits every file. That manual editing is exactly where typos and crashes come from.
That last one is the quiet killer. On the shop floor, a post that is 90 percent right turns into the post nobody admits to running: the operator fixes the same three lines at the control every single setup, from memory, and it works fine right up until the day a different operator runs the job and does not know which three lines to fix. Then the spindle finds out for them. A post that is 90 percent right is not 90 percent safe, because one wrong retract is a broken tool and one missing offset cancel is a hit fixture that takes the rest of the afternoon with it.
How posts speak each control's language
Every major control has its own dialect, and a good post is tuned to it. A few examples shops run into:
- Haas: Fanuc-style G-code with Haas-specific settings, extended work offsets, and high-speed look-ahead behavior worth posting correctly.
- Fanuc: the baseline many controls imitate, but versions differ on macro B, sub-programs, and offset formats.
- Mazak: runs EIA/ISO G-code that is Fanuc-like, but many shops also use Mazatrol conversational, and the post has to target the mode you actually program in.
- Siemens Sinumerik: its own structure for cycles and frames, not a drop-in for Fanuc text.
- Okuma OSP: Okuma builds its own control, so the G-code, offsets, and cycle calls have their own personality.
- Mitsubishi: Fanuc-adjacent, but with its own quirks in macros and codes.
- Heidenhain: often programmed in Klartext conversational rather than plain ISO, and its ISO is proprietary, so the post output is not interchangeable with Fanuc or Siemens.
Two machines that both "run G-code" can still reject each other's programs. Same language, different accent. The post is what makes that difference invisible to your operator, so the program that ran on the Haas yesterday is not the program that crashes the Mazak today.
None of this means every job needs a hand-built post. If you cut a few simple parts on one machine, the generic post that ships in the box is genuinely fine: read the code, prove it out once, and get back to making chips. The custom post earns its keep when you are running production, juggling several controls, or relying on cycles and macros the starter post never heard of. Match the effort to the work.
Want to know whether your current post is producing edit-free code for your exact control?
Get a QuoteCustom vs. generic posts
SOLIDWORKS CAM and CAMWorks include the Universal Post Generator, a free tool that lets you build and tune posts without writing low-level code, and with a custom post you control the output end to end: the safety lines, the tool change behavior, the exact canned cycles your control supports, the coolant and probing M-codes, the program numbering, and the comments your operators actually rely on at the machine. The goal is edit-free code, which means the program comes off the post ready to run instead of ready to fix.
| Consideration | Generic post | Custom post |
|---|---|---|
| Setup time | Ready immediately | Configured to your machines |
| G-code output | Often needs hand-editing | Aimed at edit-free |
| Canned cycles | May expand or omit | Uses your control's cycles |
| Safety and offsets | Assumed | Matched to your machine |
| Probing and custom M-codes | Rarely included | Built in as needed |
| Best for | Learning, simple jobs | Production on your floor |
If you are still weighing the platform itself, the comparison of SOLIDWORKS CAM vs. CAMWorks vs. Mastercam and the breakdown of Standard vs. Professional are good companion reads. Posts also tie into your TechDB strategy, since automation is only as good as the code that comes out the end.
Testing and proving out a post
A post is not done when it compiles. It is done when it has run real parts. Compiling clean only proves the post will not error out; it says nothing about whether the code it writes is the code your machine wants. A sensible prove-out looks like this:
- Read the code. Open the posted file and check the startup block, work offsets, tool calls, retract heights, and program end against how your machine actually expects them.
- Backplot and simulate. Compare the simulation in CAM against what the posted code implies. They should agree.
- Dry run on the control. Single-block through it at the machine with no part, watching tool changes and offset calls.
- Cut a known test part. Run a simple proof part before trusting it on expensive stock or a loaded fixture.
- Cover the edge cases. Test the operations you actually use: deep-hole drilling, tapping, probing, sub-programs, and any 4th or 5th axis moves. The note on 5-axis and 3+2 work covers where posts get especially particular.
- Lock it down. Once it proves out, archive that post version so a future edit does not quietly change your output.
Heavy editing should happen in the proper editor rather than by hacking the generated file every time, because the UPG is really there for compiling and light tweaks, while deeper customization belongs in a dedicated post editor where the changes stay documented and repeatable from one revision to the next instead of living as undocumented edits somebody redoes by hand.
Where a reseller actually helps
You can build a post yourself, and plenty of capable programmers do. But a post that is wrong is expensive in tooling, scrap, and downtime, and a post that almost works quietly taxes every job for years. A good reseller does more than sell you a license. A good VAR will help match the post to your specific control and options, test it on a representative program, and document what was changed so the knowledge does not live in one person's head. Add a machine or change controls, and that history is already written down. If you would rather own the post yourself, a good VAR should hand you that too, not lock you in.
The right post-processor is the quiet difference between programs your operators trust and programs they fight. Get it right once, prove it out, and lock it down, and it stops being something you think about.
Working through this on your own posts?
Morphos 3D resells and supports SOLIDWORKS CAM and CAMWorks, and posts are part of getting a shop to clean, edit-free code, whatever you run, from Haas to Heidenhain. If that is the wall you are hitting, the SOLIDWORKS CAM and NC Shop Floor Programmer pages are a good place to start, and support is there when you want a second set of eyes on a post.