PCB NC Drill File Format

To assemble the PCB at Newmatik and to have the bare PCB manufactured at one of our suppliers, we need proper Gerber Files and Drill Files. This article aims at explaining the problem with non-standardized drill files and explains the required data format.

The Problem

CAD software exports often create NC ("numeric control") files that do not conform to any standardized specification. These files often contain a few IPC-NC-349 commands, but follow neither the Excellon nor the IPC-NC-349 specification. Commands are not used properly, or are used in a syntactically incorrect way. Usually, the header is incomplete: the scale or the tool diameters are missing. Sometimes there is no header at all, and the file only contains tool numbers, with an unspecified diameter, and X, Y coordinates, in an unspecified unit. They are often called Excellon files, although they really are undefined NC files.

Receiving non-standardized NC Drill Files means that there is a manual process of data preparation before files are ready for import and usage. This is an avoidable source of error.

Providing XNC (IPC-NC-349) Drill Files

The solution to the problem is providing NC Drill Files in the XNC format.

The XNC format is a strict subset of the IPC-NC-349 specification targeted at data exchange between the PCB designer and the PCB manufacturer. The IPC-NC-349 format is the only IPC standard governing drill and routing formats.

The name XNC format stands for EXchange NC format. As a strict subset, it is highly compatible with existing software. Its purpose is to address the current chaos of different subsets and incomplete NC files, and define a simple common standard. The XNC subset was defined by a consortium formed by Graphicode, Ucamco, KiCad and Pentalogix.

The specification is freely available among others at the Ucamco download page. The specification is brief, detailed, easy to understand and unambiguous.

Dowloads:

Example of a XNC Drill File:

M48 Start of header

METRIC Metric units (mm)

T01C0.6 Tool 1 has diameter 0.6mm

T02C1.0 Tool 2 has diameter 1.0mm

% End of header

G05 Set drill mode

T01 Select tool 1

X8.5Y4.8 Drill a hole of 0.6 mm at coordinates 8.5mm,4.8mm

X8.55Y2.85 Drill

X6.54Y2.85 Drill

X6.45Y4.8 Drill

T02 Select tool 2

G00X10.25Y3.825 Move to coordinates 10.25mm,3.825mm

M15 Plunge rout tool down

G01X6.50Y3.25 Rout to coordinates 6.5mm,3.25mm

M16 Lift rout tool up

M30 End of file

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us