Sei sulla pagina 1di 72

Module : III

COMPUTER AIDED
DESIGN
AND
MANUFACTURING
PART PROGRAMMMER’S JOB
IN PROGRAMMING

 Defining work part geometry.

 Specifying the operation sequence and

tool path.
COMPUTER’S JOB IN
PROGRAMMING
 Input translation

 Arithmetic calculations

 Cutter offset computation

 postprocessor
CO-ORDINATE SYSTEM IN NC
CNC Machine Axes of Motion

CNC lathe
Horizontal milling
machine with multi axis
rotary table
CNC Machine Tool Positioning Modes

Within a given machine axes coordinate system, CNC can be


programmed to locate tool positions in the following modes;
incremental, absolute, or mixed.
7
MANUAL PART PROGRAMMING
MANUAL PART PROGRAMMING
PART DRAWING
PROGRAM MANUSCRIPT
Basic Concept of Part Programming
Part programming contains geometric data about the part and
motion information to move the cutting tool with respect to
the work piece.
Basically, the machine receives instructions as a sequence of
blocks containing commands to set machine parameters,
speed, feed and other relevant information.
A block is equivalent to a line of codes in a part program.
N135 G01 X1.0 Y1.0 Z0.125 S 1500 M 03 F5.0 T01

Coordinates Feed
G-code rate
Spindle
Block number Miscellaneous Tool
Speed
function number
Basic Concept of Part Programming
Preparatory command (G code)
The G codes prepare the MCU for a given operation, typically
involving a cutter motion.
G00 rapid motion, point-to-point positioning
G01 linear interpolation (generating a sloped or straight cut)
G02 circular interpolation
G06 parabolic interpolation (produces a segment of a parabola)
G17 XY plane selection
G28 automatic return to reference point
G32 thread cutting
Basic Concept of Part Programming
Miscellaneous commands ( M code)
M00 program stop
M03 start spindle rotation (clock wise)
M06 tool change
M07 turn coolant on
Feed commands (F code)
Used to specify the cutter feed rates in inch per minute.
Speed commands (S code)
Used to specify the spindle speed in rpm.
Tool commands (T code)
Specifies which tool to be used, machines with automatic
tool changer.
CNC Programming Example

What Must Be Done To Drill A Hole On A


CNC Vertical Milling Machine ?
Tool Home

Top
View

1.) X & Y Rapid To Hole Position

Front
View
2.) Z Axis Rapid Move
Just Above Hole
3.) Turn On Coolant
4.) Turn On Spindle

Top
View

.100”

Front
View
5.) Z Axis Feed Move to
Drill Hole

Top
View

Front
View
6.) Rapid Z Axis Move
Out Of Hole

Top View

Front View
Top View

7.) Turn Off Spindle


8.) Turn Off Coolant
9.) X&Y Axis Rapid Move Home

Front View
Here’s The CNC Program!
Tool At Home

O0001
N005 G54 G90 S600 M03
N010 G00 X1.0 Y1.0
N015 G43 H01 Z.1 M08
N020 G01 Z-.75 F3.5
N025 G00 Z.1 M09
N030 G91 G28 X0 Y0 Z0
N035 M30
Tool At Home

O0001

O0001
Number Assigned to this program
Tool At Home

O0001
N005 G54 G90 S600 M03

N005 Sequence Number


G54 Fixture Offset
G90 Absolute Programming Mode
S600 Spindle Speed set to 600 RPM

M03 Spindle on in Clockwise Direction


Top View

O0001
N005 G54 G90 S600 M03
N010 G00 X1.0 Y1.0

G00 Rapid Motion


X1.0 X Coordinate 1.0 in. from Zero
Y1.0 Y Coordinate 1.0 in. from Zero

Front View
Top View
O0001
N005 G54 G90 S600 M03
N010 G00 X1.0 Y1.0
N015 G43 H01 Z.1 M08

G43 Tool Length Compensation


H01 Specifies Tool length compensation
Z.1 Z Coordinate .1 in. from Zero
M08 Flood Coolant On

Front View
Top View

O0001
N005 G54 G90 S600 M03
N010 G00 X1.0 Y1.0
N015 G43 H01 Z.1 M08
N020 G01 Z-.75 F3.5

G01 Straight Line Cutting Motion


Z-.75 Z Coordinate -.75 in. from Zero
F3.5 Feed Rate set to 3.5 in./min.

Front View
Top View

O0001
N005 G54 G90 S600 M03
N010 G00 X1.0 Y1.0
N015 G43 H01 Z.1 M08
N020 G01 Z-.75 F3.5
N025 G00 Z.1 M09

G00 Rapid Motion


Z.1 Z Coordinate .1 in. from Zero
M09 Coolant Off

Front View
Top View

O0001
N005 G54 G90 S600 M03
N010 G00 X1.0 Y1.0
N015 G43 H01 Z.1 M08
N020 G01 Z-.75 F3.5
N025 G00 Z.1 M09
N030 G91 G28 X0 Y0 Z0

G91 Incremental Programming Mode


G28 Zero Return Command X0, Y0, Z0
X,Y,& Z Coordinates at Zero
Front View
Top View

O0001
N005 G54 G90 S600 M03
N010 G00 X1.0 Y1.0
N015 G43 H01 Z.1 M08
N020 G01 Z-.75 F3.5
N025 G00 Z.1 M09
N030 G91 G28 X0 Y0 Z0
N035 M30

M30 End of Program

Front View
N001 G92 X0 Y0 Z50
N002 G71 G90 G94
N003 M03 S1000 F100
N004 G00 X25 Y25 Z50
N005 G01 Z-23 M08
N006 G00 Z50
N007 G00 X50 Y60
N008 G01 Z-23
N009 G00 Z50
N010 G00 X95 Y90
N011 G01 Z-23
N012 G00 Z50
N013 G00 X80 Y15
N014 G01 Z-23
N015 G00 Z50 M05
N016 G00 X0 Y0 Z50
N017 M09 M02
N001 G92 X0 Y0 Z25
N002 G71 G90 G94
N003 M03 S1000 F100
N004 G42 D05
N005 G01 Z-05 M08
N006 G01 X0 Y60
N007 G01 X10 Y70
N008 G01 X60
N009 G01 Y10
N010 G02 X50 Y0 I 10 J 0
N011 G01 X0 Y0
N012 G00 X0 Y0 Z25
N013 G00 G40 X-20 M05
N014 M09 M02
N001 G92 X0 Y0 Z05
N002 G71 G90 G94
N003 M03 S1000 F100
N004 G00 X30 Y30
N005 G01 Z-05 M08
N006 G01 Y80
N007 G01 X70
N008 G02 X70 Y30 I0 J -20
N009 G01 X30
N010 G00 Z5
N011 G00 X0 Y0
N012 M05 M09 M02
Write a CNC program to do facing operation
N001 G92 X0 Z0
N002 G71 G90 G98
N003 M03 F150 S1000
N004 G00 X10 Z-50 M08
N005 G91
N006 G01 X-10
N007 M09 M05
N008 M02
N001 G92 X0 Z0
N002 G71 G91 G98
N003 M03 S1000 F100 M08
N004 G01 X-05
N005 G01 Z-30
N006 G01 X05 Z-30
N007 G01 Z-30
N008 G00 X0 Z0
N009 M09 M05
N010 M02
N001 G92 X0 Z0
N002 G71 G90 G98
N003 M03 S1000 F100
N004 G00 Z02
N005 G00 X-05
N006 G01 G91 X-0.5 M08
N007 G33 Z-52 K3 S100 F 50
N008 G00 X01 F300
N009 G00 Z52
N010 G00 X02
N011 M09 M05 M02
LABELLING & SUBPROGRAMS
Labelling or naming is a provisions for easy
searching and retrieving from stored
programs.
Syntax: - : numbers
Eg:- :238
Subprograms are maintained and called as and
when required. It can be used for doing
repetitive jobs. A subprogram ends with M99
and can be subsequently called using M98.
Syntax:- N007 M98 P 238
: 2010
N001 G92 X0 Z0
N002 G71 G90 G98
N003 M03 S1000 F100 M08
N004 G02 X10 Z-10 I0 K-10
N005 G01 Z-35
N006 G03 X20 Z-40 I10 K0
N007 G00 X10 Z30
N008 M09 M05 M02
Computer-Assisted Part Programming
Automatically Programmed Tools (APT) language is the
most comprehensive and widely used program. The
language is based on common words and easy to use
mathematical notations.
 Identify the part geometry, cutter motions, speeds, feeds,
and cutter parameter.
 Code the above information using APT.
 Compile to produce the list of cutter movements and
machine control information (Cutter Location data file,
CL).
 Use post-processor to generate machine control data for a
particular machine.This is the same as NC blocks.
There are four basic types of statements in
the APT language:

 Geometry statements
 Motion commands
 Postprocessor statements
 Auxiliary statements or Compilation
Control Statements
 Geometry statements are used to define the
geometry elements that comprise the part.
 Motion commands are used to specify the
tool path.
 Postprocessor statements control the
machine tool operation, for example, to specify
speeds and feeds, set tolerance values for
circular interpolation, and actuate other
capabilities of the machine tool.
 Auxiliary statements are a group of
miscellaneous statements used to name the
part program, insert comments in the program,
and accomplish similar functions.
Geometric Statements
The geometry of the part must be defined to
identify the surfaces and features that are to
be machined. The general form of an APT
geometry statement is
Symbol= Geometry type / descriptive data

Eg:
 Points
P1 = POINT/20.0,40.0,60.0
 Lines
L1= LINE/P1,P2
If points P1, P2 are defined prior
L1 = LINE/P2,PARLEL,L3
L2 = LINE/P2,PERPTO,L3
L2 = LINE/P2,PERPTO,XAXIS
 Planes
PL1 = PLANE/P1,P2,P3
 Circle
C1 = CIRCLE/CENTER,P1,RADIUS,32
C1 = CIRCLE/CENTER,P1,TANTO,L1
Motion Commands
The general form of an APT motion statement is
Motion command / descriptive data

Eg: GOTO/10,10,10
It instructs the tool to go to a particular location
specified in the descriptive data.
FROM/P0
It indicates the initial point from which others will be
referenced.
GODLTA/10,10,-10
It specifies an incremental move for the tool. It is
used in drilling operations.
Some commands for contouring are

GOFWD GOUP GORGT


GOBACK GODOWN GOLFT

Eg: GORGT/L1,TANTO,C1
GOFWD/ C1,PAST,L2
There are three modifier words TO, ON and
PAST.
 The command TO moves the tool into the
initial contact with check surface.
 ON positions the tool until the tool centre is
on the check surface.
 PAST moves the tool just beyond the check
surface.
Postprocessor statements
Postprocessor statements include the control
statements for the operation of the spindle,
the feed and other features of machine tool.
Some of the common commands are
COOLNT/ON COOLNT/OFF
FEDRAT/120 SPINDL/1000
MACHIN/MILL END
RAPID
Auxiliary statements
Auxiliary statements include the statements
used for defining cutter size, part identification
and so on.
Some of the common commands are
CUTTER/20 PARTNO
FINI REMARK
INTOL/0.2 OUTTOL/0.2
PARTNO EXERCISE 01
REMARK DRILLING OPERATION
MACHIN/DRILL
P0 = POINT/-10,-30,20
P1 = POINT/10,10,0
P2 = POINT/10,20,0
P3 = POINT/35,15,0
CUTTER/10
SPINDL/2000 CLW
COOLNT/ON
FEDRAT/50 MMPM
FROM/P0
GOTO/P1
GODLTA/0,0,-10
GODLTA/0,0,+10
GOTO/P2
GODLTA/0,0,-10
GODLTA/0,0,+10
GOTO/P3
GODLTA/0,0,-10
GODLTA/0,0,+10
RAPID
GOTO/P0
COOLNT/OFF
FINI
PARTNO EXERCISE 02
REMARK MILLING OPERATION
MACHIN/MILL
CUTTER/20
P0 = POINT/-20,-20,20
P1 = POINT/0,0,0
P2 = POINT/0,60,0
P3 = POINT/10,70,0
P4 = POINT/60,70,0
P5 = POINT/50,10,0
C1 = CIRCLE/CENTRE,P5,RADIUS,10
L1 = LINE/P1,LEFT,TANTO,C1
L5 = LINE/P4, PERPTO,XAXIS
L2 = LINE/P1,P2
L3 = LINE/P2,P3
L4 = LINE/P3,P4
PL1 = PLANE/P1,P4,P5
SPINDL/1000 CLW
COOLNT/ON
FEDRAT/15 MMPM
FROM/P0
GO/TO,L1,TO,PL1,TO,L2
GORGT/L1,TANTO,C1
GOFWD/C1,PAST,L5
GOFWD/L5,PAST,L4
GOLFT/L4,PAST,L3
GOLFT/L3,PAST,L2
GOLFT/L2,PAST,L1
RAPID
GOTO/P0
COOLNT/OFF
FINI
PARTNO EXERCISE 03
REMARK MILLING OPERATION
MACHIN/MILL
CUTTER/20
P0 = POINT/-20,-20,20
P1 = POINT/0,0,0
P2 = POINT/25,50,0
P3 = POINT/120,20,0
C1 = CIRCLE/CENTRE,P3,RADIUS,20
L1 = LINE/P1,LEFT,TANTO,C1
L2 = LINE/P2, LEFT,TANTO,C1
L3 = LINE/P1,P2
PL1 = PLANE/P1,P2,P3
SPINDL/100 CLW
COOLNT/ON
FEDRAT/5 MMPM
FROM/P0
GO/TO,L1,TO,PL1,TO,L3
GORGT/L1,TANTO,C1
GOFWD/C1,PAST,L2
GOLFT/L2,PAST,L3
GOLFT/L3,PAST,L1
RAPID
GOTO/P0
COOLNT/OFF
FINI

Potrebbero piacerti anche