What Program Does CNC Machines Use?
CNC machines run G-code, but that code is the last stop in a longer chain of software. This page explains each layer of that chain, from CAD model to spindle motion, so you can judge which workflow fits your part before you send it out.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
What Program Does CNC Machines Use at the Spindle?
A CNC machine does not open a document the way a desktop computer does. It reads a program of coordinates, feed rates, spindle speeds, and switching commands, written in G-code and M-code. The controller parses each line and moves the axes. Nothing on the machine reads a STEP file directly.
So when someone asks what program does CNC machines use, the honest answer has two parts. The machine itself uses G-code. The shop uses a chain of CAD and CAM software to produce that G-code. Confusing the two is where most newcomers get stuck.
The chain matters because errors compound. A sloppy CAD model forces a messy CAM strategy, which produces inefficient toolpaths, which show up as chatter marks or a scrapped part. Fix the model early and the rest of the chain gets easier.
For simple 2.5D work, a programmer might still write G-code by hand at the control. For contoured surfaces, that approach is impractical. CAM software handles the math.
- 1Machine languageG-code and M-code, read by the controller
- 2Programming layerCAM software that outputs the G-code
- 3Source dataCAD models in STEP, IGES, or native formats
G-code Is the Only Language the Controller Understands
G-code is a list of motion commands. G00 moves at rapid speed, G01 moves at a programmed feed, G02 and G03 cut arcs. M-codes handle non-motion events: M03 starts the spindle, M08 turns on coolant, M30 ends the program. That is the whole vocabulary in its simplest form.
The controller on the machine interprets each block line by line. Fanuc, Siemens, Heidenhain, Mitsubishi, and Haas all read the same core G-code, but their dialects differ. A program written for a Fanuc control may need edits before a Heidenhain machine will accept it.
This is why post-processors exist. A post-processor takes the neutral toolpath from CAM and translates it into the dialect of your specific machine and control combination. Skip that step and you get alarms, not parts.
G-code is also where the machine's physical limits get encoded. Feed rates in mm/min, spindle speeds in rpm, tool change positions, safe Z heights. Get one of those wrong and the machine will happily crash into the vise.
- 1G00 / G01Rapid positioning and linear feed moves
- 2G02 / G03Clockwise and counterclockwise arc moves
- 3M03 / M08Spindle on, coolant on
CAM Software Turns Geometry into Toolpaths
CAM stands for computer-aided manufacturing. You import the CAD model, define the stock, pick tools, and set cutting parameters. The software then calculates the path the tool must follow to remove material without gouging the part or overloading the cutter.
The choice of CAM platform depends on part type. Mastercam and Fusion 360 dominate general milling and turning. PowerMill handles complex 5-axis impellers and molds. ESPRIT is common for mill-turn and high-volume turned parts. GibbsCAM and NX show up in aerospace and automotive work.
Good CAM output is not just about the shape. It is about tool engagement angles, chip thinning, and constant chip load. A toolpath that looks correct on screen can still chatter if the radial engagement is too high for the tool's flute count.
Software does not replace judgment. The programmer still decides whether to rough with a 16 mm end mill or a 50 mm face mill, whether to use high-feed or trochoidal paths, and where to leave stock for finishing.
- 12.5D workPockets, slots, drilled holes, simple profiles
- 23D surfacingContoured shapes, molds, organic geometry
- 35-axis simultaneousImpellers, blisks, complex aerospace parts
The Post-Processor Bridges CAM and Machine
A post-processor is a configuration file, not a standalone program. It tells CAM how to format the output for a specific control: which G-codes to use, how to call tools, where to insert safe retracts, how to handle subprograms and macros.
Every machine and control pair needs its own post. A Haas VF-2 with a Haas control uses a different post than the same machine with a Fanuc retrofit. Shops that run mixed equipment maintain a library of posts and update them when machines are added or replaced.
A bad post is expensive. It can produce code that runs correctly but slowly, adding minutes per cycle. Or it can produce code that looks right until the tool plunges into the fixture. Most shops test a new post on a scrap block before trusting it on a real job.
Post-processors are also where shop standards live. Safe Z heights, coolant defaults, tool numbering schemes, and program header comments all come from the post. Standardizing posts across a shop reduces setup errors.
- 1Control-specificFanuc, Siemens, Heidenhain, Haas dialects
- 2Machine-specificTravel limits, tool changer positions
- 3Shop-specificSafety defaults, naming conventions
CAD Formats and What the Shop Can Actually Read
CAD software creates the model; CAM software consumes it. STEP and IGES are the neutral exchange formats that almost every package can read. Native formats like SolidWorks SLDPRT, Fusion F3D, or Creo PRT work if the shop runs the same software.
For machining, STEP AP214 or AP242 is usually the safest choice. It carries solid geometry and assemblies cleanly. IGES is older and can produce surface gaps that force repair work. STL is a mesh format, fine for 3D printing but poor for CNC because it loses precise curves.
The model should be the final, manufacturable geometry, not a concept sketch. Include tolerances, surface finish callouts, and thread specifications on the drawing. If critical features are only in the 3D model and not dimensioned, the programmer has to guess.
Send the drawing and the model together. The model defines the shape; the drawing defines what matters. When the two disagree, we ask before cutting.
- 1STEP AP214/AP242Best general choice for CNC
- 2IGESOlder, watch for surface gaps
- 3STLMesh only, avoid for machined parts
Why the Program Choice Changes the Part
The program determines more than the shape. It sets the surface finish, the cycle time, and the tool life. A roughing strategy that takes deep, light cuts may finish faster than a conservative one that takes shallow, heavy cuts, depending on the material.
Aluminium 6061 and 7075 behave differently. The same toolpath that runs clean in 6061 can chatter in 7075 because of its higher strength. Titanium Ti-6Al-4V and Inconel need lower surface speeds and more coolant, and the CAM parameters must reflect that.
Tolerance also drives programming decisions. Holding ±0.005 mm on a bore may require a separate finishing pass with a boring head, not just an end mill. The program has to include that pass, with the right feed and speed.
This is why we ask about function, not just geometry. A bracket that carries load needs different programming than a cover plate that only looks good. Same shape, different program, different result.
- 1MaterialAluminium, steel, titanium, plastics
- 2ToleranceGeneral machining vs. tight fits
- 3FunctionLoad-bearing vs. cosmetic
How GreatLight Handles Programming Workflows
We run 127 high-precision CNC machines across three wholly-owned plants, including 16 simultaneous 5-axis machining centers, 12 four-axis mills, 27 three-axis machines, and 16 mill-turn centers. Maximum processing size reaches 4,000 mm.
That mix means we maintain posts and expertise across several CAM platforms. A complex 5-axis impeller and a high-volume turned fitting do not go through the same software, and they should not.
Every job gets a DFM review before programming starts. We check wall thickness, tool reach, and whether the tolerance is achievable with the chosen process. Quotation and free DFM analysis come back within 12 hours.
We hold ISO 9001:2015, IATF 16949:2016, ISO 13485:2016, and ISO 27001:2022. Uploads are secure and confidential, and an NDA is available on request. No minimum order quantity, from one prototype to 10,000+ part runs.
- 1Tolerance±0.005 mm (±0.0002 in) on precision work
- 2FinishRa 0.2–0.8 μm fine, Ra 0.8–1.6 μm high
- 3Inspection100% before shipment, reports on request
Workflow Choices by Part Type
The right programming approach depends on geometry, tolerance, and volume.
| Part type | Best workflow | Why | Watch out for |
|---|---|---|---|
| Simple 2.5D plate | Hand-written G-code or basic CAM | Fast to program, easy to verify | Tool wear on long runs |
| 3D contoured surface | CAM with 3-axis surfacing | Manual math is impractical | Long cycle times |
| 5-axis impeller | CAM with simultaneous 5-axis | Tool access and collision control | Post-processor errors |
| Turned fitting, high volume | CAM for mill-turn or lathe | Consistent cycle time | Bar feeder setup |
| Tight-tolerance bore | CAM plus boring head pass | End mill cannot hold ±0.005 mm | Thermal growth |
| Prototype, one-off | CAM with conservative feeds | Avoid scrap, not cycle time | Stock availability |
Pick the Workflow, Not the Brand
If your part is simple 2.5D and the volume is low, hand-written G-code or basic CAM is enough. If it has contoured surfaces, tight tolerances, or 5-axis features, you need a shop with the right CAM platform and a post-processor proven on that machine. The software name matters less than whether the shop has run your part type before.
Common Questions
Do CNC machines run on Windows?
Some controllers run on an embedded Windows or Linux base, but the machine itself does not run Windows applications. The operating system hosts the control software, which reads G-code.
You cannot open a STEP file on the machine and expect it to cut. The file has to go through CAM first.
Can a CNC machine run a program from a USB stick?
Yes. Most controllers accept programs via USB, network, or direct memory. The file is still G-code, not a CAD model.
Large programs may exceed the controller's memory, so shops use drip feeding or run from a network drive.
What is the difference between G-code and M-code?
G-code controls motion: rapid moves, feeds, arcs, and coordinate systems. M-code controls machine functions: spindle on and off, coolant, tool changes, and program end.
Both appear in the same program. A typical block might contain a G01 move followed by an M08 coolant command.
Do all CNC machines use the same G-code?
The core commands are similar, but dialects differ between Fanuc, Siemens, Heidenhain, Haas, and others. A post-processor adapts the output to the specific control.
Sending a program written for one control to a different machine often triggers alarms or unexpected motion.
Can I program a CNC machine without CAM software?
For simple 2.5D parts, yes. Many programmers write G-code by hand for drilling, facing, and simple pockets.
For contoured 3D surfaces or 5-axis work, manual programming is not practical. The math for tool compensation and collision avoidance is too complex.
What file should I send for a CNC quote?
Send a STEP AP214 or AP242 file plus a 2D drawing with tolerances, finish callouts, and thread specs. Include material and quantity.
If you only have a native CAD file, send that. We can read most major formats or convert them.
Send Your Model, Get a Program Plan
Upload your CAD file and drawing. We review manufacturability, pick the right CAM workflow, and return a quote with DFM feedback within 12 hours.
12-hour quote100% inspectionNo minimum order quantity