Excellon

The Excellon format is widely used to drive CNC drilling and routing machines during printed circuit board (PCB) manufacture. It is a variant of the EIA RS-274-C standard. Only the storage of circles is possible.

Using Excellon Format in the LayoutEditor

The Excellon format can only store circles for a single layer. No other layer information can be stored. The active layer is always stored or loaded. Load, attach and update work as they do for Gerber. Load adds the file to a new cell, attach adds it to the cell on screen, and update replaces the active layer in that cell.

Output

Saving writes the circles on the active layer of the current cell. A polygon is written the same way when the editor recognizes it as a circle. Every other shape is skipped and listed in the save report. The file holds only that cell: references to other cells stay out of it, and the report notes that Excellon has no hierarchy.

The file is plain text. Each line ends with a carriage return and a line feed. The header is always these lines:

M48
VER,1
FMAT,2
INCH,LZ
DETECT,ON
ATC,ON

M48 opens the header and % closes it. INCH,LZ sets inches and leading zeros. Coordinates are absolute and have no decimal point. The implied format is 2.4, so four of the six digits belong after the decimal point. Zeros at the end of that six-digit form are omitted. A value of 1.25 inch is therefore X0125, which stands for 01.2500 inch. A negative value gets a minus sign in front of the digits. When the next hit keeps the same X or the same Y, that axis is left out.

Each distinct diameter becomes one tool, numbered from T01 upward in the order the diameters are met. A tool number below 10 is written with a leading zero. The definition is TnnC plus the diameter in inches, with up to five digits after the decimal point. A zero in front of the decimal point is omitted, and zeros at the end are omitted, so 0.040 inch is T01C.04.

After the header, each tool is selected with Tnn and its hits follow as X and Y lines. M30 ends the file. A layer without circles still gets the header, the percent sign and M30.

M48
VER,1
FMAT,2
INCH,LZ
DETECT,ON
ATC,ON
T01C.04
T02C.1
%
T01
X01Y02
Y025
T02
X005Y005
M30

This example is two holes of 0.04 inch at (1, 2) inch and (1, 2.5) inch, then one hole of 0.1 inch at (0.5, 0.5) inch. The second hit repeats X, so only Y025 is written. 2.5 inch is 02.5000 and becomes 025 once the trailing zeros are removed. 0.5 inch is 00.5000 and becomes 005.

The usual file name ends in drd. Files ending in drl are accepted as well.