CNC_Programming.pdf

(237 KB) Pobierz
file://C:\CNC%20Programming.PDF
Program Commands
Page 1 of 49
Part Programming Commands
Part Programming
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
file://C:\CNC%20Programming.htm
12/11/2003
167047210.004.png 167047210.005.png
Program Commands
Page 2 of 49
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
file://C:\CNC%20Programming.htm
12/11/2003
167047210.006.png
Program Commands
Page 3 of 49
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
file://C:\CNC%20Programming.htm
12/11/2003
167047210.007.png
Program Commands
Page 4 of 49
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.
file://C:\CNC%20Programming.htm
12/11/2003
167047210.001.png 167047210.002.png
Program Commands
Page 5 of 49
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
file://C:\CNC%20Programming.htm
12/11/2003
167047210.003.png
Zgłoś jeśli naruszono regulamin