How to Fix HiWIRE Drill File for JLCPCB

The Problem

CAM tool used at JLCPCB can’t parse the drill file generated by HiWIRE. It throws out 2 warning messages.

  1. Some unrecognized lines were detected.

  2. Tools have no size definition.

Below is a typical drill file generated by HiWIRE, let’s open it in a text editor:

/*****************************************/
/* NC Drill Data from Wintek's DT.D      */
/* Format: Inches; 2 integer, 3 fraction */
/*   digits (leading zeros included)     */
/* HiWIRE reference datum:  2784, 1700   */
/*   (derived from board extents)        */
/* Date: Sun Sep 05 14:21:52 2021        */
/*                                       */
/* Tool Usage Summary:                   */
/*   Tool No.    Diameter   Count        */
/*   --------    --------   -----        */
/*       1        0.020"      686        */
/*       2        0.030"        4        */
/*       3        0.032"       33        */
/*       4        0.040"       53        */
/*       5        0.055"       30        */
/*       6        0.080"        2        */
/*       7        0.150"        4        */
/*****************************************/
%
G90
T1
X05230Y03557
X05179Y03422
...
			

If we observe the file, it starts with a C programming language style comment section, these are the "unrecognized lines", a valid Excellon comment line starts with a ; sign. But this section contains some useful information (mainly the size definition for tools) which we can use it to make a valid Excellon drill file.

Fix the File

/* Format: Inches; 2 integer, 3 fraction */
/*   digits (leading zeros included)     */
				

With the above two lines, we can know the unit is in INCH and the zero suppression information (LZ means Leading Zeros will be kept):

INCH,LZ				

Now, let’s check the tool information:

/* Tool Usage Summary:                   */
/*   Tool No.    Diameter   Count        */
/*   --------    --------   -----        */
/*       1        0.020"      686        */
/*       2        0.030"        4        */
/*       3        0.032"       33        */
/*       4        0.040"       53        */
/*       5        0.055"       30        */
/*       6        0.080"        2        */
/*       7        0.150"        4        */
				

The above table lists the used drill bits, we just convert it to Excellon format directly:

T1C0.020
T2C0.030
T3C0.032
T4C0.040
T5C0.055
T6C0.080
T7C0.150
				

Now put them together (An Excellon file start with code M48), we have the modernized drill file:

Warning
Please don’t copy and paste this header to your drill file as this header is built with a random drill file.
M48
INCH,LZ
T1C0.020
T2C0.030
T3C0.032
T4C0.040
T5C0.055
T6C0.080
T7C0.150
%
G90
T1
X05230Y03557
X05179Y03422
...
				

Still need help? Contact Us Contact Us