User Manuals
Drill Fundamentals
Drill Parameter
Part Programs
Unix Help For UCS
Machine Setup Commands
|
MANUALS
Part Programming Commands
This chapter details the part programming codes used to run your Excellon machines automatically.
The CNC-7, like all Excellon machines, has a set of part programming codes that can be used to control the machine for drilling, toolchanging, setting up machine parameters (such as feeds and speeds), and routing (if so equipped). Also, like other Excellon machines, the part program codes are backward compatible. This means that part programs from a CNC-2,4,5 or 6 can be run on your CNC-7 without modification. Since newer controls contain new features, the reverse is not necessarily true (You may not be able to run all CNC-7 programs on a CNC-2,4,5 or 6). Part programs are simply data files, coming from any one of a variety of sources or devices. This chapter will detail all available part program codes available for your use.
Part Program Headers
The M48 header is used to give your machine general information about the job. This includes the size of tools you want to drill and/or rout the PC board, the kind of measurement system you are using, the direction of the X and Y axis of the work, and other details. These instructions may be generally listed in any order in the header. The part program header is optional. Most commands that you can program into the header can also be entered at the CNC-7 console before the program runs.
Part Program Body
The set of drilling and/or routing commands is called the part program body. It is usually much longer than the header and tells the machine exactly where each hole is to be drilled, which drill bit to use, what shape you want routed, etc. The commands are laid out in the sequence you want them carried out on the PC board. For example, one line of the program will tell the machine where to drill a hole, the next line will tell where to drill the next hole, the next line will tell the machine to stop and change the drill bit. Usually the program is carried out in sequence from top to bottom. However, some commands will tell the machine to move to another location on the PC board, go back to a previous line in the program, and repeat the pattern.
Excellon Program Format vs. Other Manufacturers
Because Excellon is a pioneer in the manufacture of computerized drilling and routing equipment, it was necessary for Excellon to develop a set of commands to control the machines. The set is called Excellon Numeric Control and it uses the same commands for all Excellon machines. Some of these commands have become standard in the industry and are widely used by other manufacturers. The first machines introduced by Excellon were drilling machines. The set of commands used on drillers later became known as Format One. When Excellon introduced machines with routing capability, a set of commands called Format Two was created. Then in 1979, Excellon revised Format Two to combine drilling and routing commands into one common set. The machines introduced prior to 1979 are called generation one machines and cannot use Format Two. They do not have all the capabilities of the newer machines. However, newer generation two machines can run part programs with either Format One or Format Two commands.
What a Part Program Must Include
There is some information that the CNC-7 cannot know without being told. Some of the things that the part program must tell the machine are:
Where to drill each hole |
Where to rout |
What size tool to use |
Additionally, if the programmer wants to change the speed of the direction of a particular tool of the worktable, without stopping the machine, the change must be made in the part program. Examples of these changes are:
Reverse the direction of routing |
Change the table feed rate |
Change the spindle RPM |
Writing a Part Program
This section describes what you need to know to write a part program header and a part program. It identifies the mandatory requirements, as well as the options, and provides you with examples of how a part program might look.
The Header: Setting Up The Job
The header is always located at the beginning of a part program. It consists of a series of instructions (commands) that are used to give your machine general information about the job. This includes the size and speed of tools, the kind of measurement system you are using, the direction of the X and Y axis of the work, and other details. The header can have just a few commands, or dozens of them, depending on your needs. Most of these commands may be placed in any order. But one thing the header may NOT include is machine motion commands such as JOG or HOME. Do you remember that we said the header is optional? This does not mean that the commands you write into a header are optional. If you choose not to use a header, then you must either write the commands into the part program or enter them at the CNC-7 console before the program runs. Entering them manually can lead to problems. Suppose that you get an order to produce a set of the same PC boards every two or three months. Each time the program is loaded into the CNC-7, you must be given instructions on all the commands that have to be entered before the job can begin. If you put the commands in the header instead, you are assured of consistent settings for the machine.
Example of a Header
Below is a sample of a header. The PURPOSE shown to the right of the COMMAND is not part of the command, but is shown for your benefit to explain the command:
COMMAND |
PURPOSE |
M48 |
The beginning of a header |
INCH,LZ |
Use the inch measuring system with leading zeros |
VER,1 |
Use Version 1 X and Y axis layout |
FMAT,2 |
Use Format 2 commands |
1/2/3 |
Link tools 1, 2, and 3 |
T1C.04F200S65 |
Set Tool 1 for 0.040" with infeed rate of 200 inch/min Speed of 65,000 RPM |
DETECT,ON |
Detect broken tools |
M95 |
End of the header |
Beginning of a Part Program Header
M48
M48 Defines the start of an M48 part program header. This command must appear on the first line of the part program header. This tells the CNC-7 that the program has a header. Please note that comment lines and blank lines are permitted in the M48 header and are ignored. Comment lines are lines of text beginning with the semicolon (;) character.
See also: Part Program Headers
End of a Part Program Header
M95
M95 Defines the end of a part program header. Either this command or the % command must follow the last header command in the part program header. This tells the CNC-7 where the header ends. When this command is used, the machine will immediately start to execute the part program body commands following the M95 command.
See also: Part Program Headers, M48
Rewind Stop
%
% Defines the end of a part program header. Either this command or the M95 command must follow the last header command in the part program header. This tells the CNC-7 where the header ends. When this command is used, the machine will stop at the end of the header and await your action. You may enter any appropriate Keyboard commands and/or press CYCLE START to continue.
Note: This command has a different meaning when used in the part program body.
See also: Part Program Headers, M48, M49
Commands Used in a Header
The following table provides you with a list of commands which (not a complete list) are the most used in a part program header. Some Operating System commands, which are discussed in the chapter on System Software, are not included here. If other commands are used, the CNC-7 will display a message when you try to run the part program. Most of the commands between the M48 and M95 or % commands may be arranged in any order, but there are some common sense exceptions. For example, the INCH/METRIC command must be specified before any commands with dimensions.
COMMAND |
DESCRIPTION |
AFS |
Automatic Feeds and Speeds |
ATC |
Automatic Tool Change |
BLKD |
Delete all Blocks starting with a slash (/) |
CCW |
Clockwise or Counterclockwise Routing |
CP |
Cutter Compensation |
DETECT |
Broken Tool Detection |
DN |
Down Limit Set |
DTMDIST |
Maximum Rout Distance Before Toolchange |
EXDA |
Extended Drill Area |
FMAT |
Format 1 or 2 |
FSB |
Turns the Feed/Speed Buttons off |
HPCK |
Home Pulse Check |
ICI |
Incremental Input of Part Program Coordinates |
INCH |
Measure Everything in Inches |
METRIC |
Measure Everything in Metric |
M48 |
Beginning of Part Program Header |
M95 |
End of Header |
NCSL |
NC Slope Enable/Disable |
OM48 |
Override Part Program Header |
OSTOP |
Optional Stop Switch |
OTCLMP |
Override Table Clamp |
PCKPARAM |
Set up pecking tool,depth,infeed and retract parameters |
PF |
Floating Pressure Foot Switch |
PPR |
Programmable Plunge Rate Enable |
PVS |
Pre-vacuum Shut-off Switch |
R,C |
Reset Clocks |
R,CP |
Reset Program Clocks |
R,CR |
Reset Run Clocks |
R,D |
Reset All Cutter Distances |
R,H |
Reset All Hit Counters |
R,T |
Reset Tool Data |
SBK |
Single Block Mode Switch |
SG |
Spindle Group Mode |
SIXM |
Input From External Source |
T |
Tool Information |
TCST |
Tool Change Stop |
UP |
Upper Limit Set |
VER |
Selection of X and Y Axis Version |
Z |
Zero Set |
ZA |
Auxiliary Zero |
ZC |
Zero Correction |
ZS |
Zero Preset |
Z+# or Z-# |
Set Depth Offset |
% |
Rewind Stop |
#/#/# |
Link Tool for Automatic Tool Change |
/ |
Clear Tool Linking |
Duplicate Commands
If you have a command in the header and the exact same command in the part program body, there is no harm done. Nor will it matter if you enter the exact same command from the keyboard. In each case, because the commands do not contradict each other, the performance of the machine will not be affected.
Keyboard and Header Commands vs. Body Commands
Some commands allow you to specify optional information. When the options in the part program body are different from the options in the header or console, the body options are not used. Suppose you specify in the header which spindle speed you want for a particular tool. Then you repeat the tool command in the part program body and specify a different speed. The speed in the header will override the speed in the body. You could change the speed ten times in the program, but the spindle will rotate at the speed you specified in the header, each and every time.
Keyboard vs. Header Commands
Commands entered by you at the keyboard will also override duplicate commands in the part program body. Keyboard entered commands and header commands have the same authority, and they can conflict with each other. But system software uses the latest one entered as the governing authority. After a part program has been loaded, any commands entered at the keyboard will override the same command in the header. But if the command is entered at the keyboard, and then the part program is loaded, the header overrides the keyboard.
Beyond The Header: The Part Program Body
COMMAND |
DESCRIPTION |
A# |
Arc Radius |
B# |
Retract Rate |
C# |
Tool Diameter |
F# |
Table Feed Rate;Z Axis Infeed Rate |
G00X#Y# |
Route Mode |
G01 |
Linear (Straight Line) Mode |
G02 |
Circular CW Mode |
G03 |
Circular CCW Mode |
G04 |
X# Variable Dwell |
G05 |
Drill Mode |
G07 |
Override current tool feed or speed |
G32X#Y#A# |
Routed Circle Canned Cycle |
CW G33X#Y#A# |
Routed Circle Canned Cycle |
CCW G34,#(,#) |
Select Vision Tool |
G35(X#Y#) |
Single Point Vision Offset (Relative to Work Zero) |
G36(X#Y#) |
Multipoint Vision Translation (Relative to Work Zero) |
G37 |
Cancel Vision Translation or Offset (From G35 or G36) |
G38(X#Y#) |
Vision Corrected Single Hole Drilling (Relative to Work Zero) |
G39(X#Y#) |
Vision System Autocalibration |
G40 |
Cutter Compensation Off |
G41 |
Cutter Compensation Left |
G42 |
Cutter Compensation Right |
G45(X#Y#) |
Single Point Vision Offset (Relative to G35 or G36) |
G46(X#Y#) |
Multipoint Vision Translation (Relative to G35 or G36) |
G47 |
Cancel Vision Translation or Offset (From G45 or G46) |
G48(X#Y#) |
Vision Corrected Single Hole Drilling (Relative to G35 or G36) |
G82(G81) |
Dual In Line Package |
G83 |
Eight Pin L Pack |
G84 |
Circle |
G85 |
Slot |
G87 |
Routed Step Slot Canned Cycle |
G90 |
Absolute Mode |
G91 |
Incremental Input Mode |
G93X#Y# |
Zero Set |
H# |
Maximum hit count |
I#J# |
Arc Center Offset |
M00(X#Y#) |
End of Program - No Rewind |
M01 |
End of Pattern |
M02X#Y# |
Repeat Pattern Offset |
M06(X#Y#) |
Optional Stop |
M08 |
End of Step and Repeat |
M09(X#Y#) |
Stop for Inspection |
M14 |
Z Axis Route Position With Depth Controlled Contouring |
M15 |
Z Axis Route Position |
M16 |
Retract With Clamping |
M17 |
Retract Without Clamping |
M18 |
Command tool tip check |
M25 |
Beginning of Pattern |
M30(X#Y#) |
End of Program Rewind |
M45,long message\ |
Long Operator message on multiple\ part program lines |
M47,text |
Operator Message |
M50,# |
Vision Step and Repeat Pattern Start |
M51,# |
Vision Step and Repeat Rewind |
M52(#) |
Vision Step and Repeat Offset Counter Control |
M02XYM70 |
Swap Axes |
M60 |
Reference Scaling enable |
M61 |
Reference Scaling disable |
M62 |
Turn on peck drilling |
M63 |
Turn off peck drilling |
M71 |
Metric Measuring Mode |
M72 |
Inch Measuring Mode |
M02XYM80 |
Mirror Image X Axis |
M02XYM90 |
Mirror Image Y Axis |
M97,text |
Canned Text |
M98,text |
Canned Text |
M99,subprogram |
User Defined Stored Pattern |
P#X#(Y#) |
Repeat Stored Pattern |
R#M02X#Y# |
Repeat Pattern (S&R) |
R#(X#Y#) |
Repeat Hole |
S# |
Spindle RPM |
T# |
Tool Selection; Cutter Index |
Z+# or Z-# |
Depth Offset |
% |
Beginning of Pattern (see M25 command) |
/ |
Block Delete |
List of Equivalent Format One Commands
FORMAT TWO COMMAND |
EQUIVALENT FORMAT ONE COMMAND |
G05 |
G81 |
M00 |
M02 |
M01 |
M24 |
M02 |
M26 |
M06 |
M01 |
M08 |
M27 |
M09 |
M00 |
M02X#Y#M70 |
M26X#Y#M23 |
M72 |
M70 |
M02X#Y#M80 |
M26X#Y#M21 |
M02X#Y#M90 |
M26X#Y#M22 |
R#M02 |
R#M26 |
X and Y Coordinates
The location on the PC board where a hole is to be drilled or a router begins or ends a move is called a coordinate. A coordinate is a pair of measurements used to locate that point. It is measured along an axis which runs from the front to the back of the machine, and an axis which runs from left to right. These axes are perpendicular to each other and are known as the X and Y axis. When the machine is not in the routing mode, the coordinate is also the command for a drill bit to plunge into the panel and drill a hole. The coordinate tells the CNC-7 to move the spindle to the location and drill. There are two ways to move from coordinate to coordinate and you must choose one of them when you are programming. The two ways are absolute and incremental. Absolute means that every coordinate is measured to the same location on the board. This location is called work zero. Incremental means that every coordinate is measured to the previous coordinate. Unless you specify otherwise, the CNC-7 runs in the absolute mode, and part programs must be programmed for absolute. When you program in the incremental mode, include the ICI,ON command in the part program header, or in the MACH.DAT file. The following illustrates how a set of holes are programmed in either absolute or incremental mode. Note that when either the X or Y coordinate does not change from one hole to another, it does not have to be repeated.
ABSOLUTE |
INCREMENTAL |
XY |
XY |
Y01 |
Y01 |
Y02 |
Y01 |
X012Y032 |
X012Y012 |
X024Y044 |
X012Y012 |
X034 |
X01 |

Inch vs. Metric
Coordinates are measured either in inch or metric (millimeters). Inch coordinates are in six digits (00.0000) with increments as small as 0.0001 (1/10,000). Metric coordinates can be measured in microns (thousandths of a millimeter) in one of the following three ways:
Five digit 10 micron resolution (000.00) |
Six digit 10 micron resolution (0000.00) |
Six digit micron resolution (000.000) |
You specify the coordinate measurement you want by using the METRIC or INCH command in the program header. When the program is running on the machine, all X and Y coordinates will be displayed on the screen in the form you have chosen. Additionally, all other measurements will be displayed in this form, including the following:
Feed Rate |
Tool Diameter |
Spindle Upper and Lower Limit |
Rout Depth |
Spindle Retract Rate |
All Zero Locations |
Depth Offset |
Routing Distance |
Leading and Trailing Zeros
When you type coordinates into the CNC-7, it is important that you understand leading and trailing zeros. The previous section explains that the CNC-7 uses inches in six digits and metric in five or six digits. The zeros to the left of the coordinate are called leading zeros (LZ). The zeros to right of the coordinate are called trailing zeros (TZ). The CNC-7 uses leading zeros unless you specify otherwise through a part program or the console. You can do so with the INCH/METRIC command discussed later in this chapter. If you don't specify leading or trailing zeros, the CNC-7 will automatically use the last setting. With leading zeros, when you type in a coordinate, the leading zeros must always be included. If you don't, the CNC-7 will misinterpret the coordinate and move to the wrong location on PC board. Trailing zeros are unneeded and may be left off. The CNC-7 will automatically add them. This allows you to save time in typing the coordinates. If you have selected trailing zeros, the reverse of the above is true. You must show all zeros to the right of the number and can omit all zeros to the left of the number. The CNC-7 will count the number of digits you typed and automatically fill in the missing zeros.
Here are some examples of using the leading zero inch mode:
X0075 |
Correct |
X007500 |
Incorrect, the two trailing zeros are unnecessary |
Y014 |
Correct |
Y014000 |
Incorrect, the three trailing zeros are unnecessary |
Here are some examples of using the trailing zero inch mode:
X7500 = 0.75 inch |
X75 = 0.0075 inch |
The rules for typing leading and trailing zeros for other commands are discussed under each command.
Decimal Places
Decimals are not needed in either INCH or METRIC modes. But if you do use them, the decimal point will automatically override leading zero or trailing zero mode. Coordinates can be typed with or without the decimal. If you use the decimal and the coordinate distance is less than one inch or one centimeter, you can eliminate the zeros to the left of the decimal. For example, in the INCH format:
X.075 |
Correct |
X00.075 |
Incorrect, the two zeros are unnecessary |
The same applies to the METRIC format with three and four zeros to the left of the decimal. But in either case, if you have a whole number to the left of the decimal, it must be included. For example:
Y1.45 |
Correct |
Y0001.45 |
Incorrect, the three zeros are unnecessary |
If you choose to type coordinates without the decimal, all zeros to the left of the decimal must be shown. For example:
X00093 = 0.093 inch in inch format |
Y00093 = 93 micron in metric format 000.00 |
Tool Commands
There are several commands used to select and control tools. Some are used separately and others are combined to form a single command. Whenever tool commands are used in the header, they are strictly for loading tool data into the CNC-7. When tool commands are intended for tool changing or for machine movements, they must be in the body of the program. The # in each command indicates that a number is to be used to designate quantity, distance, speed, etc. From one to six digits are used, depending on the command. The number of the tool specified with the tool command is the same as the tool number on the Tool Data Page.
Tool Commands
Tool Selection
T#
T# is used to specify which tool is to be used next in the manual or automatic tool change mode. It may be used in the part program header or body, or an M02 block step and repeat patterns. On machines with automatic tool change, the spindle will put away the tool it is using, pick up the tool number you specify in the place of #, and move to the next coordinate in the part program. On machines with manual tool change, the worktable will move to the part position and stop. The screen will display the message in the Machine Status box. After changing the tool, you press the CYCLE START button and the machine resumes operation. Tool numbers 1 through 9 may be specified with or without a leading zero. (e.g. 01 or 1)
Examples of usage:
T1 |
Tool number one |
T01 |
Tool number one |
T10 |
Tool number ten |
Tool Selection with Compensation Index
T#(#) is used to select a specific tool and to set the Compensation Index for that tool. This command allows you to specify four digits. The last two are for the index number. If you omit the last two digits, or specify zeros, the index will be set equal to the tool number in the first two digits.
Compensation value is used in routing operations. Routing tools can bend and deflect away from the work, especially when moved in the counterclockwise direction. The Compensation value offsets the path of the tool to compensate for the size and deflection of the tool. For example, a tool of 0.092" diameter might be specified for a clockwise direction. In the counterclockwise direction, however, you might need to use a diameter of 0.094". But you may not have such a diameter, or it may not be possible or practical to switch tools. Instead, you can assign an index number for a tool with a diameter of 0.094" (Refer to the CP,#,#.# command in the Keyboard Commands chapter). When you identify the index number with your 0.092" diameter routing tool, the CNC-7 will offset the path of the tool as though it were 0.094" diameter.
The Compensation Index value must be entered before the rout mode is turned on (G00 command), and may not be changed during routing moves.
Example of usage:
T0302 |
Tool number 3 with Compensation Index 2 |
See also: CP,#,#.#
Z-Axis Infeed
F#
F# is used within a routing sequence to set the worktable feed rate, or in a drilling sequence to set the spindle (Z-axis) infeed rate. Feed rate values are always entered in leading zero format, e.g.: F2 means 200 inches per minute, and F02 means 20 inches per minute. The value you assign in place of #, indicates inches per minute (IPM) or millimeters per second (mm/s). Decimals are not to be used with this command. They will produce a message when the part program runs on the machine. Drilling feed rates must be given to the CNC-7 or the machine will not run. The rate may be specified in the Tool Data Page, or through the F# command. The F# command may also be entered at the Tool Data Page to change the infeed rate for a particular tool.
The drilling feed rate can be set from 10 to 500 IPM (4 to 212 mm/s), in increments of 1 IPM (1mm/s). The routing table feed rate can be set from 10 to 150 IPM (4 to 63 mm/s), in increments of 1 IPM (1 mm/s). If you do not set a feed rate, the CNC-7 will use a maximum rate of 100 IPM for any router.
Examples of usage:
T01F2 |
Tool number one with a spindle infeed rate of 200 IPM or 200 mm/s |
F07 |
Worktable feed rate of 70 IPM or 70 mm/s for routing |
F03 |
Worktable feed rate of 30 IPM or 30 mm/s for routing |
Retract Rate
B#
B# is used to set the spindle (Z-axis) retract rate, e.g., the speed at which the tool is withdrawn from the work. Retract values are always entered in leading zero format, e.g.: B02 means 200 inches per minute, and B002 means 20 inches per minute. The value you assign in place of # indicates inches per minute (in/min) of millimeters per second (mm/s). Decimals are not to be used with this command. They will produce a message when the part program runs on the machine. The B# command may also be entered at the Tool Data Page to change the retract rate for a particular tool. A default retract rate is established when the CNC-7 is started. If NO B# command is specified for a tool, the default retract rate will be used. The default rate may be changed using the RTR keyboard command. The retract rate can be set from 10 to 1000 IPM (5 to 425 mm/s), in increments of 1 IPM (1 mm/s). Unless altered by the RTR command, the default retract rate is 1000 in/min (425 mm/s).
Example of usage:
T01B02 |
Tool number one with a spindle retract rate of 200 IPM or 200 mm/s. |
See also: RTR
Spindle RPM
S#
S# Sets the speed of spindle rotation. The value you assign in place of # indicates RPM in thousands. Trailing zeros are not shown. The S# command may also be entered at the Tool Data Page to change the rate for a particular tool. The spindle speed on most machines may be programmed from a minimum of 14,000 RPM to a maximum of 60,000 RPM for routers and 80,000 RPM for drilling tools. Some machines have spindles speeds greater than 100,000 RPM. When you specify a speed of six digits on these machines, use a decimal point, followed by a number to indicate hundreds of RPM's. This command may not be used by itself, but must be included in a tool selection block (T#S#).
Examples of usage:
T01S612 |
Tool number one with a speed of 61,200 RPM |
T06F200S61 |
Tool number six with a feed rate of 200 IPM or 20 mm/s and a speed of 61,000 RPM |
T03S6 |
Tool number three with a speed of 60,000 RPM |
T04S110.5 |
Tool number four with a speed of 110,500 RPM |
Override Current Tool Feed OR Speed
G07
When G07 is used inside the part program, the tool feed or speed can be changed after G07 command. It only affects the current part program.
Tool Diameter
C#
C# is used to select the tool diameter necessary for certain machine canned cycles. When feed and speeds are not specified with Tool Diameter, the CNC-7 will load them from the tool diameter table if a tool diameter table has been loaded. The value you specify in place of # indicates the diameter in thousandths of an inch, or microns, depending on which measurement mode the machine is set for. Trailing zeros are not shown. The C# command may also be entered at the Tool Data Page to change the diameter of a particular tool. This command should not be used by itself but must be included in a tool selection command block (T#C#).
Examples of usage:
T1C.04 |
Set Tool number one to .040" diameter (with feed and speed from the tool diameter page). |
T1C.04F200S65 |
Set Tool number one to .040" diameter with an infeed rate of 200 and spindle speed of 65,000 RPM. |
See also: Canned Cycle Commands
Set Maximum Hit Count
H#
H# is used to make sure that only sharp drill bits are used to drill holes. You set the maximum number of times that a drill tool may drill a hole (hit) by specifying a number in place of #. Hit counters keep track of the number of times each tool bit drills a hole. When the counter equals the maximum set by this command, the tool bit is considered to be expired, and the machine stops drilling. If other tools are linked to the expired tool, the machine will automatically change tools and continue drilling. Otherwise, the worktable will move to the park position and stop. The H# command may also be entered at the Tool Data Page to change the maximum number of hits for a particular tool. This command should not be used by itself, but must be included in a tool selection command block (T#H#). Leading and trailing zeros do not apply and decimals are not allowed. This command can also be used to turn off a hit counter so that the drill bit continues drilling. Type the H by itself without a number and the hit counter for that tool will be turned off.
Examples of usage:
T03H2000 |
Tool number three set at 2,000 hits maximum |
T01H |
Tool number one maximum hit counter is turned off |
Depth Offset
Z+# or Z-#
Z+# (or Z-#) Sets the Depth Offset for tools. This command is used in conjunction with T# command. Depth Offset may be programmed for each logical tool. A mean depth, common to all tools, can be supplied through the part program header, or by you through the keyboard, or through the LOWER LIMIT or ROUT DEPTH switches on the Touch Screen. The Depth Offset is programmed as a deviation or offset from the mean depth. You supply the offset in place of #.
The offset value will be in inch or metric, LZ or TZ, depending on how the machine is set. The offset can be supplied in increments of 0.001" (0.01mm). Decimal mode may be used. Plus signs (+) may be omitted, but minus signs (-) must be used to indicate negative values. A positive value offsets the depth of the tool above the mean depth set by you or the part program header. A negative value represents a distance below the mean depth. Depth Offset permits control of drill penetration depth into the backup material. A large tool Depth Offset, requires a greater penetration depth than does an intermediate size tool, or a small tool. Accurate penetration depth is necessary to ensure that the tool chamfer clears the back of the last circuit board in the stack being drilled. The mean depth, plus the programmed Depth Offset, gives you the actual depth for that tool. The resulting actual depth must not be less than zero because this represents the lower limit of Z-axis (spindle) travel. A minimum Z-axis stroke length must be maintained. Therefore, the actual depth must be at least 0.125" (3.18mm) lower than the Upper Limit set.
The Z# command may also be entered at the Tool Data Page to change the depth offset for a particular tool. Depth Offsets may be included with preprogrammed infeed and speed information through the keyboard or a part program header. Offsets can also be stored on the Diameter Page. The Depth Offset may also be included in a part program as part of an integral feed and speed block.
Examples of usage:
T01C00125Z-00001 |
Sets drill penetration depth for tool 01 to 0.001" below the mean depth |
T02C0009Z |
Sets drill penetration depth for tool 02 to the mean depth |
T03C00008Z00002 |
Sets drill penetration depth for tool 03 to 0.002" above the mean depth |

Link Tools for Automatic Tool Changers
#/#/#
#/#/# links tools together so that when one tool expires (too dull to drill anymore), the machine will automatically change tools and continue drilling. Naturally, all the tools linked together must be the same size. You select the tools to be linked by specifying a tool number in place of #. You may link as many of the same size tools together as you need. When the CNC-7 reads this command in your part program, it will update the Tool Data Page to show which tools are linked together.
Tools will be used in sequence from left to right, as you specify in the command.
The tool linking command may also be entered at the Tool Data Page to change the linking arrangement. Tool linking does not apply to the Tool Management System (TMS). The maximum hit counter tells the CNC-7 when it is time to replace a worn-out tool, and tool linking tells the CNC-7 which tool is to be used next. Tool linking is used in conjunction with Automatic Tool Change (ATC). When ATC is OFF, the CNC-7 will PARK the worktable and instruct you to replace the tool in the collet. If ATC is ON, but tool linking is disabled, the machine will put the tool away and request a replacement.
Example of usage:
1/5/6 |
Link tools number one, five, and six. |
Clearing Tool Linking
A slash, all by itself in a block, will clear any previous tool linking performed by the Tool Linking command described above. When the CNC-7 reads this command in your part program, it will clear the links, which are displayed on the Tool data page if your machine is equipped with an ATC Toolchanger.
Hierarchy of Tool Commands
When several tool commands are combined into one, the order of their appearance in the combined command can be very important. The CNC-7 reads the command from left to right. The commands on the left can be overridden by the commands to the right.
For example, look at the following two sample commands:
T01F190S73C.038 |
T01C.038F190S73 |
Both commands contain the same information, but in a different order. In the first example, the CNC-7 selects tool 01, sets the feed at 190 IPM, sets the spindle speed at 73,000 RPM, and then is told that the diameter of the bit is 0.0038". The CNC-7 will now look at the Tool Diameter Page and use the feed and speed listed, if any, in the table. It may ignore the feed and speed you specified in the command. In the second sample, the opposite is true. The CNC-7 selects tool 01, looks in the Tool Diameter Page for a drill bit of 0.0038" diameter, then sets the feed at 190 IPM and the speed at 73,000 RPM. The feed and speed in the Diameter Page will be ignored.
Tool Changing
If you have only manual tool changing on your machine, then you must specify in the part program when you want to change the tool. If you have automatic tool change on your machine, you need to specify not only when to change tools, but which tool the spindle is to pick up. Changing a tool is a simple matter. When you get to the point in the program where the tool is to be changed, just type in a tool command and specify which tool is to be used for the next operation. Nothing has to be said about the tool that you are dropping. If you need to have a special RPM or infeed rate used with the tool, include it with the tool command.
Drilling and Routing Commands
When you switch from a drill bit to a router, or vice versa, the CNC-7 needs to know what mode it is in: drilling or routing. This is done with the G00 or G05 commands, which are described later in this chapter. As soon as the CNC-7 encounters one of these commands in the part program, it knows which mode it is in. Several other commands will also tell the CNC-7 whether it is in drilling or routing mode. These are the canned cycles commands which are described in the next section.
Rout Mode
G00
G00 turns the routing mode on and the drilling mode off. This command is required before any routing can be performed. An X and Y coordinate must be provided to move the worktable to a starting point for routing. When the CNC-7 encounters this command, the worktable moves to the X,Y coordinate. The spindles will not plunge into the work until a plunge command (e.g. M15) is given. Compensation is automatically turned off during the move and can be turned on again after the move. The G00 command remains in effect until another G00 command, or a G01, G02, G03, or G05 command is encountered. Do not use this command when the Z-axis is in the rout position. The tool can be damaged by a high speed move.
Format: G00X#Y#
Drill Mode
G05
G05 turns the routing mode off and returns to the default drill mode. This command is programmed in a block by itself and remains in effect until a G00 is encountered. G05 is not needed if routing has not been turned on by any rout command in the part program. Any coordinates following the G05 command will cause the worktable to move at maximum velocity to the command position and perform a drill stroke. The spindles will start to rotate above the tool holders with Automatic Tool Change (ATC) ON, and at the Drill Ready position with ATC OFF.
Special note: The G81 command, when used in Format 1, is equivalent to the G05 command. The G81 command, when used in Format 2, becomes equivalent to the G82 command.
Routing Commands
Excellon has developed a series of fourteen commands which are used strictly for routing. Each of these commands are presented here.
Linear Move
G01
G01 turns on linear interpolation mode. This means that the machine will begin routing in a straight line. If you supply an X and/or Y coordinate with the command, the machine will rout a straight line from the current position to the coordinate position. If you do not supply coordinates, the CNC-7 will look for coordinates in a succeeding block, and rout to the first coordinate found. Unless a different rate has been set, linear movement will occur at a default rate of 100 IPM (42.3 mm/s) at 100% feed rate. This can be overridden with the F# command, described in the Tool Commands section of this chapter, or with the FEED RATE buttons on the Touch Screen.
Format: G01(X#)(Y#)
Circular Clockwise Move
G02
G02 turns on circular interpolation mode and sets clockwise direction of travel. If you supply an X and/or Y coordinate with the command, the worktable will move to that coordinate position. The move will be made along an arc in a clockwise direction at a controlled velocity. If you do not supply coordinates, the CNC-7 will look for coordinates in a succeeding block, and rout to the first coordinate found. The arc must be equal to or less than 180 degrees. The arc radius or the arc center offset is specified either by the A# command or the I#J# command. These commands are indicated as optional. If they are not included in the G02 command, they must be included in a previous block of the program, either alone or with another routing command. The A# and I#J# commands are discussed in the next sections. Unless a different rate has been set, movement will occur at a default rate of 100 IPM (42.3 mm/s) at 100% feed rate. This can be overridden with the F# command, described in the Tool Commands section of this chapter, or with the FEED RATE switches on the Touch Screen.
Examples of usage (these are three separate examples):
EXAMPLE NUMBER |
COMMAND
|
DESCRIPTION
|
1 |
G02X0245Y021A00075
|
Sets radius to 0.075"
|
2 |
G02X0245Y021A00075
X025567Y020567
|
Sets radius to 0.075"
Circular clockwise move with 0.075" radius
|
3 |
G02X0245Y021A00075X025567Y020567
X0246Y0154A0015
|
Sets radius to 0.075"Circular clockwise move with 0.075" radius
Circular clockwise move with 0.15" radius
|
Format: G02(X#)(Y#)(A#) G02(X#)(Y#)(I#J#)
Circular Counterclockwise Move
G03
G03 turns on circular interpolation mode and sets counterclockwise direction of travel. If you supply an X and/or Y coordinate with the command, the worktable will move to that coordinate position. The move will be made along an arc in a counterclockwise direction at a controlled velocity. If you do not supply coordinates, the CNC-7 will look for coordinates in a succeeding block, and rout to the first coordinate found. The arc must be equal to or less than 180 degrees. The arc radius or the arc center offset is specified either by the A# command or the I#J# command. If they are not included in the G03 command, they must be included in a previous block of the program, either alone or with another routing command. The A# and I#J# commands are discussed in the next sections. Unless a different rate has been set, movement will occur at a default rate of 100 IPM (42.3 mm/s) at 100% feed rate. This can be overridden with the F# command, described in the Tool Commands section of this chapter, or with the FEED RATE switches on the Touch Screen.
EXAMPLE NUMBER |
COMMAND
|
DESCRIPTION
|
1 |
G03X0245Y021A00075
|
Sets radius to 0.075"
|
2 |
G03X0245Y021A00075
X025567Y020567
|
Sets radius to 0.075"
Circular counterclockwise move with 0.075" radius
|
3 |
G03X0245Y021A00075X025567Y020567
X0246Y0154A0015
|
Sets radius to 0.075"Circular counterclockwise move with 0.075" radius
Circular counterclockwise move with 0.15" radius
|
Format: G03(X#)(Y#)(A#) G03(X#)(Y#)(I#J#)
Arc Radius
A#
A# Specifies the arc radius of a circular move. You specify a radius in place of #. The digits you supply will be in inch or in metric mode, however the system is set. The arc radius command is used in conjunction with the G02, G03, G32, or G33 commands discussed in this section. If the radius you specify does not fit the X,Y coordinates supplied with these commands, the CNC-7 will adjust the arc to fit the coordinates. The following figure shows how the arc is adjusted.

Arc Center Offset
I#J#
I#J# Specifies the distance from the arc center to the starting point of the arc to be routed. I# specifies the offset distance along the X axis and J# specifies the offset distance along the Y axis. I and J distances are measured from the arc center, not from work zero.
Routed Circle Canned Cycle CW or CCWG32
G33
G32 or G33 is used to rout out an inside circle. The G32 command routs in a clockwise (CW) direction, and the G33 command routs in a counterclockwise (CCW) direction. These commands provide automatic plunge, retract, and compensation with plunge and retract points off the circle to prevent gouging. You supply the coordinates for the center of the circle in place of X#Y#, and a radius in place of A#. A# may be omitted if the radius is the same as the previous rout move. The minimum radius size is one half of the Compensation Index value, plus 0.01" (0.254 mm). Anything less results in a message. A# can be omitted if the radius is the same as one specified several rout moves back, with no radius being specified in between. Note: Cutter compensation is always used. Commands G32 and G33 must be used for each inside circle to be cut. The pattern repeat code P cannot be used with these two commands. The G32 and G33 commands cause the machine to plunge 0.01 inch (0.254mm) off the edge of the circle, rout 540 degrees in the appropriate direction, end up 0.1 inch (2.54mm) off the edge of the opposite side of the circle, and retract. The Feed command (F#) may be entered in the block prior to the G32 or G33 commands to set the Table Feed Rate.
For example:
The G32 command will generate the following sequence internally:
G00X#Y# |
M15 |
G02X1Y1Ac (where Ac = A# - one half compensation value) |
Y2 |
Y1 |
XrYr |
M17 |
Note: If a specific controlled table feed rate is desired, the G32 or G33 must be preceded with a G00 block containing the feed rate.
Format: G32X#Y#A# G33X#Y#A#
Cutter Compensation Off
G40
G40 turns cutter compensation off. This command is programmed in a block by itself. Cutter compensation is discussed with the G41 and G42 commands below, and with the Cutter Compensation Page.
THIS COMMAND MUST NOT BE USED WHILE PLUNGED!
Example of usage:
G40
See also: G41, G42, Cutter Compensation Page
Cutter Compensation Left |