Cam Practical Theory

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Chap ter-2

NC PART PROGRAMMING

2.1 Manual part programming ·


called
In this method, the programmer writes the machining instructions on a special form
d in machine
a part program manuscript. The tool path of the CNC machine tool is then describe
codes with a standard format.


The program is directly input into the memory of the machine by a tape reader
or
is widely used
transferred from a computer system 'into th_e mac~ine control unit. This' method
for work pieces having simple geometry.

2.1 Data required for manual part progra m


The following are the data required for manual part programming.
1) Specification of coordinate system
2)' Specification of axes

fl
3) Sp_ecification of machines

4) Specification' of reference points in machines and work pieces


· 5) Specificatlon of tools · '

6) Method of holding work pieces


feed, de th
7) Data tables and books containing cutting process parameters such as speed,
p
of cut, etc. .
'

8) Sequence of operation

2.3 NC coordinates system


I

+Y +Z

+Y

z
+X

Fig.2.1 Right hand coordinate system


Y-axis . . is identified by the right hand
, It is perpendicular to both X and Y-axes, and th e direction
Cartesian coordinate system.

Rotary motions . re located about the axis parallel


. . otion These motions a
A, B and.C define primary rotary m · . d.. tions which advance right hand
·t· A B and C are in the irec
to X, Y and Z respectively. Pos1 ive , . M hine tools with rotary motion
screw in the positive X, Y and Z directions respectively_ . ac
capability generally have either four or five axes.

2.4 Zero points and reference points

Zero point . trolled by ~oordinate systems.


. The origin. of the
In CNC machines tool movements are con
'
coordinate system is cons1dered . In some
as zero point. · Of the CNC machines,
. the .zero point may

be located at a fixed place an d canno t be Changed · This is known as fixed zero . po;nt.
. Some. other
·
machines, · point
a zero · may be est abli·shed by moving . the slides so that the .cutting tool. is placed.
•in the desired
• pos1t1on
• • . is known as floating zero pomt.
• re 1at·10n to the work pieces · This
in ,

Machine zero point or machine datum (M)

~ig.2.3 Machine zero point ..

It is a fixed point on a machine specified by the manufacturer . This pbint is the zer~ point
for the coordin·ate system of the machine controller. In turning centre, the machine zero point is
generally at the centre of the spindle nose face . In machining centres, it is either fixed at centre
o(the table or a point along the edge of the traverse range.

Work piece zero point (W)

This point determines the work piece coordfnate system in relation to the machine zero
poi~t. This point is chosen by the part programmer and input to the machine ~ontroller. The
position of this point may be chosen in such a way that the dimensions of th~ work piece drawing
can be easily converted into coordinate values. r0r turned components, it is placed along the
spindle axis, in line with the right or left end face of the work piece. It is also known as program
zero point.
-t X
Workpi ece Zer
0 Poin t
Workp iece ze ro poi nt

-- M w
--- +2
-2 -- M
-
VI

Fig.2.4 W
ork piece
roof zero point {T) zero point
When machining a work piece
. th ·t
work piece along t he machining Path ' Th·e ool must be controlled in d
p0int, which is known as too/ z · . is requires a point . pre ise relationship with t he
era pomt. in the tool turret be taken as reference

As the t ools in the tool tu •


✓ rret have diff
tile tool zero point and work piec:e zero pointerent
· shapes and size s, th.e offset distance
. betwee
Is known as tool offset setting · . . is measured and entered .in to the computer. This n

f,fachine reference point (R)


Machine
. reference point is a1so known as hom
5.
controlling t he measuring. system of th . e po ,tlon . It is used for calibrating and
e slides and t 00 1
manufacturers . , movements. It is determined by the

Z MR

Fig.2.5 Machine reference point {XMR, ZMR)

The value of machine reference coordinates (XMR, ZMR) is fixed and cannot be changed by
the user. The positing of t he reference point is accurately predetermined in every transverse axis
by the trip dogs and limit switches.
2.5 NC coor dina te dimensioning
· . . . h h. d ·
The following are the two methods of d1mens1oning t e compo nents to be mac me in NC
machine tool.
,
1) Absolute "dime nsion ing: "I n absolute d1men
· · ·
s1on1ng, th e coordinates of a point in a
work piece are always defined with respect to the origin.
·· . .
2) Incre ment al dimensioning: In incremental dimensionin
g, the coordinated of a point
in a work piece are always defined relative to the previous
point.
2.6 CNC prog ram procedure
The following are the steps involved in the development of
a part program and its proving.
1) Process plann ing: The programmer carryqut a
careful study of part drawing to
prepare the process plan. It includes the following:
• Machine tools used
• Fixtures required
• Sequence of operations
• Cutting tools required
• Process parameters

2) Axes selec tion: The reference axes should be chose


n so that t he .coordinates for
various features can be determined easily.

3) Tool selec tion: Various tools are feasible for a given


operation, but some of them
would be more -economical than others. So it is essential
to chose 'the right tool for the job.
4 ) Cuttin g process param eters plann ing: For a given
tool and the operation, the
appropriate process parameters such as speed, feed and
depth of cut are to be selected. These
may be taken from the handbooks supplied by the cuttin
g tool manufacturer or based on the
shop experien·ce.

5) Job and tool setup plann ing : The initial position of


job and tool are defined carefully.
, .
6) Tool path planning: A careful planning of the tool
path ensures that the required
manufacturing specifications are achieved at the lowest cost.

·7) Part progr am writin g: This involves the actual


writing of the part programs
undertaking the format and syntax restrictions into accou
nt.
Identif y
machine tool

Identif y operations
& too ling r- -- -- -.

ine feeds
, - - - - - i Determ ths' r -- -- -.
speeds & dep

Prepare
process sheet

Develop
par t program

Simulate
tool path

Dry run

Cut the firs t par t

Pro~en par t
Inspect the part

cedure
Fig.2.6 CNC program pro
ld be ve rifi ed be for e
: On ce the pa rt pro gram is created, it shou
ing
BJ Pa rt pr og ra m pr ov ent. A tria l run can
ntr oll er for the ma nu facture of the compon
chine co ve me nts tak ing
it can be loaded on the ma to enable visualization of mo
l or wo rk pie ce
ut the too
be carried out with or wi tho the · wo rk piece and the clamp
ing .device.
ee n the too l,
possible betw
place, and any collision

at of a pa rt program
2.7 Structure or fo rm mp on en t consists of a beginnin
g code of %. A
for a
gram given co
The complete pa rt pro rep r~s enting an operation to
be carried
of blo cks ea ch
large- nu mb er
part program consists of ck are us ually given in the follow
in~ ord er.
e words in ea ch blo
·/ out in the machining of the part. Th ·
- . wo rd)
• Sequence nu mb er (N
- word)
• Preparatory word (G
, z- words for lin ea r axes;
• Coordinates (X -, Y-
rot ati on al ax_es)
A- , 8- , c- words for

• Feed rate (F - wo rd)


V'

• Spindle speed (5 - word)


• Tool selection (T - word)
• Miscellaneous command (M. - word)
• End-of-block (EOB symbol)

The. structure of part program used in Fanuc controller is given below.

%; (Program start)

03642 (Program number)

N010 O I I . I

(l
IO IO O t O t I 0 ..
Blocks IO I I o O. 0 0 0

N100 M02; (Program end)


--
Program number ,
Each of the program that is stored in the controller memory requires an identification. It
is used while running and editing of the programs directly from the control console. This
identification is specified in terms of a program number with O word address. The number can
be a maximum of four digits.

Sequence number (N-word)


Each block in a part program always starts with a block number, which· is used as
identification of the block. It is programmed with a N word address.

Coordinate function
• The coordinate values are ~pecified using the word address such as X, Y, Z, U, V, W, I,
,J, K, etc. All these word addresses are normally Signed along with decimal point ·depending
upon the resolution available in .the macl:iine tool.

Comments
Parentheses are used t~ add comments in the program to clarify the individual functions
that are used in the program: When the controller encounters the opening' parenthesis, it
ignores all the information till it reaches the closing parenthesis. :
few other G-codes are non-modal, which means that they remain
operational in the block .
which they are programmed. II)

For example, G20 (Inch input) is a modal command, which can b~ cancell
ed by G21 (Metric
input) command.

Table 2.2 Common G-codes

G-code Function
Turning Center Machining Center
I
GOO Rapid positioning

GOl Linear interpolation


GO2 Circular interpolation (Clockwise)
GO3 Circular interpolation (Anticlockwise)
'
GO4 Dwell
'
GlO Setting offset amount
'
G17 Selection of XY .plane
G18 Selection of ZX plane
G19 Selection of YZ plane
G2O Inch input system
G21 . Metric input system
..,
G27 Zero return check
G28 Return to zero
G33 Thread cutting, block by block
G4O Tool nose radius compensation cancel
Cutter radius compensation cancel
G41 Tool nose radius compensation Lett
Cutter radius compensation Left
G42 Tool nose radius compensation Right
Cutter radius compensation Right
GSO Maximum spindle speed setting
G65 Call of user macro
G7O Finishing turning cycle
r
~

G- co de -
-
Tu rn in g Ce nt er
Function
Ma ch in in g Ce nt er

G71 M~ tip le tur nin g cycle

G72 Mu ltip le facing cycle


-
G73 Pa tte rn rep ea tin g cycle Peck drilling cycle

G74 Peck dri llin g cycle

G75 Gr oo vin g cycle '


arance cycle
G76 Mu ltip le thr ea d cu ttin g
cycle Rectang,ular pocket cle
e cycle
G77 Circular pocket clearanc

GBO Canned cycle cancel


g
G81 Drilling cycle, sp ot bo rin
bo rin g
G82 ' Drilling cycle, .counter
'
G84 Tapping cycle

) GBS '
Boring cycle

Boring cycle
G86 .
Back boring cycle
G87
ion ing
Absolute mo de of po sit
G90 Box tur nin g cycle
sitioning
,Incn;mental mode of po
. G91
int
Preset pro gra m ze ro po
G92 Th rea d cu ttin g cycle
Feed per mi nu te
G94 Box facing cycle
Feed pe r rev olu tio n
G95
d (m /m in)
G96 Co ns tan t surface spee

G97 Co ns tan t RPM

G98 Feed pe r mi nu te

G99 Feed pe r rev olu tio n


de s)
nc tio ns or Au xi lia ry functions (M - co th e
2.9 Miscellaneou s fu to ol and th us aff ec t
controls on th e machine
lly operate some
These functions ac tua ing called.
ch ine too l mu st ha ve th e fun cti on th at is be
The pa rtic ula r ma codes an d
running of the machine. at the en d of the block. The co mm on M-
are no rm all y place d
Miscellaneous co mm an ds
in tab le 2.3.
their function s are -gi ve n
Table 2.3 Common M codes

M-code functior:a

MOO Program stop


MO! 0 ptional stop
M02 End of program
M03 Spindle ON, clockwise . '

M04 Splndle ON, counter clockwise


~MOS Spindle stop
M06 Tool change
M07 Coolant supply No. l ON
MOB Coolant supply No, 2 ON
-
M09 Coolant OFF
MlO Automatic clamping '
'
Mll Automatic unclamping
M13 Spindle ON, clockwise + coolant ON
M14
Spindle ON, counter-clockwise + coolant ON
M30 Program END and rewind
M70 X axis mirror ON .
M71 Y axis mirror ON
MBO X axis mirror OFF

- M81
M98
'f axis mirror OFF

Subprogram call
M99 Subprogram end
-
[Note: G - codes, M - codes and programming methods Used in this book
are basec1 on FANUC CNc controller system]

You might also like