You are on page 1of 23

a[" 1l\C \IACt{INERY SfJN.Atllf.

:]

CT{CLATHtr tsASICPR*Glt AirS{fiq{;GUiBE "700L oKuNiA{,}sP-7i}ilci,10sP

':!

:;!:a':__'

-r l. ' "

?a,QgzJ I

A,\7 C6O at'p 6?f -/

Training M2nual - Larhe

NUMAC MACHINERY SDN. B}ID.

ChapterI Introduction
Concept 1.1NC Programming
is to the The pupos of NC programmitrg i\Titing a Program cornmand CNC machineto maclune arc a work pieceaccordingto the g en drawing. The procedures illustmtedin Figure 1-1.

Tooling & Selectron ToolPath Design

Figure 1-1

( 1.2 Machineand Program CoordinateSystem StandardCNC Lathe)


The coordinate systemof CNC lathe is shownin Figure l-2.

X +ie

/o / |

l-)l L_

Figure 1-2 * Nore:X-r\is coardimte in slalcd dianetervalue. Progam zero mustbe selecled beforestart programmiog

i
I
Decembor i998

TEinitrg lltatrual - l,athe

NT]MAC MACHINERY SDN. BT{D

Poitrt B

x
40 40 70 70 80

z
0 -50
-50
-l l 0

c
D E

-r l0

fierEise:

Point

c
D

Erdcise:

Point B

c
D E
F

D*mber 1998

NTJMACMACHTNERYSDN BHD

Chapter2 BasicProgramming
2.1 Program Configuration
Gene.allya programcoffists ol l) fbgram Nalne. label. Nameard Sequac 2) Squence andcommatrds 3) Coordinates 4) Remarks. 5) End ofProgram block. usingALPHABATIC CHARACTERS and NUMf,RIC CHAR{CTER-S This tufornation is presenled E ch line ofcbamctersis calleda BLOCL (Canbe omitled d otrlti one programin the file) X_ Z_ S_ T, M_ G_

N____ :

r,42
format E\anple 2. t: Programming

oool2 Nl00 G50s2000 Nl0l 600x5002450 CI.II OD) NATOI(ROUGH Nl02 T0l0l0I Mol M08 Nl03 x80 250s430 N104 X70230 F0.5 N105 G0l X230.25s

N600G00x300 2450M05M09 M02

2-l.l ProgramName(Prograu Number)


I ! Programnamedesignation

o
can - Up to 4 characters be usdcrn - The .f chamclers b nqnenc. mustbe a hadof numericchardcter. - Alphabeticcharacter 2.2: Example Progrm Name

a)01234 b) oABl2 c) OIAA2 d)Ol23 *

r' r' O0l13

:' Prcgtrm \ame canbe omitled iI thereis onll one main prognn in thc file. Deember 1998

---alnrngl\,lr.[ual - Lath

NTJMACMACHINERY SDN, BFID

zl.2 Sequence Nameand Label


I i { sequeneoameis defircd as a namea$igned to a block. Numeric or alphabetic clnractersfollowing lor n der -N aredesignated a squerce une, N naltrtrrrlstbe placedat the beginning of a block. However it is notessentral include to - Sequenc quence trameitr a proglain. - iquencenammay be slecified in ally order.

2.3i Name Example Prognm r' a)N1234 r' b) NAT02 c) NIAT2 d) Nl23 + N0123

11.3 Coordinates and commands


: , \hchine canies out its tasksby following the cormands irritten in a prognm- ThesecollDunds ate F-enled bl groupsofcodes, so called G codesand M codes. Eaci clde conrnandsthe machineto do a specilic action. For example: a) G)O commands nrachine mo\,ethe cutterat a rapid sped a specificpoint in the the lo io b) M08 commands machineto start spmyingcoolantthroughthe nozdes. the :3nii 2 L G4ode
G-Code

CONTENTS
Positionine Straishtline cuttine Circr ar cuttins fclockwise) Circular cunina (counterclockwise ) Dwell Tool noseradiusconlDensation: Cancel Tool nosemdius compensation: left Tool nose ndius comDenlatiolr: neht Maximum SDindlesDeed desiqution lanqitudinal comDound fixed threadcuttine cvcle Lonsiludinal ercovin(rcomDound fixed cvcle Trans:\,ersc co'nDoundyedcacle fi aroovinc/drilline TaDDins comnound fixed c-\,cle. EndofshrDedesisndtion GAP) SI,3n lonsitudimlshaDe of desreMtron fLA?l St?noftnNvers sluDedesiFation(LAP) Callof rouchbarturninec\cle tLA? ) Callof firushlmirq cycle(LA?) Absolutc Drosranninc

G00 G0t G02 G0l G0l

G40
G.ll

c5t)
G7 l

ca7lG?8 G8o G81 GE: G3i


GS i

G90

__ge_i
_Gll G!i
G96

u _trgs!!1.ti1_pt.9eEln!n minulerlode {mnr,imin) _199!Lper feedDer revolution mode {mm/rc!l


Constairt speed cuningON CmcelofG96 (djreclspirdlespeed)

{r

G9:,:..rb-r ie98

:mlns

\,farual - l-a$e

:*iell:llCodes \'l Code


Codeots

v00

Progam Eop EEd of Dmgam Sdtrdle clochiis rotalon Srindle counFrclockwiserouuon C-elant on

v0r

MO: \I0l \4OJ

v05
M08 \I09

Coola.ot otr

I ]t orderto lel drc machire bo$ Nhele it shouldmo\'edrelool. ihe coordiEnpoiEs have to t by The coordinat\:Jue i5 repre$nted X, Z. A. C. I andK a\is Ha,rever. .{b X and Z .rxis is {rif.d *6E nncemed ir &rs clrss

is settitrgtheunit syslem in millimeters - h ieadt parameter t X90-l is effcnely90. mmor 90l00pm - r"sr br defauhthetmirqsem allows3 sigrificantdigit afterthedecifialpoiDt. x0.00I if - ar:-s.d pointis not 6strtra1 oteger\alueis assigDd.
X90 is efre.ti1e X90.orX9o.0 as

Exanple 2 .1:

x-10 tl ztol .1 x90.001 290


:i a!=: code(address)include F. S.T. P. Q.... &\e= F= Feedrate S: SpindleSpeed I- Iool number lool offselnumbcr atrd

Y.!al-

falh

NUMAC MACHINERY SDN B}ID.

Irl
-

Selection
T da onting tool is madeby 4{igit figutes following a character

Tool Offset Number E@ple 2-+ Tool Number

r 9292

rrdius mmpe$ation fimctiol is used,selectionof a cutting tool is madeby 6-digit T6l Dose

r82q2q2
\ \Tool Offset Number Tool Number

Tool noseradius compensation

Controlling The Spindle(S' M03' M04' M05)


Thesecodesare usedto cornmences. a!trT-rtd spindlemrln be rotaling bforethe cutting process of s?indleroution andits sped. rb diEcriofls Sransthe spindlein Clockwisedirection. (IMPORTAIYT: Seefigure for the Corvention )

dn\
Eli
directior. (IMPORTANT: Seefigure for $ Stins the spindlelll Countr-Clockwise

'/T\\
hignatcs ',hespindlespeed R.r'/ mio )

w'

NUMAC MACHINERY SDN. BIID

u0f xI8 2204 xl85 I Xl85 Zl20 m.5 xl90

xzm
5

zloo

xi002300

aEds

the machineto slattool trumberL +ddle speedro 2000 r.p.m determined pre\ ious S by rhe slindle to .ote itr clocbi.ise directioo at ro(atlons?ed G. 2000r.p.mt qrtudle.

onroff(M08,M09)

0l

SJff) VO3 Gm xt88 220.t xl85 5 Gol xl85 zl20 F05 xl90

zloo

)I200 gn xi002300
llj

ltot) \t2

NUMAC MACHINERY SDN. BTID

Enn
k;rli dio[

Stop and Program End (M00, M0f, M02)


stop- Th machiniry cycl stopswhtrthis codeis encountered during program Pressing CYCm START at $is point will rs,ume opemtion. the

qrirl nop. M0l performs sanefunction M00. ;xcepl.it is oni) effeclirer{hen tle as rL OPTIONAL STOP bulton on the controlpanelis swilchedon. PrssingCYCLE dle 5f.1RT ai this point will resume operatior fl .a pmgram, It mustbe ircluded to indicateendof a progmrn.This codealso resets ft.ootrol-

fd3 *ops here.

=.]=n"-*.\ hon is pressed,


Sep ifOPTIONAL STOP
Coflrnus here when

TO IOI s2000 M03 c00 xl88 2204 xl85 M00 M08 cnl xl85 zl20 F0.5 xl90

ztoo

tirtton is pressed.

x200 M01 G00x3002300 M5 M09 M2

b5

-eE

NLI}LAC\IACHINER\ Str\ t3D

ing (G00)
the Bachne to position lhe cutter to a mordinatepoinl at npid feedmte

-IdZ

pomt desiErare stopping the

icao x1E8 2204

mtol s20mM03

-Line Cutting (G0l)


the mr.$ine aomo(e the cuner ftom qitretrt positionlo the Positionspecifed bf x. gr-aightline ar feed mte specitrd f by a

Emple

2 9:

ml0l s2000M03 c00 xl88 2204 xl85 M08 GO1 X185 2120 m.5 x190

x200 G00x3002300
MJ M09 M2

zrw

NTJMACMACHINERY SDN BHD

(G04)& Maximum SpindleSpeed (G50)


Iffi for F_ second.

cn4F

rb Daxinun Aindl speed(S _ _ _ _ ) alowed in lhe program. G5OS

MrDal - lltie

-X a

Z spel8{the end@int of arc.

point ofarc. + atrdK speciryllre tpsition of the centerpoht relative to lbe sta-rt - L is usedt9,spe.ifiedthe radiusoflhe arg I andK shouldnot be s?ecilied ifl, is given -The nart polnt of arc is the positiotri$mediately before the G02 or G03 coEmandline.

x-t

c0l
60

l0 T0l0l

20

100

s2000 M03 G00 x60zl0l zI00 , M.08

. 220F0.5 . . G01 a GoJ X80ZI0 K-10 F0.5 c00 x1002300 M5 M09

\a

t2

NI-IMAC MACHINERY SDN. BHD

ml 0 l M03 s2000 x60 cro0 zt04 zlN


M08 GOr 220 F05 G02X80 Zto I10 F0*r x300zm croO MJ M09 . M2

Gio s3000 ml 0 l
slfi)0 M03

Gm x60zl04 zt00
TIO8 G{l x65 218.66 F0,5 G42 X80 210 I-5 K{.66 F0.5 G00 x3002300 Nf5 I!f09 TO

'y
l. ]

- -{dditional}. I ard K canbe replacedbf L {ndius) lEmber I99E

100

i,,ffi
Decemberlg)s

Training lranual- Lathe

NUMAC MACIII}.ERY SDN. BTID.

3.2 LAP 3 - Bar RoughTurning Cycle


G coderG80 G coder G8l G code:G82 C code:G87 End offinishing $ape desiglation for bar mugll for Stan ofloDgtrudral draF designarioo rougb bar tumine c,\de. for Stan of transltrse sbapedesignation rough bar Ca[ offinisL tunine clcle.

G code G80 designationfo. bar rough qtr c.vcle. Ddcripriotr: EDdof finishing shape

G80

G code: G8l desigMtioo for roughbr tumin8 clcle Dscription: Sranof lotrg:rudinalsbape

G8I

Seouence BIne of the de6ndsnape

E\ample: NLAPI G81 G80 l{999M02

1.."

G code:G82 Dscription: Startof transverse shape designationfor roughbar nirniDgclcle

G82

N E\lnrple

Sequetrce oameof the dfined shape

L/'

NLAPI G82 G80 \999 MOl

De.e ber 1998

l5

NUMAC MACHINERY SDN. B}ID.

G code: G85 Descriptiotr: CaI of roughbat tuming cycle

G85N
N____ D, F_ U_ Exanple:

DF UW

nameofthe definedshape. Sequence Rougtringcycle depthof cut (drameter) Roughingcyclefeedmte. for Stockresorve finishing in X-direction (diameter) for Stockresrve finishing in Z{irection.

G50 Noro 52000 G00 N020 x500.2500

/Feedrate of roucling cycle. N0j0 X6t z16I T0t0t 5500Mol M08 N040G96S | 20 (Ca[ roughbar turning cycle) N050 G85 NLAI1 D2 X'0.tU1'0 W0.5 -----'shape define) (Startlongitudinal rough tumingfinished G81 NI,AP N060G0 x-0.1 zl5?
N ^ rn ^^r

iio*o iio z N090 90 NI00x50 . Nll0 250 Nl20 x6I

-'"

7 r{ < F n o K -

".""

------------

cvcl Fef,drare offinishing

Nl30 G80 Nl40 G975500 Nl50 G00x500 2500 Nl60 M02

@nd of rough bar tuming shapedefme.)

i:ts
x=51

. ''..'

1998 December

l6

NIIMAC MACHINERY SDN, BHD.

G code:G87 Deicription: Call offinish tumitr8 cycle.

N_,__ (U_W ) G87


N____ nameof the definedshape. Sequence for Stockreserve frfther finishing in X-dire{tion (diameter)_ oDtonal, for Stockrserve further finishing in Z-direciion-oplion"l

U_

Example: Roughingcycte. X=60 X=50 X Finishing cut (G87).

N0l0 G50s2000 x5002500 N020 G00 M03M08 N030 x6r 216l ml0r s500 N040 G965120 T91------Reture

orroug*'*

(Callrough Rming c) cle.I bar N050C85 NLAPI D2 F0.t Ul.0 W0.5 define.) (Start longitudinalroughbar tuming sbape NLAP G81 N060G0 x4.l 2157 N070 G'l zl55 F0 06----___-------Feedrate offinishing cycte

N090 90 z

Nr00 xso

Nll0 250 Nl20 x6l Nl30 G80 Nl40 G975500 X5002500 Nl50 GOO Nr60 x4.l 216l m202 Nl70 G96Sl50 NISOG87 NLAPI Nl90 G95 S500 N200 G00x500 zs00 N999M02

shape defire ) Gnd ofroughbartumingfinished

(CrI firishing cycle.)

Decenb('r 1998

t1

TrainingManual-tathe

NIJMAC MACHINERY SDN. BIID.

3.3 ToolNoseRadiusComPensation
G coderGtO DescriDtiotr:Carcel oftool nosecornpensationGll and G{2 must b c{trceled by G40 beforeendng the pmgram. G code:G41 Description: Tool nosecompensatioqleft. Rquiredcuttingpath. Actual cutting palh o tool

compensafon. Without using nose tool

Progmnrmingpold set by tool offset.

G code G,l2 righl Description: Tool nosecompensatior\

Example:

CnoG42X32Zl22 N060 N070G01G96Sl00X30Zl20 N080 280 N090 xsO,z50 Nl00 248 Nll0 x52 Nl20 Gito Nl30 G00xs00,2500

(Toolnose rigbt.) compensation

Z= 50 Z= a0 Z= t20
X=50 Z= 3l (Canceltool nosecompnsation. )

1998 D e c eNh. ' r

1E

Training Mrnual - Lathe

NIJMAC MACHINERY SDN. BTID

(FixedCycles) Chapter4 BasicProgramming


4.1 LongitudinalThread Cutting Cycle(G7l)
G7l G code: Description: Longitudinal dread cutting cycle. G?I X-Z-A_(I)B,D_ U_ H- L_ F J M_Q-

x z
I B D U H L

F J M

Final diameterof thrad. Z coordinateof endpoint of tfuead. Taperangle. skning point and endpoinl for taper Difrence in mdiusbetween in thread(xpress radius). Nomrallyis equalto Infeedangle(B = 0-180;0ifno B provided. cutter tip point angle). Depth of cut in first threadculting cycle(e+ress in diameter). in Finishing allowance(express diameter). in Threadheight (xpress dia$eter). Chamferingdistancein final threadcutting cycle. (effective in M32 as modetif no L word is providedin M23 node, L is assumed the distanceequivalentto onelead) Threadlead. Number of thrc'ads wioin a distancespecifiedby F word. Usedto selecttfueadcuftrngpattemand modeof infeed. The numberof tlreads for multipl-dread dread cutting.

Dcccrirber 1998

t9

l.
!
I

L
Training Mrnual - Lathe N'IIMAC MACHINERY SDN. BHD.

4.2 LongitudinalGroovingFixed Cycle(G73)


c code:G?3 goovingfixedcycle. Description:t ngitudinal G13X_Z_t K_ D_L_ F_E_ T
X X coordinate targetpoinl of of Z coordinate targctpoint. Shift amountin X-axis direction(in diameter). Shift arnountin Z-axisdhection. Depth ofcut (infeedamount,iII diameler). Total infeedamountfor tool withdmwal modon (in diameter) FedrateDuration of dwell motionwhen taet point on X-a\is is reached. Tool offsel numberdeterminingdle tool offset arnountwher largel point on z-axis is reached.

z
I K D L F T

Decen$er 1998

2{l

.-/

NT]MAC MACHINERY SDN. BHD.

Grooving/DrillingFixed Cycle (G74) 4.3 Transverse


c code: G74 grooving/drillingtrxed cycle. TmnsveNe Desciiption:
G74X-Z_I K_D-L-F_E_ T

x z
I K D L F T

X coordinaleof targetpoint (X=o whendrilling). of Z coordinate targetpoi-nt. Shift amountin X-&xisdirection (in diameter). Shift amountin Z-axi! direction (I(=0 when drilling). Deplh of cut (iDfeedamount)Tool infeedamountfor tool withdrawal motion. Feedrate, Dumhon of dwell motion when targetpoint on X-axis is reached. Tool ofset numbrdeterminingthe tool offset amountwhen tr-rget Dointon Z-axis is reached.

lDlK

<-______<__
v2

l9Y8 Decelnber

zl

*-r

NIJMAC MACHINERY SDN. BIID

{.4 TappingFired Cycle(G77,G78)


G cod:G77 Dscriptiotr: Right t nd dveadtappingfixed cycle- (Tappingadaptorneedto be used.) G code:G78 De!.ription: Left b"ad $.tad tapphg fixed cycle. (Tappingadaptorneedto be used) Gl1tGt8X_Z_K_F_ X coordinateof tappingstartpoint. (trrget potno Z coordinateof tappinged poinl (targetpoin0 Rapid a{s feedratefor axis feedfrom the cycle stan potm to ue cuttrnSslart pornt. (pitch). Feedrate

\ Z K F

X=0

lccmber l99s

NIJMAC NLTCHINERY SD\. BIID.

(Cutting 5 Programming Chapter Basic Parameter)


5.1 Feedrate Control(G94,G95)
G code:G9.1 DescdprioD:Specfies the feedr'ate the feedminute mode in G code:G95 Descriptioo: Specifies feedmtein the feedrevolutioo D!1de. the Corersior of feed/rev. to fcrd/mi4l = Feed./mln feed.irev. RPM x

5.2 Cutting Speed Control (G96,G97)


G codq G96 DscriptioD:Coonantspeed sutting modon. G cods G97 Descripdoo: Carcel corlsta.Dt cutting mod. Conversiod cottiDgspeed spindlespeed: of ao / RPM = (\'\ 1000) (i l1 x D) D: mm E\"mple: GiO s2000

c96 S20C G!7 Si500

\D

You might also like