Leading/Trailing Zeros in DRD file

I recently submitted a number of files to BatchPCB and was notified by Eric that he was having problems with my drill files because leading and trailing zeros were omitted.

I am using Eagle 5.1.0 lite layout software with default settings. To generate the files I first made sure layers 29 & 30 where turned on, ran ‘silk_gen.ulp’ to correct the silk screen line widths, and the executed SFE-special.cam to generate the files requireed. Then I just zipped them and sent them.

My question is how do I enable leading/trailing zeros in Eagle 5.1.0?

I have attached one of my drill files if it helps:

%

M48

M72

T01C0.0240

T02C0.0320

T03C0.0360

T04C0.0400

T05C0.0470

T06C0.0472

T07C0.1102

%

T01

X18302Y4691

X18302Y7691

T02

X14802Y6691

X14802Y4691

X8302Y4691

X6802Y4691

X6802Y6691

X8302Y6691

X7802Y8191

X7802Y9191

X4802Y9191

X4802Y8191

X21802Y6691

X23302Y6691

X22302Y8191

X22302Y9191

X25302Y9191

X25302Y8191

X23302Y4691

X21802Y4691

T03

X19802Y6191

X18802Y6191

X17802Y6191

X12302Y6191

X11302Y6191

X10302Y6191

X4802Y6191

X3802Y6191

X2802Y6191

X25302Y6191

X26302Y6191

X27302Y6191

T04

X17302Y9191

X16302Y9191

X15302Y9191

X14302Y9191

X13302Y9191

X12302Y9191

X11302Y9191

X10302Y9191

T05

X1342Y1711

X6262Y1711

X8842Y1711

X13762Y1711

X15842Y1711

X20762Y1711

X23842Y1711

X28762Y1711

X28762Y3671

X23842Y3671

X20762Y3671

X15842Y3671

X13762Y3671

X8842Y3671

X6262Y3671

X1342Y3671

T06

X18802Y9191

X19802Y9191

T07

X28302Y8691

X1802Y8691

M30

Any help would be greatly appreciated.

Sorry, we do not use Eagle at all.

It’s odd that that should be a problem, I just looked at a drd file generated with the Excellon device in Eagle 4.16r2’s CAM manager and it has no leading zeros (though it does have trailing ones). It’s a design I’ve submitted to BatchPCB recently without problems.

Could you look in the BIN directory of your Eagle installation for the EAGLE.DEF file? Inside it, near the end (in mine at least) there’s a [EXCELLON] section. If you could paste the contents of that section here we could see what’s different.

Eagle 4.16r2:

[EXCELLON]

Type     = DrillStation
Long     = "Excellon drill station"
Init     = "%%\nM48\nM72\n"
Reset    = "M30\n"
ResX     = 10000
ResY     = 10000
;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"

Oh, and BTW, Eagle 5.2.0 is out, apparently it fixes a recent major bug with the CAM processor.

Lucien,

Thanks for the reply. I checked the [Excellon] section in my EAGLE.DEF file and it is exactly like the one you posted.

[EXCELLON]

Type     = DrillStation
Long     = "Excellon drill station"
Init     = "%%\nM48\nM72\n"
Reset    = "M30\n"
ResX     = 10000
ResY     = 10000
;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"

Also, when I view the DRD file in Viewmate, it appears to be okay.

I will upgrade to Eagle 5.2 and see if that fixes the problem when I resubmit the PCB’s to BatchPCB.

I’m beginning to think it is BatchPCB’s problem on how they import the DRD file.

Thanks Again, Ronnie

Actually, given that there’s no difference in the Excellion stuff there, I’m guessing that there’s no difference in the format of your submission and any other passing submission. I’d be interesting to hear from Eric or someone what exactly was fouling it up, so that we can all make an effort to avoid it.

And thinking about it, it can’t be a case of leading AND trailing zeros being omitted because there’s no decimal point in the data. It simply wouldn’t make sense for a CAM processor to generate data that way.

From what I can tell, the X/Y numbers are 1/10000’s of an inch. I have a single 2x5 0.1" pitch header in a design and in my .drd file, it’s clear that 5 of the holes are shifted by 1000 steps from the other 5.

It might be possible to edit the “Drill” line to provide leading zeros, but again I don’t think this is necessary as I’m not aware of anyone having to do this before.

Also, I doubt updating to v5.2 will make a difference here.