GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

Setup procedure

CNC Planning Debugging and Calibration Methods

This page is a shop-floor procedure for planning, debugging and calibrating a CNC program before it runs a real batch. It is written for process engineers, setup machinists and buyers who have to sign off a first article. Read it and you can judge which checks are worth the cycle time and which ones you can skip on a given part.

7-step sequence±0.005 mm capabilityFirst-article sign-off
CNC planning debugging and calibration methods: key steps on a machine tool
Quick answer

What matters most

Geometry first, offsets secondSquareness and level errors make every tool offset wrong. Fix the frame before you touch the tool table.
Warm up before you measureA spindle that has run 30 minutes holds a different zero than a cold one. Cut the warm-up into the plan.
One variable per runChange speed, then feed, then depth. Changing three at once tells you nothing about which one caused the chatter.
Air-cut the whole pathSingle block through every tool change and retract. A crash on a 4,000 mm part costs more than an hour of dry run.
Record the numbersWrite down backlash, thermal drift and probe repeatability. The next job on the same machine starts from those numbers.
Planning

Planning the cut before the machine moves

Planning is the part of CNC planning debugging and calibration that happens at a desk, not at the control. Start with the drawing: datum scheme, tightest tolerance, tightest surface callout, and any feature that cannot be reached in one setup. Those four items decide the setup count before you pick a machine.

Then match the part envelope to machine travel. A 600 × 600 × 600 mm envelope covers most fixture plates and housings; a 4,000 × 400 × 150 mm travel is for long extrusions and rails. If the part needs five faces in one setup, a simultaneous 5-axis center removes two fixtures and the stack-up error that comes with them.

Sequence the operations from the datum outward. Rough the faces that will be re-machined, semi-finish everything, then finish only the surfaces that carry the tolerance. Leaving 0.3–0.5 mm on finishing passes keeps heat and deflection out of the final cut.

Write the plan so a second machinist can run it. Tool list, holder, stick-out, coolant type, and the measurement method for each tight feature. A plan that only lives in one person's head is the most common cause of a failed second run.

  • 1
    Datum choicePick a datum you can hold during every operation, not the prettiest face.
  • 2
    Setup countEvery extra setup adds roughly 0.01–0.02 mm of position error.
  • 3
    Fixture stiffnessThin walls need support, not more clamp pressure.
Machine baseline

Calibrating the machine frame

Calibration starts with the frame. Check level and bed flatness with a precision level and a granite square. On a machine that has been moved or has just come off a heavy job, squareness between X and Y is the first number to verify. A 0.02 mm/m squareness error becomes 0.08 mm over a 4,000 mm travel.

Next, measure backlash on each axis. Command a move of 0.05 mm in both directions and read the difference with a dial indicator on the table. Values above 0.005 mm on a finishing axis need compensation in the control or a mechanical adjustment to the thrust bearing and nut.

Then check spindle geometry: taper runout, face runout and spindle-to-table squareness. Taper runout above 0.003 mm shows up as a size spread on a reamed hole, and no tool offset can remove it. Clean the taper by hand before you measure, not with a rag on a spinning spindle.

Finish the baseline with a ballbar or laser check of circularity and positioning. Record the numbers in a machine log. Calibration without a log is a guess you repeat every quarter.

  • 1
    Level and square0.02 mm/m error grows with travel, not with part size.
  • 2
    BacklashMeasure at the working position, not at mid-travel.
  • 3
    Spindle runoutAbove 0.003 mm, fix the spindle before blaming the tool.
Tool setting

Tool setting and offset verification

Tool setting is where most size errors are born. Clean every holder taper and every collet bore before it goes in the spindle. A chip 0.01 mm thick under the collet moves the cutting edge by roughly the same amount and shows up as a parallel offset on the part.

Measure length and diameter on a pre-setter or with a probe, then verify on the machine with a test cut. The test cut matters more than the setting. Cut a 20 mm wide shoulder, measure it, and compare against the commanded value. A difference of 0.02 mm tells you the effective diameter is not what the catalog says.

For multi-tool work, set a master tool and reference the rest against it. Tool-to-tool mismatch of 0.01–0.03 mm is normal on a used machine, and it is the reason a face that should be flush ends up stepped.

Keep a wear offset routine. After every 20–30 parts, measure one feature and adjust wear by half the deviation. Chasing the full deviation at once causes oscillation between undersize and oversize parts.

  • 1
    Clean tapersA chip under the collet shifts the edge by its own thickness.
  • 2
    Master toolReference every other tool to one proven length.
  • 3
    Wear offsetsCorrect half the deviation, then re-measure.
Program debug

Debugging the program at the control

Program debugging is a sequence, not a single act. Read the code away from the machine first and mark every tool change, every rapid approach and every retract height. Most collisions happen on the approach move, not in the cut.

Then run the program with the tool offset shifted +50 mm in Z and the feed override at 0. The path runs in air and you see the whole cycle once, at full rapid, without touching material. Watch the distance-to-go display on the approach into each pocket.

After the air run, cut a soft blank. Aluminum or machinable wax costs little and shows the real geometry. Measure the blank feature by feature and compare with the drawing before you commit stock.

Only then run the first real part with the feed override at 30–50%, single block on, and the rapid override at 25%. Raise speed as the cut proves stable. A finishing pass at Ra 0.8–1.6 μm should sound steady; rising pitch means the tool is rubbing, not cutting.

  • 1
    Mark approach movesRapid into a pocket is the classic crash point.
  • 2
    Soft blankProve geometry on wax or aluminum before real stock.
  • 3
    Override discipline30–50% feed on the first part, then step up.
Thermal and in-process

Thermal drift and in-process checks

A machine grows as it warms. A spindle running 12,000 rpm for 40 minutes can shift Z by 0.01–0.03 mm on a small vertical center, and more on a large gantry. That is the same order as the tolerance you are trying to hold.

Warm up deliberately: run the spindle at the production speed for 20–30 minutes, with axis movement, before the first finishing cut. If the shop temperature swings more than 3–4 °C between morning and afternoon, plan the tightest features for a stable window and check them again at the end of the shift.

In-process probing pays for itself on features that are hard to measure later. Probe a datum or a bore every 10–20 parts, log the deviation, and let the control apply a work offset. This catches drift before it becomes scrap.

Coolant matters too. Cold coolant straight from the chiller can pull 0.005–0.01 mm out of a thin aluminum wall. Let the sump stabilize at shop temperature, and keep the concentration where the tool life data says it should be.

For a part held to ±0.005 mm, treat the whole cycle as a measurement system: machine, fixture, tool and gage. If the gage repeats to only 0.005 mm, you cannot tell a good part from a marginal one.

  • 1
    Warm-up20–30 minutes at production speed before finishing.
  • 2
    Probe cadenceEvery 10–20 parts on the critical feature.
  • 3
    Gage repeatabilityShould be about one tenth of the tolerance.
Procedure

Step-by-step setup and sign-off

Run in order. Skipping a step moves the error downstream.

  • 1
    1. Review drawing and datumList the tightest tolerance, tightest finish and any feature needing a second setup. Confirm the datum is reachable in every operation.
  • 2
    2. Verify machine geometryLevel and squareness to 0.02 mm/m, backlash under 0.005 mm on finishing axes, taper runout under 0.003 mm. Log the numbers.
  • 3
    3. Warm up the spindleRun 20–30 minutes at the production rpm with axis movement. Do not measure offsets on a cold machine.
  • 4
    4. Set and verify toolsClean tapers, set length and diameter, then test-cut a 20 mm shoulder and compare with the commanded size. Adjust to within 0.01 mm.
  • 5
    5. Air-cut the full pathShift Z +50 mm, feed override 0, run the complete program including tool changes. Watch the approach into every pocket.
  • 6
    6. Cut a soft blankMachine wax or aluminum, measure every tight feature, and correct the program before committing stock.
  • 7
    7. Run first article at reduced feedFeed override 30–50%, single block on, rapid override 25%. Measure against the drawing and record actual values.
  • 8
    8. Confirm and releaseCheck surface finish against the callout (Ra 0.8–1.6 μm for a fine finish), sign the first-article record, then raise feed to 100% and start the batch.
Judgement

Which checks to run, and when

Time cost is per setup, per machine.

CheckWhen to run itTime costSkip it when
Level and squarenessAfter a move or a heavy job2–4 hMachine is stable and logged in the last quarter
Backlash measurementMonthly, or after a crash30–60 minAxis was compensated and verified this month
Spindle runoutBefore any reaming or boring job15 minOnly drilling and roughing on the job
Tool test cutEvery new tool or new holder10–20 minTool and holder are proven on the same material
Air cut of full pathEvery new program30–90 minProgram is a proven repeat with no edits
Soft blank first articleNew part, new fixture, tight tolerance1–2 hRevision change on an existing proven part
In-process probingBatches over 20 parts, tolerance ≤0.02 mm5–10 s/partLoose tolerance and short run
Thermal drift checkLong cycles or wide shop temperature swing20 minShort cycle in a temperature-controlled room

Where this pays off

If a part carries a tolerance of ±0.005 mm or a finish callout of Ra 0.8–1.6 μm, the planning and calibration time is cheaper than one scrapped batch. On loose-tolerance work, run the geometry and tool checks and skip the rest.

FAQs

Common questions

How often should a CNC machine be calibrated?

Level and squareness checks are worth running once a quarter on a stable machine, and immediately after a move, a foundation repair or a heavy crash. Backlash and spindle runout belong on a monthly routine.

If the shop has no log, start one today. Comparing this month's numbers with last month's is what turns calibration from a ritual into a maintenance signal.

Can I hold ±0.005 mm without a temperature-controlled room?

Yes, within limits. A stable shop with small day-to-night swings can hold ±0.005 mm on parts under roughly 200 mm when the spindle is warmed up and the fixture is rigid.

Beyond that, thermal growth and gage repeatability start to dominate. On long parts, plan the tight features early in the shift and re-check them before the batch ends.

Why does the first part measure well and the tenth part drift?

Heat. The spindle, ballscrews and coolant warm up over the first 20–30 minutes of cutting, and the machine geometry moves with them. The first part is often cut on a cold machine and the tenth on a warm one.

Warm up before the first finishing cut, and probe the critical feature every 10–20 parts so the control can correct the work offset.

Should we probe every part on a tight job?

Probe on a cadence, not on every part. Every 10–20 parts catches drift early without adding cycle time to the whole batch.

Probe every part only when the feature is safety-critical or when the material is inconsistent, such as castings with varying stock.

What is the most common debugging mistake?

Changing several variables at once. Speed, feed and depth of cut all affect chatter and finish, and if you move all three between two test cuts, the result tells you nothing.

Change one variable, cut, listen, measure. It is slower for the first hour and much faster for the rest of the batch.

Send us the drawing and the tolerance

Tell us the tightest feature on your part. We review the setup plan, quote within 12 hours, and send a DFM note if the tolerance needs a different process.

Quote in 12 hoursNo minimum order quantityNDA on request

Follow

More from the shop floor

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC