CNC Mill Programming PDF M
CNC Mill Programming PDF M
CNC Mill Programming PDF M
Programming
PDF Manual
You must complete safety instruction before using tools and equipment in
the Medical Device Center, ME Student Shop and CSE Workshops.
All machinery can be dangerous. You must have a trained individual instruct
you first when using unfamiliar equipment.
Only authorized and trained individuals may operate CNC equipment.
Code examples shown are for illustration purposes only, and are not meant
for operation or programming actual equipment. They may be incomplete or
contain errors.
Always abide by shop safety instructions and never engage in horseplay.
Remember to wear OSHA approved eye protection in the shop, short sleeves,
leather or steel toed shoes, and secure long hair, avoid loose clothing, and
take off rings, watches and bracelets when using power equipment.
These slides are part of the “Introductory Medical Device Prototyping” course
at the University of Minnesota, and are not meant for any other purpose.
Formal training in Haas is available from Productivity, Inc.
Image courtesy of Productivity and Haas
Image courtesy of Productivity and Haas
A Fourth Axis Rotation (Around the X axis)
B Fifth Axis Rotation (Around the Y axis)
C Auxiliary External Rotary Axis (Around Z)
D Tool diameter offset from the Tool Offset
Page – D01 to D200.
F Speed of the movement of the spindle in the material
in inches per minute (IPM). e.g. F10.0 = 10 linear IPM.
G Preparatory function - modes of operation
H Tool length offset from the Tool Offset Page –
e.g. #01. H02 – Tool Length Value #2.
I Arc – distance from center to X axis
J Arc – distance from center Y axis
K Arc – distance from center to X axis
L Loop count for repeated cycles
M Turning off and on machine functions. e.g. M3 and M4
turn the spindle on, M5 off. M8 coolant on, M9 coolant
off.
N Block line numbers. M97 functions may address an N
line number.
O Program name: Onnnnn
P Delay time or program jump
R Rapid plane – how far above the part to rapid the tool
to. Also radius of an arc.
T Tool selection position in the tool changer.
X, Y, Z Linear motions in these axis.
Come in groups – each establishing a mode
of operation.
No more than one G code in a group in a
block.
Model G codes remain effective until replaced
with another code in the same group.
Non-modal G codes are effective only in the
calling block.
M00 Program stop (spindle, axes, coolant) M32 Chip conveyer backward
M01 Optional stop e.g. tool change M33 Chip conveyer stop
M03 Spindle forward (clockwise) M34 Increment spigot up
M04 Spindle reverse (ccw) M35 Increment spigot down
M05 Spindle stop M41 Low gear
M06 Load new tool e.g. T1 M06 M42 High gear
M08 Coolant on M82 Tool unclamp
M09 Coolant off M86 Tool clamp
M19 Orient spindle M97 Local sub-Program call (P or L)
M30 Program end and rewind M98 Sub-program call (P or L)
M31 Chip conveyer forward M99 Return for subprogram or loop
Important student use setups: Go to settings and disable “tool drop” and “.1 tool rate.”
#76 lockout and #163 disable. Do not use M82 – tool will just fall out. Also, disable
switch on controls – it can also cause this to happen.
M03 Spindle Forward, e.g. Snnnn
M04 Spindle Reverse
M05 Spindle Stop
G94 Feed IPM (default – inches per minute)
G95 Feed IPR (inches per revolution)
𝑆 = 𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝑆𝑆𝑆𝑆𝑆 𝑖𝑖 𝑅𝑅𝑅
𝑆𝑆𝑆
𝑅𝑅𝑅 = 3.82 𝑥 (revolutions per minutes)
𝐶𝐶𝐶𝐶𝐶𝐶 𝐷𝐷𝐷𝐷
𝑆𝑆𝑆 = 0.262 𝑥 𝐶𝐶𝐶𝐶𝐶𝐶𝐶 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 𝑥 𝑅𝑅𝑅 (surface feet per minute)
𝐷𝐷𝐷𝐷
𝐹𝐹𝐹𝐹 = 𝐼𝐼𝐼 = 𝐼𝐼𝐼 𝑥 𝑅𝑅𝑅 (inches per minute)
𝐼𝐼𝐼 = 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠, 𝑜𝑜 𝑖𝑖 𝑐𝑐𝑐𝑐 𝑙𝑙𝑙𝑙 𝑝𝑝𝑝 𝑓𝑓𝑓𝑓𝑓 𝑥 𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜 𝑓𝑓𝑓𝑓𝑓𝑓
𝑅𝑅𝑅
For tap, 𝐹(𝑖𝑖𝑖𝑖 𝑝𝑝𝑝 𝑚𝑚𝑚) =
𝑇𝑇𝑇
For twist drill, 𝑖𝑖𝑖𝑖 𝑝𝑝𝑝 𝑚𝑚𝑚 = 𝑖𝑖𝑖𝑖𝑖𝑖 𝑝𝑝𝑝 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑥 𝑅𝑅𝑅
𝐹
𝐹
𝐹𝐹𝐹𝐹
F mills, 𝑖𝑖𝑖𝑖𝑖𝑖 𝑝𝑝𝑝 𝑚𝑚𝑚 = 𝑥 𝑛 𝑥 𝑅𝑅𝑅
𝑡𝑡𝑡𝑡𝑡
𝐹
G00 G17 G40 G49 G80 G90 G98;
G00 Put machine in rapid motion.
G17 Selects X-Y plane for circular interpolation.
G40 Cancels cutter compensation.
G49 Cancels tool length compensation.
G80 Cancels any canned cycles.
G90 Absolute
G98 To initial start point in any canned operation.
Start up:
G00 G17 G40 G49 G80 G90 G98; (Safety line)
G91 G28 Z0 (Return to machine zero )
T1 M06; (Tool change)
G00 G90 G54 X0 Y0 S2500 M03; (Rapid, Absolute, offset #1,
spindle speed, spindle on)
G43 H01 Z1.0 M08; (Tool length comp on, tool #1,
go to Z1.0, coolant on)
Cutting Tool Path Lines:
Program Ending Lines:
GOO Z1. M09
GOO G91 G28 Z0 M5 (Retract tool tip 1.0 above part)
G28 G91 YO (G28 zero all axis, stop spindle)
M30
(Incremental to G28)
(End of program)
G00 Rapid traverse
G17 X, Y Circular plane selection
G40 Cutter Compensation cancel
G49 Tool length compensation cancel
G54 Work coordinate zero #1 (1 of 109 available)
G64 Exact stop cancel
G80 Canned cycle cancel
G90 Absolute programming
G98 Initial point return
Also, spindle speed set at zero.
• With the tool rotating clockwise climb milling goes WITH the
rotation. Think of the flutes, or teeth of the cutter as pulling
the material, or CLIMBING through the material.
• When climb milling the flute hits the material at the top of the
cut, and the thickness of the chip decreases as the flute cuts.
• This results in the chips being deposited BEHIND the cut,
which is important. The chips clear the cutter, which means
you are not re-cutting chips. Since you are not re-cutting
chips, the result is a better surface finish and longer tool life.
• Less power is required from the spindle to climb mill, and the
result of the cut is down-force on the material, which can
simplify work holding considerations.
• Also when finishing the floor of a feature or face milling thin
material the down force can assist in stabilizing the part.
• Problematic with old manual lathes because of backlash in
gears.
• Preferred method for CNC. For outside milling move around
the work clockwise. When pocket milling move around the
work counterclockwise.
Method 2:
%
T01 M06 ;
...
G00 X4. Y2. ;
G01 F20.0 Z-0.1 ;
G03 F20.0 X0. Y2. R2. ; (End point and radius)
...M30 ;
%
3. G42 Cutter Compensation Right – Conventional Cutting, Standard Right Hand Tool
1. Tool is moving to the right of the programmed path to compensate for the
size of the tool.
2. A Dnn must also be programmed to select the correct tool size from the Tool
Offset Register (D01= Diameter Offset #1, D2 = #2, etc .. )