Can I Program CNC Without a Post Processor?
A post processor is the file that turns CAM toolpaths into the exact G-code your controller runs. This page explains what it does, when you can skip it, and where hand-written code stops working. It is written for machinists and programmers deciding how to get a job onto the machine.

Do you need a post processor to run a CNC machine?
Short answer: yes, for a narrow set of jobs. The longer answer is about what the post does that you would otherwise do by hand.
What a post processor actually does
A post processor is a translator. CAM software thinks in toolpaths, stock models and cutter contact points. The machine thinks in blocks of G-code with a specific syntax, a specific set of canned cycles and a specific way of handling arcs and tool length offsets. The post sits between them and rewrites the toolpath into that dialect.
The work it does is mostly boring and mostly invisible. It picks G54 or G55, writes the correct tool call, decides between G43 and G43.1, converts arcs to IJK or R format, sets the correct spindle range, and inserts safe Z retracts before every rapid move. None of that is machining knowledge. It is syntax translation, and it has to be right every single block.
Change one parameter and the post has to know. Swap a Fanuc 0i for a Siemens 828D and the same CAM file needs different output. Add a right-angle head on a 5-axis mill and the post must handle the rotary offsets. This is why a generic post usually produces code that looks fine and cuts wrong.
Jobs you can hand-code without a post
Facing a plate on a 3-axis mill is the classic case. You need G54, a spindle speed, a feed, a start point and a series of X passes with a Y stepover. Twenty-five lines of code will do it. If the plate is 200 × 150 mm and you are taking 0.5 mm off the top, there is nothing a post would add.
Simple drilling patterns are the second case. A grid of holes with a fixed pitch, a single drill size and a spot drill first is easy to write with G81 and G83. The math is arithmetic you can do on paper or in a spreadsheet. You can also store the pattern as a subprogram and call it with M98, which keeps the main program short.
Turning is the third case. A straight shaft with two diameters, a chamfer and a thread is a G71 roughing cycle plus a G76 threading cycle on most lathes. A skilled turner can write that faster than they can set up a CAM job, especially for one-off repair work.
There is one more case worth naming: proving a machine. When a machine comes back from service or a new one is installed, a short hand-written test program tells you whether the axes, spindle and offsets are behaving. You write it once and keep it.
- 1Flat 2.5D geometryFacing, pockets, simple contours, a few tools at most.
- 2Fixed hole patternsLinear or bolt-circle grids with one or two drill sizes.
- 3Basic turning profilesStraight diameters, chamfers, single-start threads.
- 4Machine checksAxis, spindle and offset verification after service.
Where hand-written G-code falls apart
Contoured 3D surfaces are the first wall. A mold insert or an impeller blade is thousands of small moves that follow a curved surface. No one writes that by hand. Even if you could, one wrong Z value scraps the part, and the cycle time would be worse than the CAM output because you cannot hand-tune stepover the way a CAM toolpath can.
Tool length and work offset management is the second wall. A job with eight tools, four work offsets and a tombstone fixture has a lot of state to track. Posts handle this with structured output and comments. Hand code turns into a list of numbers you have to audit line by line, and a missed G43 H number is a crash.
Rotary and 5-axis work is the third wall. Simultaneous 5-axis output involves inverse kinematics: the CAM software has to solve for rotary angles from a tool vector. That math is not something you do in a text editor. Even 3+2 positioning needs correct rotary offsets and post logic for which axis moves first.
Controller differences are the fourth wall. A canned cycle that runs on a Haas may need a different format on a Brother or a Mazak. Macro syntax differs between Fanuc and Okuma. If you hand-code for one machine and try to run it on another, verify every line before the first cut.
The last wall is maintenance. Hand-written code has no source model behind it. When the part revision changes by 0.3 mm on one wall, you edit numbers and hope you caught every affected move. With CAM and a post, you change the model and repost.
Hand-coding vs. post processor output
Use this as a rough filter before you decide how to get the code onto the machine.
| Job type | Hand-code? | Why |
|---|---|---|
| Facing and squaring a plate | Yes | Fixed passes, no contour math |
| Bolt-circle drilling | Yes | One canned cycle, simple indexing |
| 2.5D pocket, 4 tools | Usually | Possible but error-prone past 3 tools |
| 3D contoured surface | No | Thousands of interpolated moves |
| Simultaneous 5-axis | No | Needs inverse kinematics from CAM |
| Tombstone, 4 offsets | No | Too much state to track by hand |
| Turning one-off repair | Yes | Fast to write for a single feature |
| Production turning, 6 tools | No | Post handles sync and offsets |
How to hand-code safely when you do skip the post
Write the program in a text editor with line numbers on. Number every block, even if the controller does not require it. Line numbers make it possible to jump to a specific move during a dry run and to reference a block when something sounds wrong.
Simulate before you cut. Most controls have a graphics mode, and CAM software can backplot a G-code file even if it did not generate it. Run the simulation with the tool and holder geometry loaded so you catch a holder collision, not just a toolpath error.
Cut air first. Run the program with the Z offset shifted up by 50 mm and the rapid override down. Watch the position display against the code. If a move does not match what you expect, stop and read the block again. This step catches most offset mistakes before they become a crash.
Verify the post-less code against the drawing, not against your memory. Check every Z depth against the drawing, every tool number against the setup sheet, and every feed against the material. A short checklist beats confidence.
Keep a known-good copy. Once a hand-written program runs correctly, save it under a revision name and note what it was proven on. The next person to run that job should not have to reverse-engineer your intent from the code.
If the job is going to repeat, stop hand-coding it. Move it into CAM and get a proper post for that machine. The second run is where hand code starts costing more than the post would have.
Common questions
Is a post processor part of the CNC machine or the CAM software?
It belongs to the CAM software. A post is a configuration file that CAM uses to format output for a specific machine and control combination. The machine itself only reads the G-code that comes out.
Machine builders sometimes supply post files or work with CAM vendors to produce them, but the file still lives on the CAM side. That is why you can have one CAM seat and several posts, one per machine.
Can I edit post output by hand instead of fixing the post?
For a one-off, yes. Open the G-code, change the feed or the offset, and run it. The risk is that you now have two versions of the truth: the CAM file and the edited code.
If the same edit comes up twice, fix the post instead. A post change applies to every future job on that machine. A hand edit applies once and gets lost.
How do I know my post is configured correctly?
Run a test part with features you can measure: a pocket with known corner radii, a drilled hole pattern, a thread. Check the dimensions against the drawing, not against the CAM simulation.
Also check the non-geometric output. Confirm the correct work offset is called, tool length offsets match the setup sheet, and the safe Z height clears the fixture. Those are the mistakes that cause crashes.
Can I write macro programs instead of using a post?
Macros are useful for parametric work like a family of hole patterns or a pallet routine, but they are not a replacement for a post. A macro still runs inside the controller dialect and still needs correct G-code underneath.
Use macros for repeatable logic that changes by a few variables. Use a post for turning CAM toolpaths into machine code.
What happens if I run code written for a different controller?
It may run and produce a wrong part, or it may alarm out on the first block. Some differences are obvious, like a missing M code. Others are subtle, like arc format or a different interpretation of a canned cycle retract.
Treat any cross-controller code as unverified. Simulate it and cut air before you put material in the vise.
Does GreatLight accept customer G-code for production runs?
We program from your 3D model and 2D drawing, and we can work from your process documentation when a job requires it. Uploads are handled as confidential, and an NDA is available on request.
For production we run our own verified programs on 127 CNC machines, including 16 simultaneous 5-axis centers. That keeps the toolpath, the offsets and the inspection plan under one revision.
Send a model and we will return a quotation with a free DFM analysis within 12 hours.
Send your model, get a manufacturable answer
Upload a 3D model or drawing and our engineers will review the geometry, tolerance and finish before quoting. Free DFM analysis within 12 hours.
12-hour quote100% inspectionNDA on request