Author Topic: How do you read a drill file?  (Read 804 times)

0 Members and 1 Guest are viewing this topic.

Offline Pack34Topic starter

  • Frequent Contributor
  • **
  • Posts: 753
How do you read a drill file?
« on: September 22, 2021, 08:33:32 pm »
Is there some good documentation on the commands and how to parse? I think I'm seeing a discrepency between the output drill file in OrCAD and what I'm seeing in the software. I just had a part made by my librarian and I'm only seeing the first hole on the new connector with a drill.

The header seems to be fine with the correct number of drills.

Code: [Select]
;   Holesize 1. = 12.000000 Tolerance = +0.000000/-12.000000 PLATED MILS Quantity = 18
;   Holesize 2. = 39.370000 Tolerance = +2.950000/-2.950000 PLATED MILS Quantity = 8
;   Holesize 3. = 41.340000 Tolerance = +2.950000/-2.950000 PLATED MILS Quantity = 20
;   Holesize 4. = 133.860000 Tolerance = +3.940000/-3.940000 PLATED MILS Quantity = 3

But from what I can tell, this section is for the Holesize 3 that's for the new connector
Code: [Select]
M00
X0022000Y0113000
R09Y-0010000
X0230000Y0022000
R09X-0010000

Whereas, the holesize 2 section looks fine.
Code: [Select]
M00
X0103000Y0133000
X0093000Y0133000
X0240000Y0085000
X0230000Y0085000
X0188000Y0132000
X0178000Y0132000
X0288000Y0133000
X0278000Y0133000

There seems to be 18 XY entries for holesize 1 (vias), 8 XY entries for holesize 2, 3 XY entries for holesize 4 (mounting holes) but that section for holesize 3 only has two.

Does the R09Y-00100000 specify arraying that previous location by 9, in the Y direction at a spacing of 100mils?
 

Offline Niklas

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: se
Re: How do you read a drill file?
« Reply #1 on: September 22, 2021, 09:21:26 pm »
R#
This command drills a series of equally spaced holes from the previously specified hole. The number following the R specifies the number of repeats. An X and/or Y coordinate must be used to define the spacing between hole centers.
https://www.artwork.com/gerber/drl2laser/excellon/index.htm

X0022000Y0113000
- Specifies the first hole

R09Y-0010000
- Specifies an array of 9 holes with identical spacing referenced to the first hole
 
The following users thanked this post: Pack34

Offline Pack34Topic starter

  • Frequent Contributor
  • **
  • Posts: 753
Re: How do you read a drill file?
« Reply #2 on: September 22, 2021, 09:29:27 pm »
Thanks!

This is the first time I'm diving into one of these. It looks like the setup for these is surprisingly manual. Drill sizes specified in the header with each drill type having an XY plot and a END delimiter between each section.
« Last Edit: September 22, 2021, 09:53:25 pm by Pack34 »
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2391
  • Country: gb
  • Recovering Electrical Engineer
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3356
  • Country: nl
Re: How do you read a drill file?
« Reply #4 on: September 26, 2021, 06:06:39 pm »
Those drill files "evolved" together with gerber file formats over the last 50+ years or so, and many dialects exist.
Your files appear to be in a quite old and deprecated fixed point format.
For your reference I'll give you an example of a drill file as generated with KiCad, which has decimal dots in the numbers, and a header that specifies it's in metric millimeters.


M48
; DRILL file {KiCad 5.1.10-88a1d61d58~89~ubuntu20.04.1} date Sun Sep 26 19:56:41 2021
; FORMAT={-:-/ absolute / metric / decimal}
; #@! TF.CreationDate,2021-09-26T19:56:41+02:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.10-88a1d61d58~89~ubuntu20.04.1
; #@! TF.FileFunction,Plated,1,2,PTH
FMAT,2
METRIC
T1C0.400
T2C0.750
T3C0.900
T4C1.000
T5C1.520
T6C1.700
%
G90
G05
T1
X188.595Y-96.901
T2
X175.3Y-144.14
X176.57Y-144.14
X177.84Y-144.14
T3
X198.5Y-118.5
X201.04Y-118.5
T4
X163.68Y-91.77
X168.68Y-91.77
X170.855Y-103.12
X174.905Y-103.12
X180.725Y-97.07
T5
X175.185Y-90.52
X180.265Y-90.52



Also, Ucamco is the company that maintains the Gerber file format, and also makes the gerber plotters, and they have a free online reference viewer for Gerber files.
https://www.ucamco.com/en/software/cad-cam-viewers/gerber-viewer
 
The following users thanked this post: I wanted a rude username


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf