This website requires JavaScript.

DFM Drill Layer Format Adjustment

DFM Drill Layer Format Adjustment

Introduction  


Why is there a need for the drill format adjustment function?  


Drill layer format generally refers to the Excellon2 format of CNC files. Most EDA software currently used on the market outputs the drill layer in Excellon2 format. However, these EDAs do not fully adhere to the Excellon2 format specifications and lack many critical parameters, such as:  


1) No specified coordinate units  

2) No specified leading zero mode (to save coordinate digits, either leading zeros or trailing zeros are omitted, so the leading zero mode needs to be known)  

3) No indication of the number of digits before and after the decimal point (coordinates do not have decimal points, so the decimal point position needs to be specified using the number of digits before and after the decimal)  


This situation is quite common, even among major EDA manufacturers. DFM can only rely on experience to guess and infer the drill format when parsing drill files. According to JLC's DFM test results, the drill format can be accurately guessed in 99% of cases.  


However, in some extreme cases, the guess may be wrong. In such cases, manual intervention is required to correct the format, which is the function described in this article: [Drill Layer Format Adjustment].  



What happens if the drill layer format is incorrect?  


Correct Hole Format  

Almost all holes correspond to a pad in the circuit (either a pad for soldering or a via pad). The center of the hole is aligned with the center of the pad. The image below shows an example of correct hole alignment.  




Incorrect Hole Format  

As shown below, due to the incorrect identification of the drill coordinates, all the parsed drill holes are either shrunk together or enlarged beyond the actual board size.  







Manual Drill Format Adjustment  


Drill format adjustment is usually performed in the PCB DFM mode (non-simulation view). In the top right corner, select [Drill Format].  


Clicking on [Drill Layer Format] will open the following window. Here is a brief explanation of the operation; we will go into more detail about the drill format later. For now, let's discuss how to operate:  


In this case, the correct drill format is: Absolute Coordinates + Trailing Zero + Decimal 3:5 + Metric. Set it accordingly.  


[Apply to All Layers]: If there are multiple drill layers, click this button to apply the parameters set in the current dialog to all drill layers.  


Finally, click [Confirm].  


After clicking [Confirm], wait for a moment, and you will get the correct drill layer.  


Tip: You can also try intentionally setting incorrect values to see how different parameters affect drill file parsing.  





Excellon2 Format Brief Introduction


Several key pieces of data affect the Excellon2 format. Let's break them down:  


Absolute Coordinates | Relative Coordinates

1) Absolute coordinates: Each row of drill coordinates represents the actual position of the hole.  

2) Relative coordinates: Each row of drill coordinates represents the offset relative to the previous hole.  


Drill format fragment:  

T01  ; Indicates the tool  

X00572700Y-04532700   ; Indicates the drill coordinates, same below  

X02151800Y-00240886  

X00728900Y-04252200  



Leading Zero | Trailing Zero


This parameter refers to the presence or absence of leading or trailing zeros in the drill coordinates.  


Let's talk about the [decimal point position] first. As seen in the drill fragment below, there is no decimal point in any of the coordinates. Are these integers? Of course not, the decimal digits are omitted. [Decimal 3:5] determines the position of the decimal point, indicating that there are 3 digits before and 5 digits after the decimal point. For example, when the coordinate is -04532700, its actual value is -045.32700, which equals -45.327.  


[Leading zero] means that zeros at the end of the coordinate value can be omitted. For example, X00572700 can be written as X005727.  

[Trailing zero] means that zeros at the beginning of the coordinate value can be omitted. For example, X00572700 can be written as X572700.  


Note: The drill fragment below demonstrates both leading and trailing zeros.  

Here's the issue: In the format adjustment dialog box, the leading and trailing zero options are mutually exclusive (you can only choose one or the other). What if both leading and trailing zeros are used? In this case, just select trailing zero.  

What if neither leading nor trailing zeros are used? This situation will never occur (unless someone intentionally causes it).  




Drill format fragment: This fragment demonstrates both leading and trailing zeros:  

T01  ; Indicates the tool  

X00572700Y-04532700   ; Indicates the drill coordinates, same below  

X02151800Y-00240886  

X00728900Y-04252200  




Decimal Point Position

Refer to the [Leading Zero | Trailing Zero] section above.  

Unit

Imperial: Indicates inches.  

Metric: Indicates millimeters.  

If your decimal point format is correct but the size doesn’t match, try changing the unit.  


Complete Drill Fragment

Most EDA software output Excellon2 files that do not fully comply with the specifications and lack several important pieces of information.  

Here is a complete drill fragment output from EasyEDA, which follows the format more comprehensively:  

; Lines starting with a semicolon indicate comments, which are automatically ignored by the drill machine  



;TYPE=PLATED  

;Layer: PTH_Through  

;EasyEDA Pro v2.1.63, 2024-05-28 11:49:57  

;Gerber Generator version 0.3  

M48  

METRIC,LZ,000.00000    ; Indicates metric units, leading zero (actually both leading and trailing zeros), decimal 3:5  

;Hole size 1 = 0.30000 METRIC  

T01C0.30000  ; T01 indicates the first tool, with a diameter of 0.3mm  

;Hole size 2 = 0.40000 METRIC  

T02C0.40000  

;Hole size 3 = 0.59995 METRIC  

T03C0.59995  

;Hole size 4 = 0.60000 METRIC  

T04C0.60000  

;Hole size 5 = 0.64999 METRIC  

T05C0.64999  

;Hole size 6 = 1.50002 METRIC  

T06C1.50002  

;Hole size 7 = 3.00000 METRIC  

T07C3.00000  

%  

G05  

G90  

T01  ; Use the first tool, same below  

X00572700Y-04532700   ; Drill hole  

X02151800Y-00240886  

X00728900Y-04252200  

X00546900Y-04493845  

X02756231Y-04004815  

T02  

X-00975841Y-01685003  

X-00975830Y-01765013  

T03  

X-00820570Y-00888517G85X-00920570Y-00888517  

X-01470556Y-00888517G85X-01570556Y-00888517  

T04  

X-01504826Y-01275994G85X-01444824Y-01275994  

X-01504826Y-02173981G85X-01444824Y-02173981  

T05  

X-01378748Y-03937208G85X-01453749Y-03937208  

X-01378748Y-02571196G85X-01453749Y-02571196  

T06  

X-00480680Y-00443509  

T07  

X05971100Y00000000  

X05971100Y-04992000  

X00000000Y-04992000  

X00000000Y00000000  

M30


Last updated on Oct 16, 2024