Jump to content

PCB NC formats: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Text improvements
See also: Refactor
 
(17 intermediate revisions by 13 users not shown)
Line 1: Line 1:
PCB NC drill files convey PCB drill and rout information. The NC formats were originally designed by CNC drill and route machines vendors as proprietary input formats for their equipment, and are known under their company name: Excellon, Hitachi, Sieb & Meyer, Posalux, etc. These formats are similar as they are all based on RS-274-C and related to [[G-code]]. They are collectively referred to as (PCB) NC files.
PCB NC drill files convey PCB drilling and routing information. The NC formats were originally designed by CNC drill and route machine vendors as proprietary input formats for their equipment, and are known under their company name: Excellon, Hitachi, Sieb & Meyer, Posalux, etc. These formats are similar as they are based on RS-274-C and related to [[G-code]]. In 1985 IPC published a generic standard NC format, IPC-NC-349. Later XNC was designed, a simple strict subset of IPC-NC-349, designed not for driving machines but for exchanging drill information between CAD and CAM. They are collectively referred to as (PCB) NC files.
<ref name="XNC article in Design007">{{cite web
<ref name="XNC article in Design007">{{cite web
|title=XNC Format: Gerber Takes Data Into the Future
|title=XNC Format: Gerber Takes Data Into the Future
Line 12: Line 12:
|publisher = Eurocircuits
|publisher = Eurocircuits
|accessdate = 26 November 2011
|accessdate = 26 November 2011
|deadurl = yes
|url-status = dead
|archiveurl = https://web.archive.org/web/20111206220540/http://www.eurocircuits.com/index.php/technology-guidelines/pcb-layout-data
|archiveurl = https://web.archive.org/web/20111206220540/http://www.eurocircuits.com/index.php/technology-guidelines/pcb-layout-data
|archivedate = 6 December 2011
|archivedate = 6 December 2011
|df =
}}</ref>
}}</ref>


The NC files are primarily used to drive CNC machines, and they are adequate for that task.
The NC files are primarily used to drive CNC machines, and they are adequate for that task.


They are also used to exchange design information between CAD and CAM, for which they are ''not'' adequate: essential information such as plating and drill span is missing. Furthermore, the NC output in CAD systems is often poorly implemented, resulting in poor registration between drill holes and copper layers and other problems. To exchange date between CAD and CAM it is more preferred to use the [[Gerber format]]. The quality of the Gerber file output software is typically good, and Gerber supports attributes to transfer meta-information such as plating and span.
They are also used to exchange design information between CAD and CAM, for which they are ''not'' adequate: essential information such as plating and drill span is missing. Furthermore, the NC output in CAD systems is often poorly implemented, resulting in poor registration between drill holes and copper layers and other problems. To exchange data between CAD and CAM it is more preferred to use the [[Gerber format]]. The quality of the Gerber file output software is typically good, and Gerber supports attributes to transfer meta-information such as plating and span.
<ref name="GerberSpec">{{cite web
<ref name="GerberSpec">{{cite web
|url=https://www.ucamco.com/files/downloads/file/81/the_gerber_file_format_specification.pdf
|url=https://www.ucamco.com/files/downloads/file/81/the_gerber_file_format_specification.pdf
Line 28: Line 27:
<ref name="PCBFabricationGuide">{{cite web
<ref name="PCBFabricationGuide">{{cite web
|title=PCB Fabrication Data - A Guide - section on drill files
|title=PCB Fabrication Data - A Guide - section on drill files
|url=http://www.ucamco.com/downloads
|url=https://www.ucamco.com/files/downloads/file/130/pcb_fabrication_a_guide_20150107.pdf
|first=Karel
|first=Karel
|last=Tavernier
|last=Tavernier
Line 34: Line 33:
}}</ref>
}}</ref>
== IPC-NC-349 format ==
== IPC-NC-349 format ==
The IPC-NC-349 format is the only [[IPC (electronics)|IPC]] standard governing drill and rout formats. <ref>IPC-NC-349 Computer Numerical Control Formatting for Drillers and Routers, published in 1985</ref> XNC is a strict subset of IPC-NC-358, Excellon a big superset. Many indefinite NC files pick some elements of the IPC standard.<ref name="XNC article in Design007"/>
The IPC-NC-349 format is the only [[IPC (electronics)|IPC]] standard governing drill and routing formats.<ref>IPC-NC-349 Computer Numerical Control Formatting for Drillers and Routers, published in 1985</ref> XNC is a strict subset of IPC-NC-349, Excellon a big superset. Many indefinite NC files pick some elements of the IPC standard.<ref name="XNC article in Design007"/>

A digital rights managed copy of the specification is available from the IPC website, for a fee. It is targeted at input for drill/rout machines, not CAD to CAM data exchange.


== XNC format ==
== XNC format ==
The XNC format is strict subset of the IPC-NC-349 specification targeted at data exchange between CAD and CAM. The name XNC format stands for Exchange NC format. As a strict subset, it is highly compatible with existing software. The specification is brief and very detailed, with the purpose of being easy to understand and unambiguous. Its purpose is to address the current chaos of different subsets and incomplete NC files, and define a simple common standard.
The XNC format is strict subset of the IPC-NC-349 specification targeted at data exchange between CAD and CAM. The name XNC format stands for Exchange NC format. As a strict subset, it is highly compatible with existing software. Its purpose is to address the current chaos of different subsets and incomplete NC files, and define a simple common standard.
The XNC subset was defined by a consortium formed by Graphicode, Ucamco, KiCad and Pentalogix. The specification is freely available at the [[Ucamco]] download page.
The XNC subset was defined by a consortium formed by Graphicode, Ucamco, KiCad and Pentalogix.

The specification is freely available among others at the [[Ucamco]] download page. The specification is brief, detailed, easy to understand and unambiguous. It is targeted at CAD to CAM data exchange, not at input for drill/rout machines.
<ref name="xnc on pcdandf">{{cite web
<ref name="xnc on pcdandf">{{cite web
|title=CAD software firms develops XNC format for PCB drill date
|title=CAD software firms develops XNC format for PCB drill date
Line 54: Line 57:


An example:
An example:
{{sxhl|2=gcode|1=
M48 Start of header
METRIC Metric units (mm)
M48 Start of header
T01C0.6 Tool 1 has diameter 0.6mm
METRIC Metric units (mm)
T02C1.0 Tool 2 has diameter 1.0mm
T01C0.6 Tool 1 has diameter 0.6mm
% End of header
T02C1.0 Tool 2 has diameter 1.0mm
G05 Set drill mode
% End of header
T01 Select tool 1
G05 Set drill mode
X8.5Y4.8 Drill a hole of 0.6 mm at coordinates 8.5mm,4.8mm
T01 Select tool 1
X8.5Y4.8 Drill a hole of 0.6 mm at coordinates 8.5mm,4.8mm
X8.55Y2.85 Drill
X8.55Y2.85 Drill
X6.54Y2.85 Drill
X6.54Y2.85 Drill
X6.45Y4.8 Drill
X6.45Y4.8 Drill
T02 Select tool 2
T02 Select tool 2
G00X10.25Y3.825 Move to coordinates 10.25mm,3.825mm
G00X10.25Y3.825 Move to coordinates 10.25mm,3.825mm
M15 Plunge rout tool down
M15 Plunge rout tool down
G01X6.50Y3.25 Rout to coordinates 6.5mm,3.25mm
G01X6.50Y3.25 Rout to coordinates 6.5mm,3.25mm
M16 Lift rout tool up
M16 Lift rout tool up
M30 End of file
M30 End of file
}}


== Excellon format ==
== Excellon format ==
The name Excellon format is derived from the company Excellon Automation (not to be confused with Excellon Software), which was the market leader in PCB drilling and [[routing]] machines during the 1980s, and whose proprietary format became widely used.
The name Excellon format is derived from the company Excellon Automation (not to be confused with Excellon Software), which was the market leader in PCB drilling and [[routing]] machines during the 1980s, and whose proprietary format became widely used.


There are actually two Excellon formats, the older Excellon 1 and Excellon 2. Excellon 2 is closely related to IPC-NC-349. Sometimes commands from both are confusingly mixed in the same file.
There are actually two Excellon formats, the older Excellon 1 and Excellon 2. Excellon 2 is a superset of IPC-NC-349. Commands from both are sometimes confusingly mixed in the same file.


Excellon Automation stopped publishing the specification of its format, without statement on the IP and usage rights of the format. An archived copy exists. <ref>{{cite web|url=http://www.excellon.com/manuals/program.htm |title=Former Excellon format description |accessdate=2007-10-30 |deadurl=yes |archiveurl=https://web.archive.org/web/20071030075236/http://www.excellon.com/manuals/program.htm |archivedate=2007-10-30 |df= }}</ref>.
Excellon Automation stopped publishing the specification of its format, without statement on the IP and usage rights of the format. An archived copy exists.<ref>{{cite web|url=http://www.excellon.com/manuals/program.htm |title=Former Excellon format description |accessdate=2007-10-30 |url-status=dead |archiveurl=https://web.archive.org/web/20071030075236/http://www.excellon.com/manuals/program.htm |archivedate=2007-10-30 }}</ref> The specification is ambiguous, leading to different interpretations, especially in the area of coordinates and units. It is targeted at input for drill/rout machines, not CAD to CAM data exchange.


== Indefinite NC files ==
== Indefinite NC files ==
For CAD/CAM data exchange often NC files are used that only that only vaguely follow any specification. These files contain a few IPC-NC-349 commands, but follow neither the Excellon nor the IPC-NC-349 specification. Commands are not used properly, or are used in a syntactically incorrect way, and binary data objects may be included. Sometimes the historic EIA or EBCDIC character encoding is used. Usually the header is incomplete: the scale or the tool diameters is missing. Sometimes there is no header at all, and the file only contains tool numbers, with an unspecified diameter, and X,Y coordinates, in an unspecified unit. hey are often called Excellon files although it would be more appropriate to call them ''Excellon-like'' NC files.
CAD/CAM data exchange often uses NC files that do not conform to any specification. These files contain a few IPC-NC-349 commands, but follow neither the Excellon nor the IPC-NC-349 specification. Commands are not used properly, or are used in a syntactically incorrect way, and binary data objects may be included. Sometimes the historic EIA or EBCDIC character encoding is used. Usually the header is incomplete: the scale or the tool diameters is missing. Sometimes there is no header at all, and the file only contains tool numbers, with an unspecified diameter, and X,Y coordinates, in an unspecified unit. They are often called Excellon files although they are undefinite NC files. No specification exists.


An example:
An example:
{{sxhl|2=gcode|1=

%
%
T01
T01
X006272Y001092
X006272Y001092
X006354Y001093
X006354Y001093
X006653Y001092
X006653Y001092
...
...
T02
T02
X008091Y001754
X008091Y001754
X-002028
X-002028
M30
M30
}}

These files are meaningless without additional information, typically put in a free format human readable ''tool'' file. This information must be re-entered manually by the CAD/CAM operator. Still, such Excellon-like files are sometimes used, resulting in unnecessary manual labor and risk of delays or errors. <ref name="XNC article in Design007"/>
The tool diameters and how to interpret the coordinates is not specified. This file is meaningless without additional information, typically put in a free format human readable ''tool'' file. This information must be re-entered manually by the CAD/CAM operator, with unnecessary manual labor and risk of delays or errors. Astonishingly, such enigmatic files are still used.<ref name="XNC article in Design007"/>{{POV section|date=March 2022}}


==See also==
==See also==
* {{Annotated link|Gerber format}}
*[[Gerber format|Gerber format, which can also transfer drill information]]
* {{Annotated link|EDIF}}
* {{Annotated link|STEP (file format)}}


==References==
==References==
Line 105: Line 112:
==External links==
==External links==
* [http://shop.ipc.org/NC-349D1-English-D IPC-NC-349 specification (payable)]
* [http://shop.ipc.org/NC-349D1-English-D IPC-NC-349 specification (payable)]
* [https://www.ucamco.com/en/guest/downloads XNC format specification]
* [https://www.ucamco.com/en/gerber/downloads XNC format specification]
* [https://web.archive.org/web/20071030075236/http://www.excellon.com/manuals/program.htm Former Excellon format description] (archived from the [http://www.excellon.com/manuals/program.htm original] on 2007-10-30)
* [https://web.archive.org/web/20071030075236/http://www.excellon.com/manuals/program.htm Former Excellon format description] (archived from the [http://www.excellon.com/manuals/program.htm original] on 2007-10-30)
* [http://www.ucamco.com/downloads PCB Fabrication Data - A Guide]
* [http://www.ucamco.com/downloads PCB Fabrication Data - A Guide]

Latest revision as of 15:50, 1 June 2023

PCB NC drill files convey PCB drilling and routing information. The NC formats were originally designed by CNC drill and route machine vendors as proprietary input formats for their equipment, and are known under their company name: Excellon, Hitachi, Sieb & Meyer, Posalux, etc. These formats are similar as they are based on RS-274-C and related to G-code. In 1985 IPC published a generic standard NC format, IPC-NC-349. Later XNC was designed, a simple strict subset of IPC-NC-349, designed not for driving machines but for exchanging drill information between CAD and CAM. They are collectively referred to as (PCB) NC files. [1] [2]

The NC files are primarily used to drive CNC machines, and they are adequate for that task.

They are also used to exchange design information between CAD and CAM, for which they are not adequate: essential information such as plating and drill span is missing. Furthermore, the NC output in CAD systems is often poorly implemented, resulting in poor registration between drill holes and copper layers and other problems. To exchange data between CAD and CAM it is more preferred to use the Gerber format. The quality of the Gerber file output software is typically good, and Gerber supports attributes to transfer meta-information such as plating and span. [3] [4]

IPC-NC-349 format

[edit]

The IPC-NC-349 format is the only IPC standard governing drill and routing formats.[5] XNC is a strict subset of IPC-NC-349, Excellon a big superset. Many indefinite NC files pick some elements of the IPC standard.[1]

A digital rights managed copy of the specification is available from the IPC website, for a fee. It is targeted at input for drill/rout machines, not CAD to CAM data exchange.

XNC format

[edit]

The XNC format is strict subset of the IPC-NC-349 specification targeted at data exchange between CAD and CAM. The name XNC format stands for Exchange NC format. As a strict subset, it is highly compatible with existing software. Its purpose is to address the current chaos of different subsets and incomplete NC files, and define a simple common standard. The XNC subset was defined by a consortium formed by Graphicode, Ucamco, KiCad and Pentalogix.

The specification is freely available among others at the Ucamco download page. The specification is brief, detailed, easy to understand and unambiguous. It is targeted at CAD to CAM data exchange, not at input for drill/rout machines. [6] [7]

An example:

M48                 Start of header
METRIC              Metric units (mm)
T01C0.6             Tool 1 has diameter 0.6mm
T02C1.0             Tool 2 has diameter 1.0mm
%                   End of header
G05                 Set drill mode
T01                 Select tool 1
X8.5Y4.8            Drill a hole of 0.6 mm at coordinates 8.5mm,4.8mm
X8.55Y2.85          Drill
X6.54Y2.85          Drill
X6.45Y4.8           Drill
T02                 Select tool 2
G00X10.25Y3.825     Move to coordinates 10.25mm,3.825mm
M15                 Plunge rout tool down
G01X6.50Y3.25       Rout to coordinates 6.5mm,3.25mm
M16                 Lift rout tool up
M30                 End of file

Excellon format

[edit]

The name Excellon format is derived from the company Excellon Automation (not to be confused with Excellon Software), which was the market leader in PCB drilling and routing machines during the 1980s, and whose proprietary format became widely used.

There are actually two Excellon formats, the older Excellon 1 and Excellon 2. Excellon 2 is a superset of IPC-NC-349. Commands from both are sometimes confusingly mixed in the same file.

Excellon Automation stopped publishing the specification of its format, without statement on the IP and usage rights of the format. An archived copy exists.[8] The specification is ambiguous, leading to different interpretations, especially in the area of coordinates and units. It is targeted at input for drill/rout machines, not CAD to CAM data exchange.

Indefinite NC files

[edit]

CAD/CAM data exchange often uses NC files that do not conform to any specification. These files contain a few IPC-NC-349 commands, but follow neither the Excellon nor the IPC-NC-349 specification. Commands are not used properly, or are used in a syntactically incorrect way, and binary data objects may be included. Sometimes the historic EIA or EBCDIC character encoding is used. Usually the header is incomplete: the scale or the tool diameters is missing. Sometimes there is no header at all, and the file only contains tool numbers, with an unspecified diameter, and X,Y coordinates, in an unspecified unit. They are often called Excellon files although they are undefinite NC files. No specification exists.

An example:

%
T01
X006272Y001092
X006354Y001093
X006653Y001092
...
T02
X008091Y001754
X-002028
M30

The tool diameters and how to interpret the coordinates is not specified. This file is meaningless without additional information, typically put in a free format human readable tool file. This information must be re-entered manually by the CAD/CAM operator, with unnecessary manual labor and risk of delays or errors. Astonishingly, such enigmatic files are still used.[1]

See also

[edit]
  • Gerber format – Standard file format used for designing printed circuit boards
  • EDIF – file format
  • STEP (file format) – A widely used CAD 3D data exchange file format

References

[edit]
  1. ^ a b c Charras, Jean-Pierre. "XNC Format: Gerber Takes Data Into the Future" (PDF). Retrieved 7 April 2019.
  2. ^ "PCB Layout Data". Eurocircuits. Archived from the original on 6 December 2011. Retrieved 26 November 2011.
  3. ^ ""Gerber Format Specification"" (PDF). Ucamco.
  4. ^ Tavernier, Karel. "PCB Fabrication Data - A Guide - section on drill files" (PDF). Retrieved 16 January 2015.
  5. ^ IPC-NC-349 Computer Numerical Control Formatting for Drillers and Routers, published in 1985
  6. ^ "CAD software firms develops XNC format for PCB drill date". pcdandf. Retrieved 26 February 2019.
  7. ^ "XNC file format specification". Ucamco. Retrieved 26 February 2019.
  8. ^ "Former Excellon format description". Archived from the original on 2007-10-30. Retrieved 2007-10-30.
[edit]