Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.
How to Generate NC Drill Files in Eagle: The Complete Guide for PCB Engineers
Getting your PCB design ready for manufacturing involves more than just routing traces and placing components. One of the most critical steps that many engineers overlook or struggle with is generating proper NC drill files in Eagle. Without accurate drill data, your fab house cannot create the holes your board needs for vias, through-hole components, and mounting hardware.
After spending years working with Eagle and sending countless designs to various PCB manufacturers, I can tell you that drill file problems cause more manufacturing delays than almost any other issue. This guide walks you through everything you need to know about creating NC drill files that your manufacturer will accept without questions or corrections.
What Are NC Drill Files and Why Do They Matter?
NC drill files, also called Excellon files, contain machine-readable instructions for CNC drilling equipment. These files tell the drill machine exactly where to place holes on your PCB and what diameter each hole should be. The format gets its name from Excellon, a company that pioneered CNC drilling systems for the PCB industry decades ago.
Your Gerber files contain the copper traces, solder mask openings, and silkscreen markings for your board. But Gerbers alone cannot tell a manufacturer where to drill. The NC drill file fills this gap by providing X and Y coordinates for every hole along with tool definitions specifying drill bit sizes.
Key Information Contained in NC Drill Files
Data Element
Description
Example
Tool Definitions
Drill bit sizes for each tool number
T01C0.0236 (tool 1 = 0.0236 inch diameter)
Hole Coordinates
X and Y positions for each hole
X7477Y3900
Units
Measurement system used
Inches or millimeters
Format
Coordinate precision
2:4 means 2 integer, 4 decimal places
Zero Suppression
How leading/trailing zeros are handled
Leading or trailing
Without correct drill files, manufacturers cannot produce your boards. Even small errors in format or coordinate systems can result in holes placed in wrong locations or with incorrect sizes.
Understanding Eagle Drill Layers
Before generating drill files, you need to understand how Eagle organizes hole data across different layers. Eagle uses specific layers to represent different types of holes.
Eagle Drill-Related Layers Explained
Layer Number
Layer Name
Purpose
44
Drills
Contains drill symbols for plated through-holes from pads and vias
When you generate NC drill files in Eagle, you typically need to include both Layer 44 (Drills) and Layer 45 (Holes). A common mistake among beginners is selecting Pads and Vias layers instead of Drills and Holes layers. This produces a Gerber file showing pad shapes rather than an actual drill file with coordinate data.
Generating NC Drill Files Using the CAM Processor
Eagle includes a built-in CAM Processor that handles all manufacturing file generation. This tool loads predefined CAM job files that specify which layers to include and what output format to use.
Step-by-Step Process for Eagle 9.x and Later
Open your completed board layout (.brd file) in Eagle. Before generating any manufacturing files, run a Design Rule Check to catch potential problems.
Click the CAM Processor button in the toolbar. It looks like a film strip icon. You can also access it through File → CAM Processor from the menu.
Load a CAM job file by clicking the folder icon and navigating to your cam directory. Eagle includes several built-in job files, but many manufacturers provide their own optimized CAM jobs. The excellon.cam file specifically generates NC drill files.
With the job loaded, review the layer selections. For drill files, you should see layers 44 and 45 selected. The device type should show Excellon or similar drill output format.
Click Process Job to generate the files. Eagle creates the drill file in your project folder with either a .drd or .drl extension depending on your CAM job configuration.
CAM Processor Settings for NC Drill Files
Setting
Recommended Value
Notes
Device
EXCELLON
Standard drill file format
Layers
44, 45
Drills and Holes
Offset X/Y
0
Keep at zero unless manufacturer specifies otherwise
Pos. Coord.
Enabled
Ensures all coordinates are positive
Optimize
Enabled
Reduces drilling time by optimizing tool path
Style
Absolute
Most manufacturers prefer absolute coordinates
Configuring Drill File Format Settings
Different manufacturers may require different format settings for drill files. The most critical settings involve coordinate precision and zero suppression.
Understanding the 2:3 vs 2:4 vs 2:5 Format
The format specification defines how many digits appear before and after the decimal point in coordinate values. Eagle defaults to 2:4 format in newer versions, meaning coordinates use 2 integer digits and 4 decimal digits.
Format
Resolution
When to Use
2:3
0.001 inch (1 mil)
Older equipment, simple boards
2:4
0.0001 inch (0.1 mil)
Standard precision, most boards
2:5
0.00001 inch (0.01 mil)
High density designs, fine pitch components
Higher precision prevents small rounding errors that can cause holes to appear slightly off-center on pads. For boards designed in imperial units with fine-pitch components, using 2:4 or 2:5 format reduces positioning errors.
Modifying Eagle’s Default Drill Precision
To change the default drill precision, locate the EAGLE.DEF file in your Eagle installation bin folder. Find the EXCELLON section and modify the ResX and ResY values.
ResX/ResY Value
Resulting Format
1000
2:3 format
10000
2:4 format
100000
2:5 format
After editing, restart Eagle for changes to take effect. Always make a backup of the original file before editing.
Zero Suppression Options
Zero suppression determines how the drill file handles leading and trailing zeros in coordinate values. Eagle typically uses leading zero suppression by default.
Suppression Type
Coordinate Example
Notes
Leading
X7477Y3900 (from X007477Y003900)
Most common in Eagle
Trailing
X74770Y39000 (zeros at end removed)
Some older equipment
None
X007477Y003900
All digits present
Most modern fabrication equipment auto-detects the format, but mismatches between your file settings and the fab house’s equipment settings can cause coordinates to scale incorrectly by factors of 10.
Working with Older Eagle Versions
If you are using Eagle 7 or earlier versions, the process differs slightly. The CAM Processor interface looks different, and you may need to run a ULP script before generating drill files.
Using drillcfg.ulp for Drill Configuration
Run the drillcfg.ulp script by going to File → Run ULP and selecting drillcfg.ulp. This script creates a drill rack file (.drl) that maps hole sizes to tool numbers. The rack file helps ensure your drill file uses consistent tool assignments.
Select your preferred units (inches or millimeters) when prompted. The script analyzes your board and lists all unique drill sizes used in the design.
After running drillcfg.ulp, proceed to the CAM Processor and load the excellon.cam job. The processor uses the rack file information when generating the final drill output.
Handling Slotted Holes and Special Drill Requirements
Standard round holes work straightforwardly with NC drill files. Slotted holes for components like USB connectors or power jacks require extra attention because Eagle lacks native slot support.
Creating Slotted Holes in Eagle
Draw slotted holes in the Milling layer (46) using lines and arcs. Place these shapes in your footprint design rather than directly on the board. Use zero-width lines to define the slot path.
Include the Milling layer in your board outline Gerber output so the manufacturer receives slot information. Some CAM jobs merge milling layer content into the outline file automatically.
Communicate with your fab house about slot requirements. Provide minimum slot width specifications, as most manufacturers require at least 0.65mm width for plated slots.
Verifying Your NC Drill Files Before Submission
Never send drill files to manufacturing without verification. Use a Gerber viewer that also supports Excellon drill files to overlay your drills on the copper layers.
Recommended Free Gerber and Drill File Viewers
Viewer
Platform
Key Features
Gerbv
Windows, Linux, macOS
Open source, lightweight, reliable Excellon support
ViewMate
Windows
Professional features, widely trusted in industry
ZofzPCB
Windows
3D visualization, shows drill holes through layers
KiCad Gerber Viewer
Windows, Linux, macOS
Built into KiCad but works standalone
HQDFM Online
Web-based
DFM checking included, no installation needed
Load all your Gerber layers and the drill file into the viewer. Zoom in on critical areas and verify that holes appear centered on pads. Check that via holes align with via pads on both top and bottom copper layers.
Common Verification Checks
Confirm the total hole count matches your design. Eagle’s DRI (Drill Info) file lists all drill sizes and quantities, which you can compare against your viewer’s drill summary.
Verify hole sizes match your design intent. The drill file header section lists tool definitions with their diameters. Cross-reference these against your component datasheets and via specifications.
Check that board outline and drills use the same coordinate origin. Mismatched origins cause all holes to appear shifted from their intended positions.
Common NC Drill File Problems and Solutions
Even experienced engineers encounter drill file issues. Understanding common problems helps you troubleshoot quickly.
Troubleshooting Drill File Issues
Problem
Likely Cause
Solution
Holes scaled 10x or 0.1x
Format mismatch (2:3 vs 2:4)
Match format to viewer/fab settings
Holes missing from file
Wrong layers selected in CAM
Select layers 44 and 45, not Pads/Vias
Holes offset from pads
Different Pos. Coord settings
Use same setting for all CAM outputs
Error: DRILLS MISSING
Components with incompatible drill definitions
Check library footprints, run drillcfg.ulp
Single hole size for all
Used Gerber device instead of Excellon
Change device type to EXCELLON
The most frequent mistake involves selecting the wrong layers. Remember that layer 44 (Drills) contains the drill coordinate data, not the Pads layer which shows copper shapes.
File Naming and Organization for Manufacturing
PCB manufacturers receive files from many different EDA tools. Using clear, consistent file names helps prevent confusion and processing errors.
Recommended File Extensions and Naming
File Type
Common Extensions
Description
NC Drill File
.drd, .drl, .xln, .txt
Excellon drill data
Drill Info
.dri
Tool table and statistics
Top Copper
.gtl
Gerber top layer
Bottom Copper
.gbl
Gerber bottom layer
Board Outline
.gko, .gm1
Board dimensions
Solder Mask Top
.gts
Top solder mask
Solder Mask Bottom
.gbs
Bottom solder mask
Silkscreen Top
.gto
Top silkscreen
Silkscreen Bottom
.gbo
Bottom silkscreen
Package all manufacturing files into a single ZIP archive. Include a readme file listing board specifications like thickness, copper weight, and surface finish requirements.
Working with Different PCB Manufacturers
Different fab houses may have slightly different requirements for drill files. Always check your manufacturer’s design guidelines before generating final outputs.
Manufacturer-Specific Considerations
JLCPCB provides custom CAM job files optimized for their production process. Download and use their provided CAM files for best results. They prefer Gerber RS-274X format and specific file extensions.
PCBWay offers an online Gerber viewer where you can upload and verify files before ordering. Their system auto-detects most format settings but review the parsed results carefully.
OSH Park recommends specific zero suppression and format settings. Their documentation covers common issues like blind/buried vias that affect drill file processing.
Always verify your files using the manufacturer’s online tools when available. These tools parse files exactly as their production systems will, catching potential problems before fabrication begins.
Useful Resources for Eagle NC Drill File Generation
Having the right resources saves time and prevents errors when preparing manufacturing files.
Official Documentation and Downloads
Resource
URL
Description
Autodesk Eagle Documentation
autodesk.com/eagle
Official manuals and tutorials
JLCPCB CAM Files
jlcpcb.com/help
Pre-configured CAM jobs for JLCPCB
PCBWay Help Center
pcbway.com/helpcenter
Gerber generation guides
Gerbv Viewer Download
gerbv.github.io
Open source viewer
ViewMate Download
pentalogix.com
Professional Gerber viewer
Useful ULP Scripts
The drillcfg.ulp script comes with Eagle and creates drill rack files. Some component libraries may include optimized versions.
The drill-aid.ulp script creates visual drill markers on documentation layers, helpful for generating assembly drawings.
Community-developed ULPs for specific manufacturer requirements can be found on the Autodesk forums and various PCB design communities.
Frequently Asked Questions
What is the difference between Gerber files and NC drill files?
Gerber files describe 2D image data for PCB layers like copper traces, solder mask, and silkscreen. NC drill files contain coordinate data specifically for drilling operations. Gerbers show what the layer looks like, while drill files tell machines exactly where to place holes. You need both file types for PCB manufacturing because Gerbers cannot represent drill operations.
Why does my drill file show holes in wrong positions when I view it?
Position errors usually result from format mismatches between your file and the viewer settings. Check if your file uses 2:3, 2:4, or 2:5 format and configure your viewer accordingly. Also verify zero suppression settings match. A format mismatch causes coordinates to scale by factors of 10, making holes appear dramatically mispositioned.
Can I generate Gerber and drill files in a single CAM job?
Yes, modern Eagle versions support CAM jobs that output both Gerber files and NC drill files together. Many manufacturer-provided CAM files include all necessary outputs in one job. When you process the job, Eagle generates all files and optionally packages them into a ZIP archive. This approach reduces the chance of forgetting individual files.
What layers should I select for NC drill file generation in Eagle?
Select layer 44 (Drills) and layer 45 (Holes) for NC drill output. Layer 44 contains plated through-holes from pads and vias. Layer 45 contains non-plated holes like mounting holes. Do not select the Pads or Vias layers, as these produce Gerber images of pad shapes rather than drill coordinate data.
How do I include slotted holes in my drill files from Eagle?
Eagle does not natively support slotted holes in drill files. Draw slots using lines and arcs on the Milling layer (46) within your component footprints. Include the Milling layer in your board outline Gerber output. Communicate slot requirements to your manufacturer separately, as some handle slots through routing files rather than drill files. Many fab houses merge milling data into the outline layer automatically.
Final Thoughts on NC Drill File Generation
Generating accurate NC drill files in Eagle becomes routine once you understand the underlying concepts. Remember that drill files and Gerber files serve different purposes, select the correct layers (44 and 45) for drill output, verify your files before submission, and communicate with your manufacturer about any special requirements.
Taking extra time to verify drill files saves significant time and money compared to discovering problems after boards arrive. A few minutes of careful checking prevents weeks of delay from manufacturing errors that require respins.
Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.