Fixing Eagle Drill File Output

Ok, using all of the sparkfun tutorial plus this change to the eagle.def file.

Search for [Excellon] and replace the section with this:

[EXCELLON]

Type     = DrillStation
Long     = "Excellon drill station"
Init     = "%%\nM48\nM72\n"
Reset    = "M30\n"
ResX     = 1000
ResY     = 1000
;Rack     = ""
DrillSize  = "%sC%0.4f\n"        ; (Tool code, tool size)
AutoDrill  = "T%02d"             ; (Tool number)
FirstDrill = 1
BeginData  = "%%\n"
Units    = Inch
Select   = "%s\n"                ; (Drill code)
Drill    = "X%1.0fY%1.0f\n"      ; (x, y)
Info     = "Drill File Info:\n"\
           "\n"\
           " Data Mode         : Absolute\n"\
           " Units             : 1/10000 Inch\n"\
           "\n"

Only the RESX and RESY need changing and this should work with version 4.15

This is the output i get:

%
M48
M72
T01C0.0240
T02C0.0320
T03C0.0400
%
T01
X476Y184
X626Y134
X726Y134
X876Y134
X1501Y309
X1701Y309
X1826Y134
X1926Y134
X1126Y1009
X1026Y1059

Sparky can correct me, but this is 2.3 format (2 digits left and 3 digits right of the decimal point) with Leading Zero Suppression (And zeros on the left are not included).

The tools are defined correctly and everything looks ok :smiley:

When i get some time i will email nathan the files to double check.

Regards,

  • Martyn

Is this change needed for Eagle 4.13,4.14, or both?

edit: getting these silly versions confused…

eeeeek, i have no idea!

Erm, someone else might be able to help. I have never had problems and i think i was using 4.13, so 4.14 might need updating…

The following .def modifications seem to get me the correct format; but I haven’t yet been able to submit my drill files to SFE.

I’m using Eagle 4.15 under winblows xp:

[EXCELLON]

Type     = DrillStation
Long     = "Excellon drill station"
Init     = "%%\nM48\nM72\n"
Reset    = "M30\n"
ResX     = 1000
ResY     = 1000
;Rack     = ""
DrillSize  = "%sC%0.4f\n"        ; (Tool code, tool size)
AutoDrill  = "T%02d"             ; (Tool number)
FirstDrill = 1
BeginData  = "%%\n"
Units    = Inch
Select   = "%s\n"                ; (Drill code)
;Drill    = "X%1.0fY%1.0f\n"      ; (x, y)
Drill    = "X%05.0fY%05.0f\n"      ; (x, y)
Info     = "Drill File Info:\n"\
           "\n"\
           " Data Mode         : Absolute\n"\
           " Units             : 1/10000 Inch\n"\
           "\n"

[EXCELLON_RACK]

Type     = DrillStation
Long     = "Excellon drill station with user supplied rack file"
Init     = "%%\nM48\n"
Reset    = "M30\n"
ResX = 1000
ResY = 1000
;Rack     = ""
DrillSize  = "%sC%0.4f\n"        ; (Tool code, tool size)
Select   = "%%\n%s\n"                ; (Drill code)
;Drill    = "X%1.0fY%1.0f\n"      ; (x, y)
Drill    = "X%05.0fY%05.0f\n"      ; (x, y)
Info     = "Drill File Info:\n"\
           "\n"\
           " Data Mode         : Absolute\n"\
           " Units             : 1/10000 Inch\n"\
           "\n"

Example output for my small 1x0.6 board using EXCELLON_RACK :

%
M48
T01C0.0200
T32C0.0930
%
T01
X00285Y00302
X00401Y00238
X00386Y00152
X00532Y00270
X00584Y00267
X00665Y00405
X00493Y00444
X00444Y00388
X00256Y00587
X00425Y00803
X00256Y00888
X00209Y01015
X00392Y01256
X00563Y01146
X00615Y01143
X00703Y01025
X00655Y00968
X00482Y01008
X00746Y01174
X00761Y01261
X00863Y01110
X00891Y00825
X00723Y00609
X00891Y00524
X00938Y00397
X00756Y00157
%
T32
X00774Y00489
X00774Y00924
X00374Y00924
X00374Y00489
M30

Hope this helps someone.

If I used Ptucks example above; Viewmate put the drills way outside the margins of the board. With this format; it seems to work correctly in viewmate 9.2.27

zitt:
If I used Ptucks example above; Viewmate put the drills way outside the margins of the board. With this format; it seems to work correctly in viewmate 9.2.27

ViewMate defaults to 3.4 format. Before you "Import" the drill file, click on "Options" and change the Data Format. You want Left of decimal: 2, Right of decimal: 3 and select Omit leading zeros. Click on "OK" then click on "Import".

Don

Looks promising.

zitt:
The following .def modifications seem to get me the correct format; but I haven’t yet been able to submit my drill files to SFE.

Example output for my small 1x0.6 board using EXCELLON_RACK :

%

M48
T01C0.0200
T32C0.0930
%
T01
X00285Y00302
X00401Y00238
X00386Y00152
X00532Y00270



Hope this helps someone.

I’m patiently waiting for Sparky/Ben/Someone to comment on whether this works well for SFE.

Jake

donblake:

zitt:
If I used Ptucks example above; Viewmate put the drills way outside the margins of the board. With this format; it seems to work correctly in viewmate 9.2.27

ViewMate defaults to 3.4 format. Before you "Import" the drill file, click on "Options" and change the Data Format. You want Left of decimal: 2, Right of decimal: 3 and select Omit leading zeros. Click on "OK" then click on "Import".

Don, thanks…

however this wasn’t the problem.

First; I was setting the options to 2.3 prior to importing. Still had the problem.

Second, your suggesion to set “omit leading zeros” is contrary to SFE’s tutorial:

http://www.sparkfun.com/tutorial/PCB/Custom-PCB-FAQ.htm

which clearly states to set “Suppress trailing zeroes”

yes that had been one problem with the eagle files, that TZ was used not LZ (trailing/leading zero supression).

When u email sparkfun with the PCB you are asked to include any notes. If using eagle, and u know the format put that in. If might mean a few extra clicks, but saves time. I think i put in Created in Eagle. Drill File is 2.3 LZ Supression.

pittuck:
Sparky can correct me, but this is 2.3 format (2 digits left and 3 digits right of the decimal point) with Leading Zero Suppression (And zeros on the left are not included).

zitt:
Second, your suggesion to set “omit leading zeros” is contrary to SFE’s tutorial:

http://www.sparkfun.com/tutorial/PCB/Custom-PCB-FAQ.htm

which clearly states to set “Suppress trailing zeroes”

The **NC Drill Setup** screen shot does indeed show "Suppress trailing zeros" selected. However, the **veg.drd - Notepad** screen shot shows trailing zeros included.

pittuck:
yes that had been one problem with the eagle files, that TZ was used not LZ (trailing/leading zero supression).

And from SFE's tutorial:

Also remember, we like 2.3 trailing format.

So, which is it: suppress trailing zeros or include trailing zeros. The [[Tutorial for EAGLE CAD](http://www.sparkfun.com/tutorial/PCB/eagle-output-tutorial.htm) makes no mention of the drill file format. If SFE really wants "omit leading zeros", is there a way to do so using EAGLE?

Don](http://www.sparkfun.com/tutorial/PCB/eagle-output-tutorial.htm)

well, my PCB went through fine. I dont think you can force eagle to do too much, just tell spark fun about your files and it should be fine.

The main gerber files are fine in almost any format as they contain information on their format (the file actually includes a description of itself! How unusuall ;)).