Download Gerber RS-274X Format User's Guide

Transcript
Gerber RS-274X Format
User’s Guide
Part Number 414 100 014 Rev D March, 2001
Copyright
© Copyright 1998 Barco Graphics N.V., Gent, Belgium
All rights reserved. This material, information and instructions for use contained herein are the property of Barco Graphics
N.V. The material, information and instructions are provided on an AS IS basis without warranty of any kind. There are no
warranties granted or extended by this document. Furthermore Barco Graphics N.V. does not warrant, guarantee or make any
representations regarding the use, or the results of the use of the software or the information contained herein. Barco Graphics
N.V. shall not be liable for any direct, indirect, consequential or incidental damages arising out of the use or inability to use
the software or the information contained herein.
The information contained herein is subject to change without prior notice. Revisions may be issued from time to time to
advise of such changes and/or additions.
No part of this document may be reproduced, stored in a data base or retrieval system, or published, in any form or in any
way, electronically, mechanically, by print, photoprint, microfilm or any other means without prior written permission from
Barco Graphics N.V.
This document supersedes all previous dated versions.
Trademarks
All product names cited are trademarks or registered trademarks of their respective owners. Correspondence regarding this
publication should be forwarded to:
Barco ETS
Tramstraat 69
B-9052 Gent
For more information
Barco ETS web site: www.barco.com/ets
E-mail: [email protected]
Helpdesk
Europe, Middle East,
Africa, Latin America
Monday - Thursday:
09.00 AM - 17.00 PM MET
Friday:
09.00 AM - 16.00 PM MET
+32 9 21 69 366
General support issues:
[email protected]
License issues:
[email protected]
Java™ HYPERTOOL issues:
[email protected]
General information:
[email protected]
Asia Pacific
North America
Contact your local dealer
during support working
hours
Monday - Friday:
08:00 AM - 5:00 PM PST
+1 (888) 727-9972
General support issues:
[email protected]
License issues:
[email protected]
Java™ HYPERTOOL issues:
[email protected]
General information:
[email protected]
General support issues:
[email protected]
License issues:
[email protected]
Java™ HYPERTOOL issues:
[email protected]
General information:
[email protected]
Preface
The information in this Guide was published previously as the Gerber Format
Guide, which documented RS-274X format, also called Gerber Format, for both
vector and raster devices. Acknowledging that vector plotting is rapidly becoming
an outdated technology, this Guide describes use of RS-274X only in raster
applications and eliminates codes that pertain to vector applications. This does
not imply that existing files that include codes and parameters not described in
this edition of the Guide will not work. The intent of this Guide is to describe and
document uses of RS-274X format.
Contents
INTRODUCTION .................................................................................................................................................. 1
Who should use this Guide? ..................................................................................................................................... 1
How to use this Guide............................................................................................................................................... 2
Related documentation.............................................................................................................................................. 2
Additional copies of the Guide ................................................................................................................................. 2
Where to go for help ................................................................................................................................................. 2
RULES AND GUIDELINES.................................................................................................................................. 3
File structure ............................................................................................................................................................. 3
Data blocks........................................................................................................................................................... 3
Layers ................................................................................................................................................................... 3
Data types............................................................................................................................................................. 4
RS-274X parameters................................................................................................................................................. 4
Directive parameters............................................................................................................................................. 5
Image parameters.................................................................................................................................................. 5
Aperture parameters ............................................................................................................................................. 5
Layer-specific parameters..................................................................................................................................... 6
Miscellaneous parameters..................................................................................................................................... 6
Standard RS-274D Codes and Coordinate Data ....................................................................................................... 7
General File Preparation Guidelines ......................................................................................................................... 8
RS-274X Parameter Guidelines............................................................................................................................ 8
Table 1 RS-274X Parameter Order of Entry ........................................................................................................ 9
RS-274D Data Guidelines .................................................................................................................................. 10
Table 2 RS-274D Code Order of Entry.............................................................................................................. 10
Sample Files............................................................................................................................................................ 10
Example 1........................................................................................................................................................... 10
Example 2........................................................................................................................................................... 11
REFERENCE........................................................................................................................................................ 15
RS-274X parameters............................................................................................................................................... 15
AD - Aperture Definition ................................................................................................................................... 16
AM - Aperture Macro......................................................................................................................................... 19
AS - Axis Select ................................................................................................................................................. 25
FS - Format Statement........................................................................................................................................ 26
IF - Include File.................................................................................................................................................. 28
IJ - Image Justify ................................................................................................................................................ 29
IN - Image Name ................................................................................................................................................ 30
IO - Image Offset................................................................................................................................................ 31
IP - Image Polarity ............................................................................................................................................. 32
IR - Image Rotate ............................................................................................................................................... 33
KO - Knockout ................................................................................................................................................... 34
LN - Layer Name................................................................................................................................................ 36
LP - Layer Polarity ............................................................................................................................................. 37
MI - Mirror Image .............................................................................................................................................. 38
MO - Mode......................................................................................................................................................... 39
OF - Offset.......................................................................................................................................................... 40
PF - Plot Film ..................................................................................................................................................... 41
i
SF - Scale Factor................................................................................................................................................. 42
SR - Step and Repeat .......................................................................................................................................... 43
STANDARD RS-274D CODES............................................................................................................................ 45
D Codes................................................................................................................................................................... 45
Table 4 D Codes ................................................................................................................................................ 45
G Codes................................................................................................................................................................... 46
Table 5 G Codes ................................................................................................................................................ 46
Linear Interpolation (G01, G10, G11, G12) ....................................................................................................... 47
Circular Interpolation (G02, G03, G74, G75) .................................................................................................... 47
Multiquadrant (360°) Circular Interpolation (G74, G75) ................................................................................... 48
Polygon Area Fill (G36, G37) ............................................................................................................................ 49
M Codes.................................................................................................................................................................. 50
GLOSSARY........................................................................................................................................................... 51
INDEX.................................................................................................................................................................... 53
ii
Introduction
Gerber data is a simple, generic means of transferring printed circuit board
information to a wide variety of devices that convert the electronic PCB data to
artwork produced by a photoplotter. Virtually every PCB CAD system generates
Gerber data because all photoplotters read it. It is a software structure consisting
of X,Y coordinates supplemented by commands that define where the PCB image
starts, what shape it will take, and where it ends. In addition to the coordinates,
Gerber data contains aperture information, which defines the shapes and sizes of
lines, holes, and other features.
Gerber Format, which is the format in which Gerber data is expressed, actually is
a family of data formats that are subsets of EIA Standard RS-274D. Extended
Gerber Format, which is also called RS-274X, provides enhancements that handle
polygon fill codes, positive/negative image compositing, and custom apertures,
and other features. RS-274X also encapsulates the aperture list in the header of
the Gerber data file and therefore allows files to pass from one system to another
without the need to re-input the aperture table. RS-274X produces a variety of
Gerber data called X data.
RS-274X is a superset of the EIA Standard RS-274D format. RS-274X supports
some of the parameter data codes (G codes) and aperture codes (D codes)
contained in RS-274D, as well as codes referred to as mass parameters. Mass
parameters are plot parameters that define characteristics that can affect an entire
plot, or only specific parts of the plot, called layers. Mass parameters extend the
capabilities of Gerber Format. Their presence makes the Gerber data X data.
Who should use this Guide?
In order to use this Guide, you should have a fundamental understanding of PCB
fabrication or PCB design and laser plotting concepts. This Guide is intended for
use by:
•
PCB designers preparing data for conversion to RS-274X
•
PCB fabricators creating or using Gerber data files
•
Developers of software applications using RS-274X data
1
How to use this Guide
You will find the following sections in this Guide:
Rules and Guidelines explain file content and structure and outlines rules and
guidelines for creating a correct RS-274X file. It also contains a sample file.
Reference defines use and constraints on use of every RS-274X parameter and
data code currently supported. Parameters and data codes are described
separately. Both are presented in alphanumerical order.
You will also find a Glossary and Index at the end of the Guide.
Related documentation
This Guide assumes you are familiar with Electronic Industries Association EIA
Standard RS-274D. You can obtain a copy of this standard from the Electronic
Industries Association, Engineering Department, 2001 Eye Street NW,
Washington, DC 20006 USA.
Where to go for help
2
Should you need assistance, contact the Barco Graphics ETS North American
Technical Assistance Center by telephone during normal business hours (eastern
time) at (888) 727-9972, by fax at (860) 291-7021.
Rules and Guidelines
This section provides background information, describes organization, and
presents guidelines for use of RS-274X. For detailed descriptions of use of
individual codes and parameters, see Reference, page 15.
File structure
An RS-274X plot file is a file consisting of RS-274X parameters and standard RS274D codes which, when correctly interpreted, result in an image that may be
displayed or plotted.
Data blocks
The file is composed of a number of data blocks containing parameters and codes.
Each data block is delimited by an end-of-block character, typically an asterisk
(*).
Each data block may contain one or more parameters or codes. For example:
X0Y0D02*
X50000Y0DO1*
Layers
One or more data blocks may be grouped into a layer of information that describes
part of a graphic image. In RS-274X context, a layer is a named information
component of the image composed of one or more data blocks. Each layer may
have characteristics, such as name, polarity, and interpolation mode, that differ
from other layers of information . In addition, an individual layer may be
“knocked out “of the surrounding graphic image, and may be repeated and/or
rotated individually.
Note: A layer must not be confused with a PCB layer. A PCB layer has a physical
definition and might be compared to a physical plane. An RS-274X layer is simply
a group of data blocks that may be manipulated collectively and separately from
other layers.
3
Rules and Guidelines
Data types
An RS-274X file may contain the following kinds of data appearing in the
following general order:
1. RS-274X Parameters
RS-274X parameters are also called mass parameters or extended Gerber
format. The inclusion of these parameters in the file makes the plot file RS274X, or X data, instead of standard RS-274D.
2. Standard RS-274D Codes
Standard RS-274D codes were once called word address format. They consist
of:
•
one-character function codes such as G codes, D codes, M codes, etc.
Function codes were the words of the old terminology. They describe
how coordinate data associated with them should be interpreted (such as
linear or circular interpolation), how the imaging device should move
(light source on or off), and more.
•
coordinate data define points to which the imaging device must move.
The coordinate data represented the address of the old terminology. X,Y
coordinate data describe linear positions. I, J coordinates define arcs.
RS-274X parameters
RS-274X parameters define characteristics that apply to an entire plot or to a
single layer, depending on the parameter’s position in the file and whether it
generates a new information layer in the file (as, for example, layer-specific
parameters do). RS-274X parameters consist of two alpha characters followed by
one or more optional modifiers.
RS-274X parameters are delimited by a parameter delimiter, typically a percent
(%) sign. Because parameters are also contained in a data block, they are also
delimited by an end-of-block character. For example,
%FSLAX23Y23*%
This parameter is a Format Statement (FS) describing how the coordinate data in
the file should be interpreted (in this case, 4.2 format for both X and Y
coordinates). It is delimited by an end-of block character (*) as well as by a
parameter delimiter (%).
RS-274X parameters may be grouped according to the scope of their function in
the file. The groups should appear in the file in the following order:
1. Directive parameters control overall file processing.
2. Image parameters supply information about an entire image.
3. Aperture parameters describe the shape of lines and components throughout
the file.
4. Layer-specific parameters describe processing of one or more data layers.
5. Miscellaneous parameters provide capabilities that do not fall into the above
groups.
4
Rules and Guidelines
RS-274X parameters are generally placed at the beginning of the file in the order
shown above. Certain parameters, such as the layer-specific parameters, may be
embedded within the file.
The next sections describe each parameter type.
Directive parameters
Directive parameters control overall file processing. They include:
AS
FS
MI
MO
OF
SF
Axis Select
Format Statement
Mirror Image
Mode of units
Offset
Scale Factor
As a general rule, directive parameters should be placed at the beginning of the
file. For simplicity sake, you should use each directive parameter only once in a
file, although it is not illegal to use a directive parameter more than once. Each
directive parameter controls processing until another like it is encountered.
When used more than once in a file, subsequent directive parameters may be
embedded anywhere in the standard RS-274D code data or grouped with other
layer-specific parameters.
Directive parameters do not generate a new layer.
Image parameters
Image parameters supply information about the entire (composite) image. Image
parameters include:
IJ
IN
IO
IP
IR
PF
Image Justify
Image Name
Image Offset
Image Polarity
Image Rotation
Plotter Film
Image parameters should be used only once in a file and should be placed at the
beginning of the file. If an image parameter occurs more than once in a file, the
last one encountered will be the operative parameter.
Aperture parameters
Vector plotters control the width and shape of features by projecting light through
a series of openings, or apertures, in a rotating wheel. Each position on the wheel
is identified by a unique D code. When the D code appears in the data, the wheel
rotates to the referenced position for exposure.
Unlike a vector device, a raster device has no apertures and therefore requires a
description of the aperture geometry to create the required lines and other features.
The aperture parameters provide the description.
5
Rules and Guidelines
The aperture parameters include:
AD
AM
Aperture Description
Aperture Macro
In general, aperture parameters apply to an entire file. An exception is an
embedded AD parameter, which will generate a new layer if it redefines a D code
previously used in the image data.
Note: Generating a new layer may result in unanticipated results because it
causes certain RS-274D values (such as interpolation mode) to be reset.
The AM parameter describes a special aperture by using the following set of
predefined aperture shapes to describe an aperture:
Circle
Line (vector)
Line (center)
Line (lower left)
Outline
Polygon
Moiré
Thermal
See the AM command description, page 19, for more information.
Layer-specific parameters
Layer-specific parameters supply information for the processing of one or more
information layers (not to be confused with board layers). They may be used more
than once in a file. Layer-specific parameters always generate a new layer and
should be placed at the beginning of the new layer. If not repeated for a given
layer, the previous layer-specific parameters remain in effect.
The layer-specific parameters include:
KO
LN
LP
SR
Knockout
Layer Name
Layer Polarity
Step and Repeat
Note: Generating a new layer may result in unanticipated results because it
causes certain RS-274D values (such as interpolation mode) to be reset.
Miscellaneous parameters
There is a single miscellaneous parameter:
IF
Include File
The IF parameter is used to include (nest) external files in a file.
6
Rules and Guidelines
Standard RS-274D Codes and Coordinate Data
Standard RS-274D codes (D codes, G codes, M codes, etc.) specify how the
coordinate data should be manipulated. Each code applies to coordinate data
located in the same data block as the code (that is, between EOB characters). It
also applies to coordinate data following it until another code of the same type is
encountered, or until a new layer is generated. This continuing action is referred
to as modal.
For example, G02 specifies clockwise, single-quadrant circular interpolation and
is modal. All coordinate data following it will be considered clockwise arc data
until another interpolation code is encountered, or until a new layer is generated.
When a new layer is generated, interpolation will be reset to linear (G01).
Like parameters, standard RS-274D codes may be grouped according to function.
They generally appear in the file in the following sequence:
1.
N codes (sequence numbers) are similar to line numbers and may be
assigned to data blocks to simplify organization. Sequence numbers may
be 0 to 99999. N codes are not necessary.
2.
G codes (general functions) specify how to interpolate and move to the
coordinate locations following the code until changed or until a new layer
is generated (modal).
3.
D codes (plot functions) select and control tools, specify line type, etc.
4.
M codes (miscellaneous functions) perform a variety of functions such as
program stop and origin specification.
Standard RS-274D codes are described in detail starting on page 45.
Coordinate Data
Coordinate data includes:
•
X,Y data define linear positions along the X and Y axes.
•
I,J data define arcs.
For example,
X200Y200D02*
This data block directs the plotter to move in a positive direction to coordinate
location 0.2,0.2 (assuming leading zeroes are omitted) with the light source off
(tool up). Additional X,Y coordinate data positions following this code will also
cause motion with the light source off until a different code is encountered.
Absolute versus relative data
Depending on the preceding FS parameter in the file, coordinate data may be
defined either relative to the plot origin (that is, as absolute values) or relative to
the last coordinate position (that is, as incremental data).
7
Rules and Guidelines
Numerical precision
Coordinate data may be expressed in inches or millimeters to ±6.6 decimal places
(that is, up to six integer digits and six fractional digits). Unless preceded by a
“-”, the direction is assumed to be “+”.
Axis assignment
The coordinate axes may be assigned to any physical plotter axes using the AS
parameter, but typically the A plotter axis is assigned to X and the B axis to Y.
General File Preparation Guidelines
Follow these guidelines when preparing RS-274X data:
•
Use data blocks in a way that organizes the file visually for easy reading.
•
Enter all codes and parameters in upper case.
•
Use file names that comply with the system file naming conventions. DOS
and therefore Windows 3.1 files names are limited to eight characters. UNIX
systems are case-sensitive.
•
End every data block with an end-of-block character, typically *. For
example,
X0000Y5000D02*
•
Do not break a line within a block.
•
End every file with an end-of-program code (M00 or M02).
RS-274X Parameter Guidelines
•
Begin and end RS-274X parameter data with a parameter delimiter, typically
%. The parameter delimiter must immediately follow the end-of-block
without intervening spaces. For example,
%ASAXBY*%
•
Parameters may be entered singly or grouped between delimiters, up to a
maximum of 4096 characters between delimiters. A maximum of 80
characters between delimiters is recommended. Always consider readability.
For example,
%SFA1.0B1.0*ASAXBY*%
•
Line breaks are permitted between parameters to improve readability. For
example,
%SFA1.0B1.0*
ASAXBY*%
8
•
Use an explicit decimal point with all numerical values associated with a
parameter. If the decimal point is omitted, an integer value is assumed.
•
Express numerical values in the units defined by the MO code in the file
(inches or millimeters).
Rules and Guidelines
•
In general, enter RS-274X parameters at the beginning of the file (or at the
beginning of the layer for layer-specific parameters). Enter them in the order
shown in Table 1.
Note: When RS-274X parameters are embedded in the RS-274D data, all data
preceding the parameter will be processed before the data blocks affected by
the embedded parameters are interpreted.
Table 1
RS-274X Parameter Order of Entry
Parameter
Required
Optional
AS
FS
MI
MO
Function
Axis select
Format statement
Mirror image
Mode (inch or
millimeter units)
OF
SF
IJ
Offset
Scale Factor
Image Justify
IO
IP
Image Name
Image Offset
Image Polarity
IN
IR
PF
AM
LN
LP
Image Rotation
Plotter Film
Aperture Description
Aperture Macro
Layer Name
Layer Polarity
KO
SR
RO
Knockout
Step and Repeat
Rotate
AD
Comments
Default
A=X, B=Y
Single use recommended.
When used more than
once, enter these
parameters at the
beginning of a layer.
These codes do not
generate a new layer.
No mirror
Inch
A=0, B=0
A=1.0, B=1.0
No
justification
Use only once at the
beginning of the file.
A=0, B=0
Positive
0
May be used singly or
may be layer-specific.
Enter these parameters at
the beginning of the file
or layer.
Positive
Off
A=1, B=1
No rotation
9
Rules and Guidelines
RS-274D Data Guidelines
Follow these guidelines when preparing RS-274D data:
Table 2
•
Enter functions codes and coordinate data following the RS-274X parameters.
•
Function codes apply to coordinate data in the same block as well as to
subsequent coordinate data. They do not affect coordinate data preceding the
block in which they occur.
•
Enter function codes in the file in the order shown in Table 2.
RS-274D Code Order of Entry
Code
N
G
D
M
Function
Sequence number
General functions:
linear interpolation,
circular interpolation,
polygon area fill, etc.
Aperture or tool
assignment; line/flash
control
Miscellaneous
function: program stop
or end.
Comments
Optional
Once encountered,
remains in effect until
countermanded.
Once encountered,
remains in effect until
countermanded.
Every file must end
with M00 or M02.
Sample Files
The examples on these pages illustrate the use of both mass parameters and
standard RS-274D codes.
Example 1
Example 1 illustrates a single layer image.
*G04 EXAMPLE 1: 2 BOXES
%FSLAX23Y23*%
%MOIN*%
%OFA0B0*%
%SFA1.0B1.0*%
%ADD10C,0.010*%
%LNBOXES*%
G54D10
X0Y0D02*X5000Y0D01*
X5000Y5000D01*X0Y5000D01*X0Y0D01*
X6000Y0*X11000Y0D01*
10
Format statement - leading zeroes omitted,
absolute coordinates, X2.3, Y2.3.
Set units to inches.
No offset
Scale factor is A1, B1
Define aperture D-code 10 - 10 mil circle
Name layer “BOXES”.
RS-274D data
Rules and Guidelines
X11000Y5000D01*X6000Y5000D01*
X6000Y0D01*D02*
M02*
End of data
Example 2
Example 2 illustrates RS-274-X data.
%ASAXBY*
FSLAX23Y23*
MIA0B0*
MOIN*
OFA0B0*
SFA1.0B1.0*%
%IJALBL*
INXTEST*
IOA0B0*
IPPOS*
IR0*%
G04 Define Apertures*
%AMTARGET125*
6,0,0,0.125,.01,0.01,3,0.003,0.150,0*%
%AMTHERMAL80*
7,0,0,0.080,0.055,0.0125,45*%
%ADD10C,0.01*
ADD11C,0.06*
ADD12R,0.06X0.06*
ADD13R,0.04X0.100*
ADD14R,0.100X0.04*
ADD15O,0.04X0.100*
ADD16P,0.100X3*
ADD17P,0.100X3*
ADD18TARGET125*
Axis Select, A=X, B=Y
Format Statement, Leading zeros omitted, absolute data, 2 integer
digits and 3 fractional digits
Mirror about the specified axis; 0=no, 1=yes
Mode inches
Offset 0
Scale Factor
Image justify
Image name
Image offset
Image Polarity
Image Rotation
Comment
Aperture Macro
Moiré Description
Aperture Macro
Thermal Description
Aperture Description, D10 is a circular aperture with 0.01” diameter
Aperture Description, D11 is a circular aperture with 0.06” diameter
Aperture Description, D12 is a rectangular aperture, 0.06” X 0.06”
Aperture Description, D13 is a rectangular aperture, 0.04” X 0.100”
Aperture Description, D14 is a rectangular aperture, 0.100” X 0.04”
Aperture Description, D15 is a obround aperture, 0.04” X 0.100”
Aperture Description, D16 is a 3 sided polygon 0.100” overall size
Aperture Description, D17 is a 3 sided polygon 0.100” overall size
Aperture Description, D18 is a special aperture called "TARGET”
11
Rules and Guidelines
ADD19THERMAL80*%
%LNXTEST1*
LPD*
SRX1Y1I0J0*%
G54D10*
G01X0Y250D02*
X0Y0D01*
X250Y0D01*
X1000Y1000D02*
X1500D01*
X2000Y1500*
X2500D02*
Y1000D01*
D02*
G54D11*
G55X1000Y1000D03*
X2000D03*
X2500D03*
Y1500D03*
X2000D03*
G54D12*
X1000Y1500D03*
G54D13*
X3000Y1500D03*
G54D14*
Y1250D03*
G54D15*
Y1000D03*
G54D10*
G01X3750Y1000D02*
G75*
G03X3750Y1000I250J0D01*
G54D16*
G55X3400Y1000D03*
G54D17*
G55X3500Y900D03*
G54D10*
G36*
G01X500Y2000D02*
Y3750D01*
X3750*
Y2000*
X500*
X500Y2000D02*
G37*
G54D18*
G55X0Y3875D03*
X3875Y3875D03*
%LNXTEST2*
LPC*%
G36*
G01X1000Y2500D02*
Y3000D01*
G74*
G02X1250Y3250I250J0D01*
G01X3000*
G75*
12
Aperture Description, D19 is a special aperture called "THERMAL”
Layer Name XTEST1
Layer Polarity Dark
Step and Repeat set to 1 X 1 (Not Required)
Aperture select
Linear move with light off
Linear move with light on
Linear move with light on
Linear move with light off
Linear move with light on
Notice since D01 is modal it does not need to be repeated
Notice since the X & Y commands are modal, Y is not repeated
Here, X is not repeated and uses its previous value of 2.500”
Light off no move
New aperture selected
G55 prepares for flash It is not necessary. D03 is the flash command.
Y value does not change
This method reduces the size of the file
Here, X does not change from previous value
Flash
New aperture select
Move to (1.0, 1.5) and flash
New aperture select
Move and flash
New aperture select
Move and flash
New aperture select
Move and flash
New aperture select
Linear move, light off. Start point of the following arc command
Sets the mode to 360 degree circular interpolation
Move from start point above to end point drawing a complete circle
New aperture select
Flash
New aperture select
Flash
New aperture select
Start Polygon fill
End Polygon fill
New aperture select
Flash
Flash
Layer Name
Layer Polarity clear
Start Polygon fill
Quadrant arc
Clockwise arc move with radius .25”
Complete 90 degree arc
360 degree arc mode
Rules and Guidelines
G02X3000Y2500I0J-375D01*
G01X1000*
X1000Y2500D02*
G37*
%LNXTEST3*
LPD*%
G54D10*
X1500Y2875D02*
X2000D01*
D02*
G54D11*
X1500Y2875D03*
X2000D03*
G54D19*
X2875Y2875D03*
M02*
Clockwise arc move with radius .375”
Linear move light on
Linear move light off
End Polygon fill
Layer Name
Layer Polarity Dark
New aperture select
New aperture select
End of file
13
Rules and Guidelines
14
Reference
RS-274X parameters
This section describes every RS-274X parameter supported at time of publication.
They are arranged in alphabetical order. Standard RS-274D code descriptions
begin on page 45.
Each parameter description illustrates the parameter data block format, explains
each parameter modifier, lists restrictions, and gives an example.
The data block format illustration uses the following notation conventions:
%Parameter code<required modifiers>[optional modifiers]*%
where:
Parameter code
is the 2-character code (AD, AM, FS, etc.)
<required modifiers>
must be entered to complete definition
[optional modifiers]
may be required depending on the required modifiers
15
AD
Aperture Defintion
The AD parameter is used to describe apertures (D codes) used in the RS-274X file. All apertures used
in an RS-274X file must be described in terms of shape and size for the file to be interpreted correctly.
The AD parameter must precede use of the associated aperture D-code. A definition remains in effect
until redefined.
Two kinds of apertures may be used in an RS-274X file: standard apertures and special apertures.
Standard apertures
The AD parameter identifies standard apertures by D-code number and describes them in terms of
shape (circular, rectangular, obround, or polygonal) and size (diameter if round, height and width if
rectangular or obround, outside dimension and number of sides if polygonal ). Apertures may be solid
or open (that is, with a hole) and are always centered.
Special apertures
The AD parameter is also used to assign a D-code to a file containing an aperture description. The
aperture description file may be a .mac file created by the AM (Aperture Macro) parameter or a .des
file created by an Aperture Editor such as the Gerber GPC Aperture Editor. See the AM parameter
description for further information on aperture macros.
AD parameter syntax rules
•
Like other mass parameters, begin and end each parameter block with a parameter delimiter
(typically %).
•
Within the AD parameter block, separate each modifier by an X.
•
Dimensions must be positive and will be rounded to the resolution of the output device.
•
The various plotters and output devices may permit different D-code ranges, but the range must
not exceed 10 to 999.
Data Block Format
%ADD<D-code number><aperture type>,<modifier>[X<modifer>]*%
where:
ADD
<D-code number>
<aperture type>,<modifier>[X<modifier>]
16
the AD parameter and D (for D-code)
the D-code number being defined (10 - 999)
the aperture descriptions. <aperture type>
may be one of the following:
• a standard aperture (C, R, O, P, or T) with
modifiers (see below). Modifiers depend on
aperture type. Use X to separate each
modifier. All dimensions are positive and
will be rounded to the resolution of the
output device.
AD
Aperture Definition
• a file name containing the aperture
description (.des file)
• an aperture macro name previously defined
by the AM parameter (.mac file)
Note: Be sure to use the units (inches or
millimeters) specified by the MO parameter for
all modifiers.
Standard apertures:
C,
<outside diameter>[X<X-axis
hole dimension >[X<Y-axis hole
dimension>]]
Circle. To define a solid aperture, enter only
the diameter. To define a hole, enter one
dimension for a round hole, two for a
rectangle. The hole must fit within the
aperture. For a square hole, X must equal Y.
Both aperture and hole will be centered. For
example,
%ADD10C,.05X0.025*%
D-code 10 is a .05 circle with a .025 round
hole in the center.
R,
<X-axis dimension>X<Y-axis
dimension>[X<X-axis hole
dimension>X<Y-axis hole
dimension>]
Rectangle or square. May be solid or open. If
the X axis dimension equals the Y dimension,
the aperture will be square. To define a solid
aperture, enter only the X and Y dimensions;
omit the hole dimensions. To define a hole,
enter one dimension for a round hole, two for a
rectangle. The hole must fit within the
aperture. Both rectangle and hole will be
centered. For example,
%ADD22R,0.020X0.040*%
D-code 22 is a .02 x .04 solid rectangle.
O,
<X-axis dimension>X<Y-axis
dimension>[X<X-axis hole
dimension>[X<Y-axis hole
dimension>]]
Obround (oval). May be solid or open. If
the X dimension is larger than Y, the shape
will be horizontal. If the X dimension is
smaller than Y, the shape will be vertical. To
define a solid aperture, enter only the X and
Y dimensions; omit the hole dimensions. To
define a hole, enter one hole dimension for a
round hole, two for a rectangular or square
hole. If open, the hole must fit within the
aperture. For example,
%ADD22O,0.020X0.04X0.005X0.010*%
D-code 22 is a vertical obround .02 wide x
.04 high with a .05 x .01 rectangular hole.
17
AD
Aperture Definition
P,
<outside dimension>X<number of
sides>[X<degrees of
rotation>[X<X-axis hole
dimension>X<Y-axis hole
dimension>]]
Regular polygon. May be solid or
open. To define a solid aperture, enter
only the outside dimension and
number of sides (3 to 12). The first
point is located on the X axis. May be
rotated ±360° from the X-axis. If
open, the hole must fit within the
outside dimension. Note: If you use
the hole dimension modifiers, you
must enter a rotation (even if it is 0).
For example,
%ADD17Diamond,.030X4X0.0*%
D-code 17 is a polygon within an
outside dimension of .03, 4 sides, with
no center hole.
Examples
%ADD10C,.025*%
Define D-code 10: 25 mil round
%ADD22R,.050X.050X.027*%
Define D-code 22: 50 mil square with 27
mil round hole
%ADD57O,.030X.040X.015*%
Define D-code 57: obround 30 x 40 mil
with 15 mil round hole
%ADD30P,.016X6*%
Define D-code 30: polygon (hexagon), 16
mil outside dimension with 6 sides
%ADD15CIRC*%
Define D-code 15: a special aperture
described by aperture macro CIRC defined
previously by an aperture macro
18
AM
Aperture Macro
The AM parameter is used to define named apertures (sometimes called special
apertures) in aperture macro format consisting of building blocks called
primitives. The named aperture macros may be used in AD parameter descriptions
just like the standard apertures (that is, circle, rectangle, obround, polygon, and
thermal). Every non-standard aperture must be described before the D-code
associated with it occurs in the file.
Special apertures offer two advantages over standard apertures:
•
They allow multiple shapes called primitives to be combined in a single
aperture, which permits creation of unusual or complicated apertures.
•
They need not be centered.
•
Aperture macro modifiers may be variable. Variable modifiers are supplied
by the AD parameter that references the aperture macro.
•
An aperture macro variable may be a numerical function of another macro
variable (+, -, etc.).
Aperture macro contents
An aperture macro contains the following elements:
•
aperture macro name
•
one or more of the seven aperture primitives, each identified by a primitive
number (see Table 3 below for a description of the primitives)
•
primitive modifiers that describe the primitive in terms of exposure, position,
dimensions, etc.
•
variable primitive modifiers to be supplied by the AD parameter
•
optional embedded comment blocks
•
numerical operators
AM parameter syntax rules
19
•
Like other mass parameters, begin and end each parameter block with a
parameter delimiter (typically %).
•
Within the AM parameter block, separate each primitive and modifier group
by an end-of-block character (typically *).
•
Within each primitive group, separate modifiers by commas.
•
Modifiers may be absolute values, such as 0, 1, 2, or 9.05, or they may be
variable modifiers to be supplied by the AD parameter when it refers to the
aperture macro.
•
Identify variable modifiers to be supplied by the AD parameter as $n where n
indicates the order in which the modifier is expected in the AD parameter. $1
would be the first variable modifier expected in the AD parameter, $2 the
AM
Aperture Macro
second, and so on, numbering sequentially from left to right. If an absolute
value is entered instead of a variable, the variables shift right. For example, if
an absolute value is entered for the first variable, the next variable becomes $1
even though it is the second modifier of the primitive.
•
The interpretation of each modifier differs for each primitive. See Table 3 on
the next page for a full explanation of aperture macro primitives and
modifiers.
•
Do not begin a variable primitive modifier with a minus sign (for example,
-$1). To indicate negative, precede the variable with 0 (for example, 0-$1).
•
Start optional comment strings with a leading 0 (for example, *0 THIS IS A
COMMENT*).
•
Position and dimensions are expressed in the units specified by the MO
parameter. Decimal points are permitted.
•
Use only the following numerical operators with variable modifiers:
Operator
+
/
x
=
n
•
Function
add
subtract
divide
multiply
equate
numerical factor
Make sure the aperture macro file name matches the aperture macro name and
that it has a .mac extension.
Data Block Format
%AM<aperture macro name>*<primitive
number>,<modifier$1>,<modifier$2>,[<...>]*[<primitive number>[<modifiers>]]*...*%
where:
AM
the AM parameter
<aperture macro name>*
the name to be used in the AD parameter
<primitive
number>,<modifier$1>,<modifier$2>,<modifi
er$3>,...*
the primitive number with modifiers. The primitive
number identifies the geometry (outline, polygon,
etc.). The modifiers differ with the various primitive
numbers. Use either actual values (for example,
0.050 for a width) or a variable placeholder (for
example, $1 for exposure on/off).
20
AM
Aperture Macro
Table 3 Aperture macro primitives
Primitive
number
1
Description
Variable
Modifiers
Description
Circle
$1
Exposure on/off
0 = OFF (laser off, no exposure)
1 = ON (laser on, image exposed)
2 = reverse current exposure state
$2
Diameter
$3
X center position
$4
Y center position
$1
Exposure on/off
0 = OFF (laser off, no exposure)
1 = ON (laser on, image exposed)
2 = reverse current exposure state
$2
Line width
$3
X start point
$4
Y start point
$5
X end point
$6
Y end point
$7
Rotation in degrees (+ =
counterclockwise, - = clockwise)
$1
Exposure on/off
0 = OFF (laser off, no exposure)
1 = ON (laser on, image exposed)
2 = reverse current exposure state
$2
Rectangle width
$3
Rectangle height
$4
X center point
$5
Y center point
$6
Rotation in degrees (+ =
counterclockwise, - = clockwise)
$3,$
4
$2
2 or 20
Line (vector): a line defined by
width, and beginning and end
points. The line ends are
rectangular.
$3,$4
$5,$6
$2
21
Line (center): a centered
rectangle defined by width,
height, and center point. The end
points are rectangular.
$3
$4,$5
$2
21
AM
Aperture Macro
22
Line (lower left): a rectangle
defined by width, height, and the
lower left point. The end points
are rectangular.
$3
$4,$5
$2
$1
Exposure on/off
0 = OFF (laser off, no exposure)
1 = ON (laser on, image exposed)
2 = reverse current exposure state
$2
Width
$3
Height
$4
X lower left point
$5
Y lower left point
$6
Rotation in degrees (+ =
counterclockwise, - = clockwise)
3
End of file
none
Must be used to end .des files.
4
Outline: an open or closed shape
defined by a start point, n
additional points (up to 50), and
the X,Y coordinates that define
them. For a closed shape, the
first and last points must be
identical.
$3,$4
$1
Exposure on/off
0 = OFF (laser off, no exposure)
1 = ON (laser on, image exposed)
2 = reverse current exposure state
$2
n, the number of points in the outline
$3
X start point
$4
Y start point
$5
X point #1
$6
Y point #1
$7
X point #2
$8, etc.
Y point #2. Continue as needed.
$5,$6 $9 or the last
number used
$7,$8
5
Polygon: a closed, symmetrical,
centered shape defined by n
vertices (3 to 10 inclusive), a
center point, diameter, and
rotation.
$3, $4
$5
$1
Exposure on/off
0 = OFF (laser off, no exposure)
1 = ON (laser on, image exposed)
2 = reverse current exposure state
$2
number of vertices (integer)
$3
X center point
$4
Y center point
$5
First $6
Vertex
22
Rotation in degrees (+ =
counterclockwise, - = clockwise)
Diameter
Rotation in degrees (+ =
counterclockwise, - = clockwise)
AM
Aperture Macro
6
Moiré: a cross hair centered on n
concentric circles defined by the
center point, outside diameter,
line thickness, and gap between
circles.
$1, $2
$5
$8
7
$3
Thermal: a cross hair centered on
a circle defined by outside and
inside diameter.
$4
$3
$1
X center point
$2
Y center point
$3
Outside diameter
$4
Circle line thickness
$5
Gap between circles
$6
number of circles
$7
Cross hair thickness
$8
Cross hair length
$9
Rotation in degrees (+ =
counterclockwise, - = clockwise)
$1
X center point
$2
Y center point
$3
Outside diameter
$4
Inside diameter
$5
Cross hair thickness
$6
Rotation in degrees (+ =
counterclockwise, - = clockwise)
Example 1
%AMDONUT*1,1,$1,$2,$3*1,0,$4,$2,$3*% Define an aperture macro named DONUT consisting
of two concentric circles:
1,1,$1,$2,$3 Circle (1), exposure on (1), diameter
($1), X center ($2), Y center ($3) all
to be supplied by AD parameter
1,0,$4,$2,$3 Circle (1), exposure off (0), diameter
($4, different from first circle), X
center and Y center ($2 and $3, same
as first circle)
23
AM
Aperture Macro
The AD parameter using this macro might look like the following:
%ADD32DONUT,0.100X0X0X0.080*%
Define D-code 32 to be aperture macro DONUT. The
diameter of the first circle will be 0.100. The center
of both circles will be at 0,0. The diameter of the
second circle will be 0.080.
$1 = 0.100
$2 = 0
$3 = 0
$4 = 0.080
Example 2
%AMDONUT*1,1,$1,$2,$3*$1=$2+0.030*1,0,$1-$4,$2,$3*%
Define an aperture macro named DONUT consisting
of two concentric circles with diameter of the second
circle defined as a function of the diameter and center
point of the first:
1,1,$1,$2,$3 Circle (1), exposure on (1), diameter
($1), and center point X,Y ($2, $3) to
be defined in the AD parameter
$1=$2+0.030 Define a variable to be used to
calculate the diameter of second
circle to be a function of the diameter
and center point X coordinate of the
first.
1,0,$1-$4,$2,$3
Circle (1), exposure off (0),
diameter ($1-$4), and center point
X,Y ($2, $3, same as the first circle).
The ADD parameter using this aperture macro might look like:
%ADD33DONUT,0.020X0X0X0.014*%
Define D-code 33 to be aperture macro DONUT.
The diameter of the first circle 0.020. The center of
both circles will be 0,0. The diameter of the second
circle will be ((0 + 0.030) - 0.014).
Example 3
%AMDONUT*1,1,0.100X0X0*1,0,0.080X0X0*%
Define an aperture macro named DONUT consisting
of two concentric circles, using primitive modifiers.
%ADD32DONUT*%
24
The resulting AD command only needs to reference
the aperture macro name.
AS
Axis Select
The AS parameter is used to assign any two data axes to the output device A or B axes.
Data Block Format
AS A<X or Y>B<X or Y>*
where:
A and B
are output device axes
X and Y
are data axes
Default
AXBY
Example
%ASAYBX*%
25
Assign the X axis data to the output device B axis and the Y axis data to the
output device A axis.
FS
Format Statement
The FS parameter is used to define the format of the input coordinate data and to
define the allowable N, G, D, and M code lengths. It should be the first RS-274X
parameter in the file. It is recommended that only one be used in the file. It is
usually the first parameter.
The FS parameter allows you to specify the following format characteristics:
•
•
•
•
•
•
•
Number of integer and decimal places in coordinate data (coordinate format)
Zero omission (leading or trailing zeroes omitted)
Absolute or incremental coordinate notation
Sequence number (N-code) length
General function code (G codes) length
Draft code (D code) length
Miscellaneous code (M code) length
Note: Decimal point programming is not supported.
Coordinate format
Coordinate format specifies how many integer and how many decimal places to
expect in the coordinate data. For example, 2.3 format specifies two integer and
three decimal places. A maximum of six integer and six decimal places may be
specified (999999.999999). Different formats may be defined for the X and Y
axes.
Zero omission
Zero omission compresses data by omitting either leading or trailing zeroes from
coordinate values. Any given string of digits may be interpreted very differently
depending on the zero omission specification. Coordinate format also affects how
zero omission is interpreted.
Leading zero omission eliminates all zeroes that precede non-zero digits but
retains following zeroes. For example, with 2.3 coordinate format, 15 would be
interpreted as 0.015.
Note: Use leading zero omission for NO ZEROES OMITTED files.
Trailing zero omission eliminates all zeroes following non-zero digits but retains
preceding zeroes. For example, with 2.3 coordinate format, 15 would be
interpreted as 15.000.
Absolute or incremental notation
Coordinate values may be expressed as either absolute distances from a fixed 0,0
point or as relative distances from the preceding coordinate position.
26
AM
Aperture Macro
RS-274D code lengths
The FS parameter can be used to specify length limits for the following standard
RS-274D codes:
N
G
D
M
Sequence number
General function
Plot function
Miscellaneous function
These codes are described starting on page 45.
Data Block Format
%FS<L or T><A or I>[Nn][Gn]<Xn><Yn>[Dn][Mn]
where:
FS
The FS parameter
<L or T>
Use L to omit leading zeroes. Use T to omit
trailing zeroes.
<A or I>
Use A for absolute coordinate values. Use I for
incremental coordinate values.
[Nn], [Gn], [Dn], and [Mn]
Enter the code and an integer length limit, for
example, N2 to specify two-digit sequence codes.
<Xn> and <Yn>
Enter X or Y and the number of integer and
decimal places in the coordinate data for each
axis, for example, X23 for X-axis data with two
integer and three decimal places (99.999). 6.6 is
maximum. The X and Y axes may have different
values.
Example
%FSLAX25Y25*%
Coordinate data will have leading zeros omitted (L) and be expressed
as absolute (A) positions with two integer and five decimal places in
both axes (X25Y25).
27
IF
Include File
The IF parameter is used to identify an external file to be included in the RS-274X
file. The files referenced by the IF parameter will be interpreted exactly as if they
were included at the point of reference in the RS-274X file. Included files may
also contain IF parameters, up to 10 levels of nesting.
The IF parameter is often used to include an external aperture file containing AD
and AM parameters that describe the apertures used in the RS-274X file,
sometimes referred to as an "external” aperture list. The IF parameter can also be
used to include external data files, which allows you to merge multiple data files.
Included files simplify the creation of standard plot sequences such as title blocks
and coupons.
Data Block Format
%IF<filename.ext>*%
Examples
%IFCOUPON3.GBR*%
Include file COUPON3.GBR.
%IFCIRCL.mac*%
Include aperture macro file CIRCL.mac.
%IFAPT004.des*%
Include aperture description file APT004.des.
28
IJ
Image Justify
The IJ parameter is used to override the absolute data coordinates for final
placement of the image on the output device. The image may be centered or may
be placed at an absolute position relative to the lower left of the platen.
Note: When centered, the pixel coordinates for the platen reside in the first
quadrant (+X and +Y). X and Y are positive numbers, greater than zero and less
than the platen size.
When more than one IJ parameter appear in the data, the final entry encountered is
the one used.
Data Block Format
%IJ[A<parameter >B<parameter>][<offset>]*%
where:
IJ
the Image Justify parameter
A
the plotter A axis justification
<parameter>
L
left or lower justification (default)
C
center justification
B
The plotter B axis justification
<parameter>
L
left or lower justification (default)
C
center justification
<offset>
the starting position offset relative to 0,0
Default
None
Examples
%IJ*%
Left justify in X and lower justify in Y.
%IJAC*%
Center justify in X, lower justify in Y.
%IJACB.100*%
Center justify in X, offset .1 units in Y.
%IJALB.10*%
Left justify in X, offset .1 units in Y.
%IJB.100*%
Same as previous example.
%IJA1B1*%
Offset image 1 unit in X and Y.
29
IN
Image Name
The IN parameter is used to assign a name of up to 77 alphanumeric characters to
the entire image of the RS-274X file. Information layers may also be named; see
the LN parameter.
Data Block Format
%IN<character string>*%
where:
<character string>
up to 77 alphanumeric characters except the asterisk (*).
Examples
%INSOLDERMASK*%
%INPANEL_1*%
30
IO
Image Offset
The IO parameter is used to offset an image from the 0,0 point. The offset is
expressed as an increment in the units defined by the MO parameter along the
output device A and B axis. The AS parameter is used to correlate data axes with
output device axes. The offset may be different for each axis and may be entered
for a single axis.
Data Block Format
%IOA<±
±n>B<±
±n>*%
where:
IO
the Image Offset parameter
A<±
±n>
the offset along the output device A axis
B<±
±n>
the offset along the output device B axis
Default
%IOA0B0*%
Examples
%IOA1.0B1.5*%
Offset the image 1.0 units along the A axis and 1.5 units along the B axis from
0,0.
%IOB5.0*%
Offset the image 5.0 units along the B axis from 0,0.
31
IP
Image Polarity
The IP parameter is used to specify the positive or negative polarity of the entire
file image. This image polarity differs from layer polarity, which is specified by
the LP parameter and which applies only to one or more data layers of the entire
image.
Data Block Format
%IP<POS or NEG>*%
where:
IP
the IP parameter
<POS or NEG>
Use POS for positive polarity, NEG for negative polarity.
Default
%IPPOS*%
Example
%IPNEG*%
32
Output the entire image with negative polarity.
IR
Image Rotation
The IR parameter is used to rotate the entire image counterclockwise in 90°
increments about the 0,0 coordinate. All apertures follow the rotation. If you do
not use the IR parameter, 0° rotation is assumed.
Data Block Format
%IR<90 or 180 or 270>
where:
IR
the IR parameter
<90 or 180 or 270>
Enter the desired value.
Default
%IR0*%
Example
%IR90*%
33
Rotate the entire image 90° counterclockwise.
KO
Knockout
The KO parameter is used to specify that a rectangular region of the image will
have the opposite polarity of the image or layer in which it occurs (either clear or
dark), making it a "knockout” from the surrounding region.
Knockout
Positive image polarity
Dark layer polarity
Clear knockout
Negative image polarity
Clear layer polarity
Dark knockout
KO is typically used to :
•
•
•
•
set the initial background polarity of the final image
set travel extent along the Y axis
knock out a region around a component
disable knockout on the current data layer
A knockout can be defined in one of two ways:
•
•
lower left point and height and width
border width around a component
When a knockout is defined around a component, the knockout is applied to all
data following the KO parameter until the knockout is disabled. To disable a
previously defined knockout, enter KO with no modifiers.
Data Block Format
%KO[C or D][X<coordinate>Y<coordinate>I<width>J<height> ]or [K<border
dimension>]
where:
KO
the KO parameter
C or D
Enter C for clear or D for dark. To create a knockout defined by the
data extents, do not enter modifiers. To disable a previously enabled
knockout, enter neither C nor D.
X<lower left X coordinate>Y<lower left Y coordinate>I<width>J<height>
Use this modifier to define the knockout by a lower left point, width,
and height.
34
K<border dimension>
Use this modifier to define the knockout as a border around a
component. Express the dimension in units specified by the MO
parameter.
Examples
%KODX0I0I20J26*%
Create a dark knockout that extends from 0,0 to 20,26. This in effect
sets the Y travel extent.
%KOCK.050*%
Create a clear knockout .050 units around all sides of the data that
follows the KO parameter until the knockout is disabled.
%KOD*%
Make the region defined by the extents of the data following the
command dark.
%KO*%
Disable a previously enabled knockout.
35
LN
Layer Name
The LN parameter is used to assign a name of up to 77 alphanumeric characters to
the information layer that follows the parameter in the RS-274X file. Entire image
files may also be named; see the IN parameter.
Data Block Format
%LN<character string>*%
where:
<character string>
up to 77 alphanumeric characters except the asterisk (*).
Examples
%LNSOLDERMASK*%
%LNINTERNAL_VCC*%
36
LP
Layer Polarity
The LP parameter is used to specify the positive or negative polarity of the
information layer or layers following it. This layer polarity differs from image
polarity, which is specified by the IP parameter and which applies to the entire
image. The layer polarity applies to all data following the LP parameter until
another LP parameter is encountered.
Data Block Format
%LP<C or D>*%
where:
LP
the IP parameter
<C or D>
Use C for clear polarity, D for dark polarity.
Default
%LPD*%
Example
%LPC*%
Make all succeeding data clear.
37
MI
Mirror Image
The MI parameter is used to turn mirror imaging either on or off. When on, all Aand/or B-axis data following the parameter will be mirrored (that is, inverted or
multiplied by -1) until another MI command is used. Notice that mirroring A-axis
data flips the image about the B axis. Mirroring B-axis data flips the image about
the A axis.
Note: MI does not mirror special apertures.
The AS parameter is used to correlate the X and Y axes with the output device A
and B axes.
Data Block Format
%MI[A<0 or 1>][B<0 or 1>]*%
where:
MI
the MI parameter
A<0 or 1>
To invert A-axis data (flipping the image about the B-axis), enter A1. To disable,
enter A0.
B<0 or 1>
To invert B-axis data (flipping the image about the A-axis), enter B1. To disable,
enter B0.
Default
%MIA0B0*%
Example
%MIA0B1*% Disable mirroring of A-axis data. Invert B-axis data, flipping the image about the Aaxis.
38
MO
Mode
The MO parameter specifies that dimension data should be interpreted as inches or
millimeters. Integer and decimal place format is specified by the FS parameter.
Inches are assumed if units are not specified.
Data Block Format
%MO<IN or MM>*%
where:
MO
the MO parameter
<IN or MM>
Enter IN to specify inches. Enter MM to specify millimeters.
Default
%MOIN*%
Example
%MOIN*%
Dimension data will be expressed in inches.
39
OF
Offset
The OF parameter is used to offset the final image up to ±99999.99999 units from
the imaging device 0,0 point. The data may be offset along the imaging device A
or B axis, or both. Values used with the OF parameter are expressed in units
specified by the MO parameter, are always absolute, and are used primarily with
absolute coordinate data. Incremental coordinate data may be offset simply by
moving the imaging device to the desired offset position before starting the plot.
The FS parameter specifies whether the data is absolute or incremental.
If an embedded FS parameter changes the format from absolute to incremental, the
OF parameter value is saved and reinstated another FS parameter returns the
format to absolute.
Data Block Format
%OF[A<±
±offset value>][B±
±offset value>]
where:
OF
the OF parameter
A±
±n
Offset along the A axis. Use 5.5 format.
B±
±n
Offset along the B axis. Use 5.5 format.
Default
%OFA0B0*%
Example
%OFA1.0B1.0*%
40
Offsets the plot 1 unit from 0,0 along both the A and B axes.
PF
Plot Film
The PF parameter is used to indicate to the operator the film (or other media) to be
used to image the data file.
Data Block Format
%PF<name>*%
where:
PF
the PF parameter
<name>
up to 20 alphanumeric characters; asterisk (*) is an illegal character
41
SF
Scale Factor
The SF parameter is used to specify a scale factor of from 0.0001 to 999.99999 for
the output device A- and/or B-axis data. The factor may be different for each axis.
All data following the parameter will be multiplied by the factor until another SF
parameter is encountered. The AS parameter is used to correlate the X and Y data
axes with the imaging device A and B axes.
Data Block Format
%SF[A<factor>][B<factor>]*%
where:
SF
the SF parameter
A<factor>
the A-axis data factor
B<factor>
the B-axis data factor
Default
%A1B1*%
Example
%SFA.5B3*%
42
Multiply A-axis data by .5, B-axis data by 3.
SR
Step and Repeat
The SR parameter is used to duplicate the data following the parameter a specific
number of times (repeats) at a regular intervals (steps). The number of times the
image is repeated and the space between repeats may be specified independently
for X and Y data.
When entered without parameters, it is also used to disable a previous SR
parameter.
Y Step
Distance
Data
X Step
Distance
Data Block Format
%SR[X<number of repeats>][Y<number of repeats>][I<X-axis step>][J<Y-axis step>]
where:
SR
the SR parameter
X<number of repeats>
the number of times the data will be repeated along the X-axis
Y<number of repeats>
the number of times the data will be repeated along the Y-axis
I<X-axis step distance>
the distance between the X-axis repeats
J<Y-axis step distance>
the distance between the Y-axis repeats
Default
%SRX1Y1I0J0*%
Examples
%SRX4I5.0J2*%
43
Repeat the image four times along the X axis with 5.0 units from one
step to the next. The J modifier will be ignored because no Y repeats
were specified.
SR
Step and Repeat
%SRX2Y3I2.0J3*%
Repeat the image twice along the X axis and three times along the Y
axis. X-axis repeats will be spaced 2.0 units apart. Y-axis repeats
will be spaced three units apart.
%SR*%
Disable a previous SR parameter.
44
Standard RS-274D Codes
This section describes standard RS-274D codes (D codes, G codes, and M codes)
that are applicable to raster output.
D Codes
D codes (draft codes) select apertures and determine whether the feature described
should be imaged as a line or “flashed”. Table 4 lists supported D codes.
Table 4 D Codes
Code
D01
(D1)
Function
Draw line, exposure on
D02
(D2)
D03
(D3)
D10-D999
Exposure off
45
Flash aperture
Select an aperture defined by an
AD parameter.
Comments
You cannot draw using an
aperture defined by an aperture
macro (AM parameter). These
apertures can only be flashed.
D03 remains in effect until a
new layer is encountered.
G Codes
G codes are general function codes. They specify how the coordinate data should
be interpolated (linear or circular), turn the Polygon Area Fill feature on and off
(see page 49 for more information on Polygon Area Fill), and can also be used to
specify absolute or incremental format. Table 5 lists supported G codes.
Table 5 G Codes
Code
G00
G01
G02
G03
G04
G10
G11
G12
G36
G37
G54
G70
G71
G74
G75
G90
G91
46
Function
Move
Linear interpolation
(1X scale)
Clockwise circular
interpolation
Counterclockwise circular
interpolation
Ignore data block
Linear interpolation
(10X scale)
Linear interpolation
(0.1X scale)
Linear interpolation
(0.01X scale)
Turn on Polygon Area Fill
Turn off Polygon Area Fill
Tool prepare
Specify inches
Specify millimeters
Disable 360° circular
interpolation (single
quadrant)
Enable 360° circular
interpolation (multiquadrant)
Specify absolute format
Specify incremental format
Comments
Affected by Polygon Area Fill (see page 49.)
See page 47.
See page 47.
See page 47.
See page 49.
See page 49.
Usually precedes an aperture D-code
See also MO parameter.
See also MO parameter.
See Circular Interpolation, page 47.
See Circular Interpolation, page 47.
See also FS parameter.
See also FS parameter.
Linear Interpolation (G01, G10, G11, G12)
Linear interpolation plots a straight line from the present position to the X,Y
coordinate specified by the data block.
Data Block Format
G01 X±
±m.n Y±
±m.n Dnn
where:
G01
Specifies linear interpolation
X±
±m.n Y±
±m.n Defines the line end point
Dnn
D-code (exposure on or off)
Circular Interpolation (G02, G03, G74, G75)
There are two types of circular interpolation: single quadrant (90°) and
multiquadrant (360°). Single quadrant interpolation produces an arc.
Multiquadrant interpolation can produce arcs that are larger than 90° and also
circles.
Single Quadrant Circular Interpolation (G74)
G02 and G03 specify single quadrant (90°) circular interpolation; G74 disables it.
Single quadrant circular interpolation plots an arc within one quadrant (90°).
Single quadrant arcs must fit entirely within the quadrant in which they begin. A
separate data block is required for each quadrant. A minimum of four data blocks
is required to plot a circle.
Data Block Format
Gnn X±
±m.n Y±
±m.n Im.n Jm.n Dnn
where:
Gnn
G02 specifies clockwise circular interpolation
G03 specifies counterclockwise circular interpolation
X±
±m.n Y±
±m.n Defines the arc end point. These variables are in the format defined by the format
statement (FS parameter). A sign is optional.
Im.n Jm.n
Defines the incremental distance between the arc start point and the center measured
parallel to the X and Y axes respectively. Notice that these numbers are unsigned
values. The direction to the center is determined implicitly.
Dnn
D-code (exposure on or off)
47
Incremental Data
Absolute Data
B Axis
B Axis
End point
End point
Y
Start point
(current tool
position
X
Start point
(current tool
position
Y
J
J
I
I
Arc center
0,0
A Axis
Arc center
X
0,0
A Axis
D-
Multiquadrant (360°) Circular Interpolation (G74, G75)
A data block containing only G75 specifies 360° circular interpolation, which
plots arcs in more than one quadrant using only one data block. Every block
following a G75 code will be interpreted as 360° interpolation until a G74 is
encountered. The I and J variables will be considered signed. If no sign is
present, the circle will be in a positive direction from the start point.
A G74 code turns 360° multiquadrant circular interpolation off, reverting to single
quadrant interpolation. To turn circular interpolation off and revert to linear
interpolation, use G01.
Data Block Format
Gnn X±
±m.n Y±
±m.n ±Im.n ±Jm.n Dnn
where:
Gnn
G74 turns off 360° circular interpolation
G75 turns on 360° circular interpolation
X±
±m.n Y±
±m.n Defines the arc end point
I±m.n J±m.n Defines the distance between the arc start point and the center measured parallel to the
X and Y axes respectively. These variables are always incremental values in the
format defined by the format statement (FS parameter). A sign is optional.
Dnn
D-code (exposure on or off)
An example of multiquadrant interpolation is shown on the next page.
48
%FSLAX43Y43*%
G75*
G01X3000Y-2000D02*
G03X-3000Y-2000I-3000J4000D01
G01*
DESIRED PLOT
Arc center, (0,2)
0,0
End point (-3,-2)
Start point (3,-2)
Polygon Area Fill (G36, G37)
G36 and G37 provide a more efficient means of filling closed polygons than stroke
fill. When these codes are used, the filled area is defined simply by its closed
outline. Stroke fill is an inefficient method of filling a polygon.
G36 turns on polygon area fill. G37 turn it off. There are no variables or
apertures. Following a G36 and before G37, all lines drawn with D01 are
considered edges of the polygon. D02 closes and fills the polygon.
G36*
X2Y4D02*
X7D01*
12
Y2D01*
10
X11Y6D01*
X7Y9D01*
X7D01*
X2D01*Y4D01*G37*
8
6
4
2
D-000004.WPG
2
4
6
8
10
12
49
M Codes
M-codes identify the end of a file. Three M codes are commonly used:
M00
M01
M02.
50
Program stop
Optional stop
End of program
Glossary
ABSOLUTE POSITION: Position expressed as a distance from the 0,0 point in the data.
APERTURE: Previously, an opening in a wheel through which light passed to expose film.
Currently a D code assignment and description of geometry that determines the shape of a feature.
APERTURE MACRO: A mass parameter that describes the geometry of a special aperture and
assigns it to a D code.
APERTURE PARAMETER: A mass parameter (AD or AM) that assigns an aperture description to
a D code.
CIRCULAR INTERPOLATION: Specifies that the data should be interpreted as arcs; may be
single-quadrant or multiquadrant.
COMPOSITE IMAGE: The entire image, including all information layers.
COORDINATE DATA: X,Y position data that describes placement of features in the image.
D CODES: Draft (tool) RS-274D codes. They specify tool exposure action (line draw or flash).
DELIMITER: A character that indicates the beginning and end of a mass parameter.
DIRECTIVE PARAMETER: A mass parameter that controls overall file processing.
EXTENDED GERBER FORMAT: Gerber data that includes mass parameters.
FUNCTION CODES: G codes, D codes, M codes that are part of RS-274D.
G CODES: General function RS-274D codes. They specify interpolation, polygon area fill, etc.
GERBER DATA: Data expressed in Gerber Format.
GERBER FORMAT: A subset of RS-274D Word Address Format that is the universal plotter
language; may also contain mass parameters, whose presence make it Extended Gerber Format, or RS274X.
IMAGE PARAMETER: A parameter that supplies information about an entire image.
KNOCKOUT: A rectangular region about an information layer whose polarity is the opposite of the
layer polarity.
51
LAYER: A named information component of Gerber data that may be treated as a unit, for example,
rotated or repeated; has no relationship to a physical PCB layer.
LAYER-SPECIFIC PARAMETER: A mass parameter that applies to a single information layer (for
example KO, LN, LP, and SR).
LINEAR INTERPOLATION: Specifies that the data should be interpreted as straight lines.
MASS PARAMETERS: Commands or codes that may be embedded in Gerber Data that specify how
the data should be processed.
MULTI-QUADRANT INTERPOLATION: Specifies that the data should be interpreted as arcs that
can extend into more than one quadrant, up to 360°).
NEGATIVE: An artwork in which the intended conductive pattern is transparent to light and the
areas to be free from conductive material are opaque.
NUMERICAL PRECISION: The number of integer and decimal places used to express a number.
POLARITY: Describes whether the circuitry will be imaged as dark on a clear background (positive)
or clear on a dark background (negative). Polarity may be applied to an entire image or to a single
layer.
POLYGON AREA FILL: A feature that provides a more efficient means of creating solid (filled)
polygons than stroke fill.
RELATIVE POSITION: Position expressed as a distance from the last position.
RS-274D: Electronics Industries Association (EIA) standard data format; a superset of Gerber Format.
RS-274X: Extended Gerber Format, that is, Gerber Format with mass parameters.
SINGLE QUADRANT INTERPOLATION: Specifies that the data should be interpreted as an arc
that must fit entire within a single quadrant (90°).
STEP AND REPEAT: A method by which successive exposures of a single image are made to
produce a multiple image production master.
STROKE FILL: An inefficient means of creating solid (filled) polygons by “painting” the area.
X DATA: Gerber data that includes mass parameters.
52
Index
A
absolute data coordinates
override by IJ.....................................................29
Absolute notation...................................................26
ABSOLUTE POSITION .......................................51
absolute values.........................................................7
AD .....................................................................6, 16
AM...............................................................6, 16, 19
APERTURE...........................................................51
Aperture Defintion.................................................16
Aperture Description................................................6
Aperture Editor ......................................................16
Aperture Macro............................................6, 19, 51
APERTURE PARAMETER..................................51
Aperture parameters.................................................5
apertures...................................................................5
special................................................................16
standard .............................................................16
arc ..........................................................................47
arcs...........................................................................7
AS ......................................................................5, 25
Assistance ................................................................2
Axis assignment .......................................................8
Axis Select .........................................................5, 25
B
Bulletin Board Service (BBS)..................................2
C
center image...........................................................29
Circle .....................................................6, 17, 47, 48
circular interpolation....................................4, 47, 51
COMPOSITE IMAGE...........................................51
coordinate data...............................................4, 7, 51
format ................................................................26
D
D codes ............................................7, 16, 26, 45, 51
data block.........................................................3, 7, 8
format ................................................................15
maximum length ..................................................8
Data types ................................................................4
Decimal point programming ..................................26
DELIMITER......................................................... 51
DIRECTIVE PARAMETER ................................ 51
Directive parameters ............................................... 5
E
Electronic Industries Association............................ 2
end-of-block character ............................................ 8
end-of-program code............................................... 8
English units
specifying ......................................................... 39
Extended Gerber Format .............................. 1, 4, 51
F
file naming conventions .......................................... 8
File structure ........................................................... 3
Format Statement .......................................... 4, 5, 26
FS...................................................................... 5, 26
function codes.................................................. 4, 51
functions codes...................................................... 10
G
G codes ................................................. 7, 26, 46, 51
G01, G10, G11, G12............................................. 47
G02, G03, G74, G75............................................. 47
G36, G37 .............................................................. 49
G74 ....................................................................... 47
G74, G75 .............................................................. 48
General File Preparation Guidelines ....................... 8
general function codes .......................................... 46
general functions ..................................................... 7
Gerber data........................................................ 1, 51
Gerber Format................................................... 1, 51
Gerber GPC Aperture Editor. ............................... 16
Glossary ................................................................ 51
I
I,J data..................................................................... 7
IF ...................................................................... 6, 28
IJ ...................................................................... 5, 29
Image Justify..................................................... 5, 29
Image Name ...................................................... 5, 30
Image Offset...................................................... 5, 31
IMAGE PARAMETER .................................... 5, 51
image placement ................................................... 29
53
Image Polarity ................................................... 5, 32
Image Rotation.................................................. 5, 33
IN ...................................................................... 5, 30
Inches
specifying.......................................................... 39
Include File ............................................................. 6
incremental data ...................................................... 7
Incremental notation.............................................. 26
IO ...................................................................... 5, 31
IP ...................................................................... 5, 32
IR ...................................................................... 5, 33
J
justify image.......................................................... 29
K
Knockout..................................................... 6, 34, 51
KO..................................................................... 6, 34
L
Layer ..................................................................... 52
generated by mass parameters......................... 4, 6
Layer Name....................................................... 6, 36
Layer Polarity.................................................... 6, 37
Layers...................................................................... 3
LAYER-SPECIFIC PARAMETER .................. 6, 52
Leading zero omission .......................................... 26
Line (center)...................................................... 6, 21
Line (lower left) ................................................ 6, 22
Line (vector)...................................................... 6, 21
Linear Interpolation......................................... 47, 52
LN ..................................................................... 6, 36
LP...................................................................... 6, 37
M
M codes....................................................... 7, 26, 50
M00 or M02 ............................................................ 8
Mass parameters ............................................... 4, 52
Metric units
specifying.......................................................... 39
MI ..................................................................... 5, 38
Millimeters
specifying.......................................................... 39
Mirror Image..................................................... 5, 38
Miscellaneous parameters ....................................... 6
MO .................................................................... 5, 39
modal. ..................................................................... 7
Mode ..................................................................... 39
Mode of units .......................................................... 5
Moiré................................................................. 6, 23
Multiquadrant (360°) Circular Interpolation ... 48, 52
N
N codes ................................................................... 7
Name
image ................................................................ 30
layer .................................................................. 36
NEGATIVE .......................................................... 52
NO ZEROES OMITTED...................................... 26
notation.................................................................. 26
Numerical precision .......................................... 8, 52
O
Obround (oval) ...................................................... 17
OF ..................................................................... 5, 40
Offset................................................................. 5, 40
offset image ........................................................... 31
Order of entry
RS-274D ........................................................... 10
RS-274X ............................................................. 9
Ordering information............................................... 2
Outline............................................................... 6, 22
P
Parameter delimiter ............................................. 4, 8
Parameters
placement of........................................................ 5
PF ...................................................................... 5, 41
Plot Film............................................................ 5, 41
polarity ............................................................ 34, 52
image................................................................. 32
layer .................................................................. 37
Polygon ............................................................. 6, 22
polygon area fill .......................................... 1, 49, 52
primitives............................................................... 19
R
raster device ............................................................ 5
Rectangle or square ............................................... 17
Regular polygon .................................................... 18
RELATIVE POSITION ........................................ 52
Rotate
image................................................................. 33
RS-274D.................................................... 1, 2, 7, 52
code length........................................................ 27
Data Guidelines................................................. 10
order of entry .................................................... 10
RS-274X.............................................. 1, 4, 8, 15, 52
defaults................................................................ 9
order of entry ...................................................... 9
Parameter Guidelines .......................................... 8
position in file ..................................................... 9
required and optional .......................................... 9
S
Sample Files .......................................................... 10
Scale Factor....................................................... 5, 42
Sequence number .............................................. 7, 26
SF ...................................................................... 5, 42
Single Quadrant Circular Interpolation ........... 47, 52
Special apertures ............................................. 16, 19
SR...................................................................... 6, 43
Standard apertures........................................... 16, 17
Standard RS-274D Codes.................................. 4, 45
Step and Repeat ...........................................6, 43, 52
STROKE FILL ......................................................52
T
Technical Assistance Center ....................................2
Thermal..............................................................6, 23
Trailing zero omission ...........................................26
U
Units.......................................................................39
upper case
required for entry.................................................8
V
Vector plotters .........................................................5
W
Web Page.................................................................2
word address format.................................................4
X
X data.................................................................1, 52
X,Y data...................................................................7
Z
Zero omission ........................................................26
55