Вы находитесь на странице: 1из 28

Computer Aided Manufacturing

ME158 Spring 2006

Update simple program slide

What are we doing in this class?

Basic understanding of manual programming of CNC


tools
CAM using MasterCAM software
Introduction to the design and structure of automated
tools work and how to operate them
Two labs in the shop where you will learn to operate our
CNC milling machine
When youre finished with the class you will be able to
program and begin machining your own parts.

What kinds of tools?

How do the tools work?

Encoder

Motor

Ball Screw

How do the tools work?

Machine tool bed


E Motor
Ball screw
Amplifier
Controller

Screw pitch * encoder resolution = axis resolution


5mm pitch * 1/10000 counts per rev. = 0.5 micron/count

Typical Parts

Videos

http://www.haascnc.com/news_videos.asp
http://www.engr.colostate.edu/~dga/high_speed_video/#Tools_Machinery_A
ppliances

Machine coordinate systems

Right hand coordinate system


Z axis aligned with primary spindle
Z+ moves tool away from workpiece

Part coordinate systems

Programmer chooses
origin for part program
Machinist sets the origin
on the tool
Careful choice of origin
before programming is
important
Choose an origin that you
can find easily, and one
that wont change from
part to part
Think about the fixtures
that hold the workpiece

Simple Programs

Simple Programs Tree Mill

(MILLINGE)
N2(9)M03T01$
N3(0)X2.5Y-2.Z0.25$
N4(0)Z0.1$
N5(1)Z-0.25F5.0$
N6(1)X0.5F10.0$
N7(2)X0.Y-1.5I.5J-1.5D0$
N8(1)Y-0.5$
N9(2)X0.5Y0.I.5J-.5D0$
N10(1)X2.5$
N11(2)X3.Y-0.5I2.5J-.5D0$
N12(1)Y-1.5$
N13(2)X2.5Y-2.I2.5J-1.5D0$
N14(1)Z-0.15F5.0$
N15(0)Z0.25$
N16(9)M30$
END

Program Structure

No spaces
All caps
Zeros not Os
$ at the end of every block
No spaces between words
Event types in parentheses
Program name 8 characters
End statement
Block numbers can have decimal points

Event 9 miscellaneous commands


Event 0 rapid move
Event 1 linear mill
Event 2 arc
Other event types for subroutines,
pockets, frames, scaling, rotating and
other features.

(MILLINGE)
N0.1(T)SAMPLE PROGRAM
N1(9)M08$
N2(9)M03T01$
N3(0)X2.5Y-2.Z0.25$
N4(0)Z0.1$
N5(1)Z-0.25F5.0$
N6(1)X0.5F10.0$
N7(2)X0.Y-1.5I.5J-1.5D0$
N8(1)Y-0.5$
N9(2)X0.5Y0.I.5J-.5D0$
N10(1)X2.5$
N11(2)X3.Y-0.5I2.5J-.5D0$
N12(1)Y-1.5$
N13(2)X2.5Y-2.I2.5J-1.5D0$
N14(1)Z-0.15F5.0$
N15(0)Z0.25$
N16(9)M30$
END

Simple Programs G and M Code


%
N1 O0000 ( MILLING EXAMPLE 1 )
N2 ( CREATED ON 01-05-05 AT 6:55 AM )
N3G20
N4G0G17G40G80G90
N5G28Z0.
N6G28X0.Y0.
N7G92X0.Y0.Z0.
N8 ( 1/2 FLAT ENDMILL TOOL - 1 DIA. OFF. - 1 LEN. - 1 DIA - .5 )
N9T1M6
N10G0G90S3056M3X2.5Y-2.
N11H1Z.25M8
N12Z.1
N13G1Z-.25F5.
N14X.5F10.
N15G2X0.Y-1.5I0.J.5
N16G1Y-.5
N17G2X.5Y0.I.5J0.
N18G1X2.5
N19G2X3.Y-.5I0.J-.5
N20G1Y-1.5
N21G2X2.5Y-2.I-.5J0.
N22G1Z-.15F5.
N23G0Z.25
N24M5M9
N25G28Z0.
N26G28X0.Y0.
N27M30
%
%

Manual programming

Operator programs every tool move at the controller


reasonable for simple parts.
Operator programs every tool move at PC using text editor.
Program is downloaded onto tool

MasterCAM and other software

Geometry is created in CAM program, or created in CAD


program and imported into CAM program.
Tool paths and cutting parameters are selected and
software generates program for a particular machine tool.
Geometry converter (IGES)

SolidWorks
Geometry

MasterCAM
Mfg. Model

Post Processor

Code file

Programming exercise

3
Ignore setup events
Use feed rate of 10 ipm
Cut at Z=-.1

1
EM

Cutter Compensation

Event Type 0

Event 0 Continued

Event 0 Continued

Absolute and Incremental Programming

Absolute and Incremental Programming

These commands are


Modal meaning that
they stay in effect until
changed
Positions can be
entered as absolute
values (with reference
to the part origin)
Or incremental values
(with reference to the
current location)

Peck Drill

Linear Mill Event 1

Programming Arcs

Arcs Again

More Arcs

Videos

http://www.haascnc.com/news_videos.asp
http://www.engr.colostate.edu/~dga/high_speed_video/#Tools_Machinery_A
ppliances

http://engineering.llnl.gov/lodtm/about_pg2.html
http://video.google.com/videoplay?docid=7790843153265630790&q=milling