PCB Manufacture Etc.

Gerber and Excellon file output supplement.

As an attempt to support PCB production, Standard Gerber Photo-plotter format output was added some years ago to !Plotter+. This format now seems to be obsolete and so the replacement Extended Gerber format (otherwise known as RS-274X) has been added to !ProCAD+, along with two Excellon drill file formats. In each case, they can apply to either the whole file or a selection. However, a warning is given if more than one layer is visible as this may imply that more data than actually required is about to be output.

In order to use these new features a degree of planning is required. Most PCB generating software already uses the concept of layers to separate the different requirements. ProCAD+ is no different. The Gerber output is principally used for generating the files needed by board manufacturers during the creation of the etched copper tracks. The photo-plotters have their own limitations and these should be born in mind when creating your copper track layers. Full details of how each ProCAD+ item type is dealt with are described later. For the silk screen printed layer the usual ProCAD+ file output formats are normally sufficient. The only other format sometimes needed is for drilling the holes in the board with a numerically controlled machine. This machine can sometimes also rout shapes. The format used is the Excellon drill file format. ProCAD+ searches out circles (filled or open) to be drilled as holes.

Any errors that are reported during the creation of these files are stored in a file called Problems inside the ProCAD+ application. Once your Gerber or Excellon drill files have been created, they can be verified on a PC using the free ViewMate software available at: www.laserlab.com/viewmate.php  or by loading them back into ProCAD+ (See below ).

NB: ViewMate does not interpret .drl M25 repeated patterns correctly.

Extended Gerber format

The Gerber photo-plotter type output can be divided into three categories: flashed shapes, tracks and filled areas or regions.

Flashed shapes:

The flashed shapes supported by ProCAD+ fall into three types: circles, rectangles and obrounds. An obround (oval) is defined as ‘a shape consisting of two semicircles connected by parallel lines tangent to their end points’. This was typically used for the pads for DIL integrated circuit packages.

CircleFor circles, the following are acceptable:

ProCAD+ circles filled with ProCAD+ fill line type.

ProCAD+ circles with !Draw thin line style, filled with a colour.

Bezier circles (usually imported from !Draw) with !Draw thin line style, filled with a colour.

Lines of zero length with !Draw line style and both ends round. The line width gives the diameter.

RectangleRectangles must have horizontal and vertical sides. Flashed rotated rectangles are not supported by ProCAD+. Rectangles may be:

Rectangle filled with ProCAD+ fill type.

Rectangle with !Draw fill and thin line width.

A single vector horizontal or vertical line of !Draw line style and butt ends where the line width defines the width of the rectangle.

ObroundFor obrounds, they can only be generated by using a single vector horizontal or vertical line of !Draw line style and round ends where the line width defines the width of the obround.

Size limits apply to flashed shapes. Circles must not exceed 10mm diameter. Obrounds may be up to 10mm in length and the dimensions of rectangles must not exceed 10mm.

Tracks:

Tracks may be drawn by using the ProCAD+ thick line type or a !Draw line type with line width. The width of the track is traced by a circular aperture and so always has round ends that extend beyond the drawn end when plotted. Thin ProCAD+ line styles may also be plotted. When unfilled, these will use a 0.01” aperture (0.25mm) but broken line styles will be plotted as solid.

Filled areas or regions:

The Extended Gerber format now supports the filling of areas or regions. If a complex shape with concavities is to be plotted it is better to make it up out of overlapped simpler shapes. ProCAD+ filled areas or closed shapes with !Draw thin line style and fill colour will be translated for Gerber region output.

Use of colours:

HoleGerber output is effectively monochrome so Procad+ treats all non-white coloured pens as black. A white pen may be used with any of the above features to create a hole of that shape in a filled area, so it is possible, for instance, to put a flashed white hole in a dark flashed obround pad.

Any of the supported flashed shapes may appear in symbols or groups, but symbols should not be scaled and only rotated through multiples of 90°. JPEGs, sprites and other pixel image types are not supported.

Text:

For best results where text is to appear in the Gerber plot on the copper layer, use the ProCAD+ Plain font. Some outline fonts can cause trouble if their inner open parts are defined before the outer shape, in which case they will need to be converted to groups and the white open shapes brought to the front to appear correctly.

 

Excellon drill file output

The Excellon drill file output is available in two formats. Format 1 is the original format that only supports drilling so unless your supplier requests format 1, format 2 should be used as it also supports the routing of larger circles and other shapes. The minimum and maximum drill and router sizes allowed depend on the board producer. Once established, these should be defined in the Params file as discussed later in this section.

Firstly, only !Draw line styles are looked at for drill/rout output. That means that any other type of drawing is regarded as notation or construction lines.

For drilling round holes in either format 1 or format 2 and ProCAD+ will accept any of the following with !Draw line style:

Holes over the maximum drill diameter need to be routed and so will not be possible in format 1. To rout a hole of, say, 6mm diameter with a 2mm cutter, a circle of 2mm radius will need to be generated with a !Draw line width of 2mm for a 2mm cutter. In other words the radius of the circle to be routed is the radius of the required circle minus half the line width of the size of the cutter to use. It is up to the user to effectively define the cutter size. There is no default cutter. The routing of circular holes is detected and a special procedure is used to cut them.

Any open or closed line or curve (but not arc) may be cut where the line width defines the diameter of the routing cutter. In this way, slots may be cut or shapes removed. The parallel tool with a fixed distance of half the cutter diameter (line width) is useful when defining these shapes. Round ends and joins should be set so that the finished cut will be visible on the drawing.

The drilling is always done first in ascending order of drill size then the routing in ascending order of size of routing cutter. No information on speed, feed rate or depth is output..

 

New function numbers:

The following new function numbers have been added for saving the new files:

  1. Gerber format for whole file
  2. Gerber format for Selection
  3. Drill format 1 for whole file
  4. Drill format 1 for Selection
  5. Drill format 2 for whole file
  6. Drill format 2 for Selection

Function 870 has been introduced to select circles of a given radius. When the function is called a dialogue box will appear into which the chosen radius may be entered. Clicking OK will cause all circles that match the radius to be selected. This is usually followed by calling function 871.

Function number 871 may be used to change the radius of selected circles. This is particularly useful for changing drillled hole sizes. When the function is called a dialogue box will appear into which the new radius may be entered. Clicking OK will cause the entered radius to be applied to all the selected circles. Undo will restore all the circles to their former radius, providing the undo buffer can contain all the changes. The circles may be in groups but not in symbols.

Function 872 converts zero length, round ended !Draw style lines with a line width to !Draw style circles and 873 converts Bezier circles to !Draw style circles. Neither function is undoable. The number of ‘circles’ replaced will be reported. The whole file is processed. No selection is necessary. ‘Circles’ within groups will be converted but not those within symbols. Function 874 removes the overlay from zero length, round ended !Draw style lines with a line width.

The new parameters have the following defaults:

These should be set in your Params file to suit your board provider. 

 Loading Gerber and Drill files into ProCAD+

When a Gerber file is generated by ProCAD+ it is given a Text file type ands an extension of /gbr. Drill files are also Text with an extension of /drl. While both of these files may be viewed and visually validated using ViewMate as described earlier, they may also be loaded back into a ProCAD+ drawing for validation. These will then show the way the files are 'seen' by the Gerber or CNC equipment.

NB: In both cases only the commands used by ProCAD+ are fully supported. This is not intended to be a complete replacement for ViewMate and the like, and may not interpret files created by other than ProCAD+ correctly.

When a /gbr or /drl file is dropped onto a ProCAD+ drawing window, the interpreted items are created in the current layer. Pen 1 will be used except for Gerber items marked 'clear', in which case pen 23 will be used.

Routed HoleWhen circular holes are routed a special command is used which usually causes the CNC machine to start cutting further into the circle than the final cut and go round much more than 360° to create a clean hole. This is visible on /drl files loaded into ProCAD+. However, when a circle is to be scored, just a circular path is created going through exactly 360°.

Etc.

The drill/rout file format is a variety of a G code. G codes form the basis of most modern CNC machine code. The drill/rout code should be easily adapted to other use, though as for the files described above, the feed rates etc. would have to be added by other means, but the tool selection and paths can be created by ProCAD+. With up to 255 layers, even 3D printing may be possible.