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

Get Instant Quote

CNC Setup Guide

How to Run a CNC Program

This guide covers what happens on the machine, from loading verified code to proving the first article. It is written for operators and process engineers who already have a post-processed program and need to cut metal without scrapping the setup or crashing the spindle.

Dry run firstSingle blockWork offset checkFirst-article proof
How to run a CNC program: operator setting up a machining center
Quick answer

Key takeaways

Verify before you loadRead the header, tool list and work offset numbers against the setup sheet. Most crashes start with the wrong offset, not the wrong code.
Dry run costs nothingRun the program above the part with rapid override at 25% and the feed hold button in reach. Check every Z approach on the position screen.
Single block the first passStep through each tool change and first entry. Confirm the active tool and H number on the display before the spindle starts.
Prove the first partMeasure the critical features, not the easy ones. Record the deviation and correct the offset before releasing the run.
Write down what changedA two-line note on the setup sheet saves the next operator from repeating the same adjustment.
Before the cycle start

Reading the program and setup sheet together

Before you press anything, compare the program header to the setup sheet. The header usually holds the program number, the part revision, the work offset calls such as G54 through G59, and the tool list. If the revision letter on the screen does not match the drawing in your hand, stop there. Running the wrong revision is one of the few mistakes that cannot be corrected after the fact.

Check the units line next. G20 is inch, G21 is metric. A program written in millimeters and run in inch mode moves 25.4 times farther than intended. The error shows up at the first rapid move, which is exactly when you have the least time to react. Confirm G17 plane selection as well; a wrong plane turns an arc into a straight line or triggers an alarm.

Walk the tool list against the physical carousel. Count the pockets and confirm each tool number matches the holder in that pocket. On a 16-station turret, one tool loaded two pockets out will cut with the wrong geometry and the offsets will not save you. If the shop uses pre-set tooling with measured lengths, confirm those numbers are already in the offset table.

Finally, look at the workholding callouts. The sheet should state the vise jaw position, the stop location, and the minimum clamp height. A part sitting 3 mm above the parallels will move under a roughing pass. Check that the stock sits flat, that the parallels are clean, and that the part cannot rock when you push down on one corner.

  • 1
    Program number and revisionMust match the drawing and setup sheet.
  • 2
    Units and planeG20 or G21, and G17 for XY arcs.
  • 3
    Tool listConfirm pocket position and pre-set length values.
  • 4
    WorkholdingClean parallels, flat seating, no rocking.
Offsets

Setting work offsets and tool lengths without guesswork

Work offsets define where the part is in the machine. Touch off X and Y on a machined surface or a known datum, then record the values in the correct offset page. For a vise setup, X is often the fixed jaw and Y is the stop face. Write the numbers down before you move the axes; a jog in the wrong direction after touching off will cost you the reference.

Z is the one that hurts. Touch the tool to the top of the stock with a 0.1 mm feeler or a gauge block, then subtract the gauge thickness from the recorded value. If you touch off with a 50 mm gauge block, the Z offset must be 50 mm lower than the contact point. Operators who forget this step bury the tool in the vise on the first rapid.

Tool length offsets come from a pre-setter or from touching each tool to a common reference. Pre-set values are only valid if the holder is seated the same way in the spindle every time. Wipe the taper and the flange face before loading. A chip between the flange and the spindle face changes the tool length by more than the tolerance you are trying to hold.

After all offsets are set, call each tool in MDI and bring it to a safe Z height above the part. Watch the machine position display, not the tool tip. The display is the only number the control actually trusts. If the displayed Z does not match your arithmetic, re-check the offset before running any part of the program.

  • 1
    Gauge block correctionSubtract the block thickness from the Z reading.
  • 2
    Clean tapersWipe the holder before every load.
  • 3
    Trust the displayVerify Z on screen before cycle start.
Graphic and distance-to-go

Using dry run and distance-to-go to catch mistakes

Most modern controls offer a graphic simulation and a distance-to-go readout. Use both. The graphic shows the path shape; distance-to-go shows the remaining travel on each axis at any moment. If the Z remaining value suddenly drops to a small number while the tool is still above the part, the program is about to plunge. Hit feed hold and check the block ahead.

Dry run raises the tool by a known amount, usually set in the dry run parameter, and runs the program at rapid. Set the raise value large enough to clear the tallest feature plus the longest tool, typically 50 to 100 mm. Run with rapid override at 25% for the first pass. The point is not to finish quickly; it is to see every move before it happens.

Watch the tool change positions especially. The Z retract height before a tool change must clear the part, the vise, and any clamps. On a 4,000 mm travel machine with tall fixtures, that clearance number can be much larger than the default. If the program retracts to a machine Z that is too low, the tool will drag across the workpiece on its way to the carousel.

Distance-to-go also helps with deep pockets and long tools. A 6 mm end mill at 4× diameter depth will deflect. If the readout shows a full-depth cut in one pass, split it in the program or adjust the depth of cut before running. Dry run does not simulate cutting forces, so use it for geometry and clearance, not for chatter.

  • 1
    Set the raise value50–100 mm above the tallest feature.
  • 2
    Rapid overrideKeep it at 25% for the first dry run.
  • 3
    Check retract heightsMust clear part, vise and clamps.
First cut

Running the first part and proving the setup

Switch to single block and run the first tool through its approach and first cut. Listen to the cut. A light, steady sound means the feed and speed are close. A high-pitched squeal means the tool is rubbing; reduce the feed or increase the speed. A dull thud means the tool is overloaded; reduce the depth of cut before continuing.

After the first feature is cut, stop the program and measure it. Do not wait until the part is finished. If the width is 0.05 mm oversize, correct the cutter compensation or the work offset now, while the error is still one feature deep. Measuring at the end, when the part is out of tolerance in six places, gives you no useful direction.

For a ±0.005 mm tolerance, the first-article measurement needs a controlled environment and a calibrated instrument. A micrometer held in a warm hand reads differently than one on a stand. Let the part cool, wipe it clean, and measure at the same temperature as the inspection room. Record the actual value, not just pass or fail.

Once the first part is in tolerance, run the second part without touching the offsets. If it repeats, the setup is stable. If it drifts, the cause is usually thermal growth or a loose clamp. Check the clamp torque and let the spindle warm up for 10 to 15 minutes before judging the result. A machine that has been sitting cold will move as it heats.

  • 1
    Single block the first toolConfirm approach and first cut before full run.
  • 2
    Measure earlyCorrect the offset after the first feature.
  • 3
    Control the temperatureCool part, calibrated instrument, stable room.
Step by step

How to run a CNC program: 7 steps from load to first article

Follow the order. Skipping a step is how setups get scrapped.

  • 1
    1. Verify the program and revisionOpen the program in the editor and check the program number, revision letter, units line (G20 or G21), and plane selection (G17). Compare against the setup sheet and drawing. If the revision does not match, stop and get the correct file. A wrong revision run to completion is a scrapped batch.
  • 2
    2. Confirm the tool list and offsetsWalk the carousel and match each pocket to the tool list. Confirm pre-set length values are loaded into the offset page. Wipe every holder taper and flange face. A chip under the flange changes tool length by 0.02 mm or more, which is enough to fail a ±0.005 mm tolerance.
  • 3
    3. Load and clamp the workpieceClean the vise jaws and parallels. Seat the stock flat and check for rocking by pressing each corner. Set the stop against a solid face. For thin parts, support the underside with parallels that span the full width. Clamp torque should be enough to hold the cut, not enough to distort the part.
  • 4
    4. Touch off X, Y and ZTouch X and Y on a known datum and record the values in the active offset. Touch Z with a gauge block and subtract the block thickness. For a 50 mm block, the Z offset is 50 mm below the contact point. Re-check the display after each entry; the control only trusts the number in the offset table.
  • 5
    5. Dry run above the partSet the dry run raise to 50–100 mm, rapid override to 25%, and run the full program with the spindle stopped or the tool clear. Watch distance-to-go on Z. Confirm every tool change retract clears the part, vise and clamps. Stop and fix any move that comes closer than 10 mm to a fixture.
  • 6
    6. Single block the first toolRun in single block with feed override at 50%. Confirm the active tool and H number on the display before the spindle starts. Listen to the first cut. Squeal means rubbing; reduce feed or increase speed. Thud means overload; reduce depth of cut. Stop after the first feature and measure it.
  • 7
    7. Prove the first article and releaseMeasure the critical features with a calibrated instrument at room temperature. Correct the offset or cutter compensation if needed. Run the second part without touching offsets and confirm it repeats. Record the final offset values and any program edits on the setup sheet before releasing the run.
Setup checks

What to check, what goes wrong, and how to correct it

Use this as a quick reference during setup.

CheckCommon failureCorrection
Units line (G20/G21)Program runs 25.4× too farRe-post or set the correct unit mode
Work offset X/YPart shifted after first cutRe-touch off on the fixed datum
Z offset with gauge blockTool plunges into viseSubtract block thickness from Z reading
Tool length offsetFeature height off by 0.02 mm+Clean taper, re-measure tool length
Retract heightTool drags across the partRaise the tool change Z in the program
Clamp torquePart moves or distortsSupport the underside, reduce torque
First-article measurementError found after full runMeasure after the first feature

The setup is proven when the second part repeats

A first article in tolerance is good news. A second part that repeats without touching the offsets is proof. If you need a program proved on a new setup, send the drawing and we will quote the run.

FAQs

Questions operators ask before cycle start

Can I run a CNC program without a dry run?

You can, but the risk is not worth the time saved. A dry run with the tool raised 50–100 mm catches wrong offsets, wrong tool numbers and retract heights that are too low. These are the errors that break tools and fixtures.

On a proven program that has run the same setup before, a short dry run of the first few blocks is usually enough. On a new setup or a new revision, run the whole thing.

What feed override should I use on the first part?

Start at 50% and listen to the cut. If the sound is steady and the chips are the right color and shape, increase in steps to 100%. For aluminum, silver chips and a light sound mean the parameters are close. For steel, straw-colored chips are normal.

Never push the override above 100% on a first article. The program was posted for a specific material and tool, and the override is not a substitute for correct speeds and feeds.

How do I know if the work offset is correct?

Call the tool in MDI and bring it to the X and Y datum points. The machine position display should read zero at the datum. If it reads a small number, the offset is slightly off. If it reads a large number, the offset is in the wrong page or the wrong axis.

For Z, bring the tool tip to the top of the stock with the gauge block in place. The display should read the block thickness. If it reads zero, you forgot to subtract the block.

Why does the second part measure differently from the first?

Thermal growth is the usual cause. The spindle and ballscrews warm up during the first part and move the tool relative to the work. Let the machine warm up for 10 to 15 minutes before proving the first article.

A loose clamp or a chip under the part can also cause drift. Check clamp torque and clean the seating surfaces before adjusting the offsets.

Do I need to change the program for different materials?

Yes, if the speeds and feeds were posted for a different material. Aluminum 6061 runs at much higher surface speed than 316 stainless or Ti-6Al-4V. Running aluminum parameters in titanium will destroy the tool in seconds.

If the shop uses a material-specific program library, confirm the program number matches the material on the setup sheet. Do not rely on the operator to remember.

Send the drawing. We will check the setup before quoting

Upload your part file and we will return a quotation and a free DFM analysis within 12 hours. No minimum order quantity, from one prototype to 10,000+ parts.

12-hour quoteNo MOQ100% inspectionNDA on request

Follow

More machining notes

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