Some Background on Drill Files
Modern drill machines and CAM software rely on industry standard commands that control the format, units and tool selection/drill diameters. The default settings for drill tape from APD/Allegro does not include a machine readable header or advanced control comands. We ran the Allegro NC Tape with default settings for a IC package and here is what we got:
COMMAND COMMENT ;LEADER: 12 holdover from paper tape! ;HEADER: holdover from paper tape ;CODE : ASCII other formats are now obsolete ;FILE : ncdrill1 for TOP and BOTTOM useful as check ;Holesize 1. = 12.0 PLATED MILS comment for the drill operator ;Holesize 2. = 35.0 PLATED MILS this info should be in the tool select ;Holesize 3. = 37.0 PLATED MILS command ;Holesize 15. = 52.0 NON_PLATED MILS non plated through holes should be ;Holesize 16. = 63.0 NON_PLATED MILS in a separate drill file! ;Holesize 17. = 95.0 NON_PLATED MILS ;Holesize 18. = 128.0 NON_PLATED MILS G90 this is the first machine readable command it indicates that the coordinate data is absolute; G91 would indicate incremental X02015Y01090 drill coordinates X03625Y01479 it is up to the operator to insert the X03704Y01794 the proper drill (i.e. one of diameter 12.0 mils) X01620Y00935 X02595Y01285 X02572Y01360 . . X01054Y00640 X00927Y01197 M00 M00 halts the machine. This is only needed on a single spindle machine where the operator then must put a new drill into the machine. (When were PCB's last drilled like this?) X00675Y01805 more drill coordinates; let's hope the right drill X00775Y01755 tool was loaded by the operator. X00675Y01705 X00775Y01655 M00 and so on M30 program end
The default APD settings always output a drill file in INCHES even if the design is in metric.
Specific Missing Data
So what should the file include that is currently missing?
Data Units - it is important to have a machine readable command that specifies whether the data is in units of mm or inch. The command is very simple:
It is also possible to use M71 and M72 which are recognized as commands for METRIC and INCH respectively.
Data Format - like Gerber data, drill data has a "format." Since the decimal points in drill data are routinely eliminated one must know where to re-insert the decimal point in order to properly read the file. Note that the data format for the drill file does not always match the format used for the Gerber file (even though the data from the two different formats should line up very precisely.) Unlike Gerber data, there is no data format command. Excellon indicates in their operating manual that for inch data, the format is 2.4 and that for MM units there are three possible formats:
INCH 2.4 - 00.0000 MM 3.2 - 000.00 4.2 - 0000.00 3.3 - 000.000
However their document does not specify how this should be entered into the drill file header.
Zero Suppression - it is common to either delete (i.e. suppress) the leading zeros or the trailing zeros in both drill and Gerber files. Since the decimal point is missing, you need to know both the data format (see above) and which side to count from when re-inserting the decimal point. What is unusual here is that for drill files the command LZ means leading zero's are included and TZ means trailing zeros are included. In Gerber the L indicates that leading zeros are removed. The LZ and TZ are generally put on the same line as the UNITS command.
INCH, LZ INCH, TZ
Tool Select - this is by far the most important command that is missing. Instead of putting the drill hole diameters as a comment and then stopping the program after each set of coordinates the output should use a tool select command.
The tool select command, T includes a tool number and should include the diameter defintion. The "C" in the tool command defines the diameter of the drill.
indicates that this is tool 01 and it has an 0.050 diameter drill. Tool index can range from 1 to 99. Note that tool diameters are specified in inches (if the units=INCH or in MICRONS if the units=METRIC. If in inches you must use a decimal point.
A Proper Drill File
How should a proper drill file look?
COMMAND COMMENT ;FILE: ncdrill1 for TOP and BOTTOM useful as check M48 indicates start of header information INCH,LZ indicates the units in inches with Leading Zero Included suppressed % indicates start of drill data G05 drill mode (as opposed to route mode) G90 absolute data T01C0.012 selects tool #1 and diameter = 0.012 inch X02015Y01090 drill coordinates X03625Y01479 X03704Y01794 X01620Y00935 X02595Y01285 X02572Y01360 . . X01054Y00640 X00927Y01197 T02C0.035 selects tool #2 of diameter 0.035 inch X00675Y01805 more drill coordinates X00775Y01755 X00675Y01705 X00775Y01655 T03C0.037 selects tool #3 of diameter 0.037 inch and so on M30 program end w rewind ...
BTW - never mix plated through holes and non plated through holes in the same drill file. The two different types of holes are drilled at different times during the manufacturing process.
|Page  2 3|
Back to Drill2gbr page