How to Program CNC Machine PDF: A Working Guide
This page answers how to program CNC machine PDF reference material should be used at the bench: in order, from drawing to first article. It is written for engineers and machinists who want a printed sheet next to the control, not a video they have to rewind. Read it once and you can judge whether a part suits 3-axis, 4-axis or 5-axis work, and what to fix when the first cut goes wrong.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
- 7
Key takeaways
What a How to Program CNC Machine PDF Should Cover First
Most questions about how to program CNC machine PDF files come down to one thing: the reader wants a checklist that survives contact with the shop floor. A useful document starts with the part, not the code. Before any line of G-code, you need the drawing revision, the material grade, the blank size, and the faces that must be machined in the same setup to hold position.
The drawing gives you tolerances. That number decides almost everything downstream. On our 5-axis centers we hold ±0.005 mm (±0.0002 in) on critical features, but only when the setup supports it. A bore called out at Ø20 H7 on a 300 mm plate is a different job from the same bore on a 40 mm bracket, even though the toolpath looks identical.
Material matters just as much. Aluminium 6061 and 7075 cut freely and forgive aggressive feed rates. Stainless 316L work-hardens if the tool rubs instead of cutting, so you keep the feed per tooth up and never let the cutter dwell. Titanium TC4 (Ti-6Al-4V) and Inconel move the problem to heat: lower surface speed, heavier chip, more coolant.
Write these four lines at the top of your PDF template: part number and revision, material, stock size, and datum scheme. Every program that fails a first article can usually be traced back to one of them being vague.
- 1Drawing revisionProgram to a frozen revision. A changed print invalidates the setup sheet.
- 2Datum schemeChoose A-B-C datums and repeat them in the CAM file and the setup sheet.
- 3Stock allowanceLeave 0.3–0.5 mm on faces that will be finished after stress relief.
- 4Critical tolerance listMark the two or three features that decide pass or fail.
Drawing, Setup Sheet and Program: The Three Documents
A clean programming job produces three documents that agree with each other. The drawing defines the part. The setup sheet defines how it sits on the table. The program defines the motion. If any two disagree, the operator finds out at the machine, which is the most expensive place to find out.
The setup sheet is where most PDF guides stay thin. It should list the workholding, the zero position in X, Y and Z, the vise jaw or fixture number, and the order of operations. On a 4-axis job with a Ø400 mm rotary table, it should also state the rotation center offset and whether the part is programmed from the center of rotation or from a corner.
For the program itself, list the tools with their numbers, diameters, corner radii and stick-out. Stick-out is the number people forget. A Ø6 mm end mill held 60 mm out of the holder will deflect far more than the same tool held at 25 mm, and no feed calculation in your CAM software will warn you.
Keep the tool list short. Every extra tool adds a change, a chance of a wrong offset, and a few seconds of cycle time. On production runs above a few hundred parts, we consolidate tools wherever the geometry allows.
- 1One revision numberStamp the same revision on drawing, setup sheet and program header.
- 2Tool stick-outRecord it. It changes deflection more than most feed tables admit.
- 3Zero positionState it in words and in a sketch. Ambiguity here scraps parts.
G-Code Basics That Decide Whether the Part Is Right
G-code is a list of modal commands. G0 moves at rapid, G1 at the programmed feed, G2 and G3 cut arcs, G81 to G89 handle drilling cycles. Once a code is active it stays active until you cancel it, which is why a missing G80 after a drilling cycle sends the next tool straight into the part at rapid.
For a typical aluminium job in 6061, a Ø10 mm three-flute carbide end mill runs at roughly 3,000–4,000 rpm and 0.08–0.12 mm per tooth, giving a feed near 900–1,400 mm/min. In 316L stainless, drop surface speed hard: 800–1,200 rpm with 0.05–0.08 mm per tooth. In Ti-6Al-4V, go slower still and keep the chip thick enough to carry heat away.
Use G54 through G59 for work offsets and keep the tool length in the H registers. Never hand-edit a proven program on the control unless you log it. A one-character change to a Z value can turn a finishing pass into a crash, and the next operator inherits a file nobody trusts.
Cutter compensation is where new programmers lose time. G41 and G42 need a lead-in move longer than the tool radius, otherwise the control alarms or, worse, cuts the wrong side. If in doubt, program to the centerline of the tool and leave the compensation for a second pass.
- 1Cancel modal cyclesG80 after drilling. Every time.
- 2Lead-in lengthAt least one tool radius before G41 or G42 engages.
- 3Rapids near clampsUse G1 in the last 5 mm before any fixture surface.
Offsets, Dry Run and First Article
Offsets are the bridge between the program and the physical machine. Work offsets place the part in the machine coordinate system. Tool length offsets tell the control how far the tool tip sits from the gauge line. Both are set by the operator and both can be wrong while the program looks perfect on screen.
The dry run is cheap insurance. Run with single block, feed override at 10–25%, and watch the distance-to-go readout. On a first run, keep rapid moves away from the part by lifting Z to a safe plane, typically 50–100 mm above the stock. If the machine has a graphics simulation, use it, but do not treat it as proof: simulation does not know where your clamps are.
Then cut the first article and measure the features that carry the tolerances. If a bore is 0.02 mm undersize and the rest of the part is good, adjust the tool radius offset, not the program. If every feature is shifted in one direction, fix the work offset. If dimensions drift across the part, that is a thermal or workholding problem, and no offset will fix it.
Document the result. Write the offset changes into the setup sheet so the next run starts from a known state. This habit is what separates a shop that repeats work from one that re-solves the same problem every order.
- 1Safe Z plane50–100 mm above the stock for the first run.
- 2Measure earlyCheck the two tightest features before running the full cycle.
- 3Log offsetsWrite the final numbers on the setup sheet after the first article passes.
Step by Step: How to Program CNC Machine PDF Workflow
Follow the order. Each step assumes the previous one is done.
- 11. Freeze the drawing and pick datumsConfirm the revision, then choose A-B-C datums that a machinist can actually touch. Avoid datums on a surface that will be machined away.
- 22. Choose the machine and the number of setupsA part with features on four sides needs either four 3-axis setups or one 4-axis setup. Fewer setups usually means tighter position between faces.
- 33. Build the setup sheetList workholding, zero position, tool numbers, stick-out and the operation order. Keep it to one page.
- 44. Create the CAM file and toolpathsRough with 0.3–0.5 mm radial stock, then finish. Use rest machining on internal corners instead of a smaller tool everywhere.
- 55. Set feeds and speeds per material6061 aluminium: 3,000–4,000 rpm, 0.08–0.12 mm per tooth. 316L: 800–1,200 rpm, 0.05–0.08 mm per tooth. Ti-6Al-4V: lower surface speed, heavier chip.
- 66. Post and review the G-codeCheck the header, the tool list, G80 after every drilling cycle, and that no rapid comes within 5 mm of a clamp.
- 77. Dry run, then cut the first articleSingle block at 10–25% override. Measure the two tightest features, adjust offsets, then release the run.
Which Setup Fits the Part
Use the geometry, not the budget, to pick the first column.
| Part geometry | Setup | Typical tolerance | Watch out for |
|---|---|---|---|
| One face, pockets, simple profiles | 3-axis, one vise | ±0.02 mm | Tool reach on deep pockets |
| Features on two opposite sides | 3-axis, two setups | ±0.02 mm | Datum shift between setups |
| Features on four sides | 4-axis with rotary | ±0.01 mm | Rotation center offset error |
| Contoured surfaces, undercuts | 5-axis simultaneous | ±0.005 mm | Collision near holder |
| Long shafts, Ø400 mm rotary work | Mill-turn or 4-axis | ±0.01 mm | Part deflection under cut |
| Thin walls under 1 mm | 3-axis with light finishing | ±0.02 mm | Chatter and heat distortion |
Print the checklist, then verify on the machine
A good how to program CNC machine PDF is a checklist, not a manual. Freeze the drawing, build the setup sheet, post the code, dry run, cut one part, measure, log the offsets. If your part needs 5-axis contouring or a tolerance at ±0.005 mm, send us the drawing and we will return a DFM review with a quote within 12 hours.
Frequently Asked Questions
Do I need a PDF at all if I have the CAM file?
The CAM file is the source of truth for toolpaths. The PDF is what the operator reads at the machine, and it survives a dropped tablet, a dead battery or a control that will not open the file.
Keep them in sync. When the CAM file changes, reprint the setup sheet the same day, or the bench copy becomes a trap.
Which G-code is safest for a first run?
Program conservative. Lower the feed by 20%, lift the safe Z plane to 100 mm, and run in single block. Once the first article passes, restore the production values and save that as the released program.
Do not leave the conservative version in the machine. Someone will run it on a 500-part order and wonder why the cycle time is wrong.
How do I handle a tolerance tighter than the machine can hold?
Split the work. Machine to within 0.02–0.03 mm, then finish with a spring pass or a dedicated finishing tool at low radial engagement. On our 5-axis centers, ±0.005 mm is achievable when the setup is rigid and the tool is short.
If the feature is a bore, consider boring rather than interpolating. A boring head removes the tool deflection variable entirely.
Can one program run on a different machine?
Only if the control and the post processor match. G-code is not fully portable across control brands, and even two machines of the same model can differ in options and axis travel.
Re-post for the target machine, then dry run again. Never assume a proven program transfers without a check.
What causes chatter on a finishing pass?
Usually tool stick-out, then radial engagement. A cutter held 60 mm out of the holder will sing at almost any speed. Shorten the stick-out first, then reduce radial engagement to 5–10% of the tool diameter.
If the wall is thin, support it or take the finishing pass from both sides. Adding more coolant will not fix a rigidity problem.
Does the material change the programming approach?
Yes. Aluminium forgives, stainless work-hardens, titanium traps heat. In 316L, never let the tool dwell in the cut. In Ti-6Al-4V, keep the chip thick and the surface speed low.
Plastics like POM and PEEK cut fast but move with heat. Leave 0.2 mm for a finishing pass and check the part at room temperature.
Send the drawing, get a manufacturable program plan
Upload your model and tolerance callouts. We review the setup count, tooling and process before quoting.
Quote and DFM in 12 hoursNo minimum order quantity100% inspection before shipment