You are on page 1of 23

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

:]

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

I ':!

?a,QgzJ
:;!:a':__' -r l. ' " I
A,\7 C6O
at'p 6?f
-/
Training M2nual - Larhe NUMAC MACHINERY SDN. B}ID.

ChapterI Introduction
1.1NC ProgrammingConcept
The pupos€ of NC programmitrgis i\Titing a Programto cornmandthe CNC machineto maclune
a work pieceaccordingto the g en drawing. The proceduresarc illustmtedin Figure 1-1.

Tooling
&
Selectron
ToolPath
Design

Figure 1-1

1.2 Machineand Program CoordinateSystem( StandardCNC Lathe)


The coordinatesystemof CNC lathe is shownin Figure l-2.

X +ie
l-)
L_l
/o / |

Figure 1-2
* Nore:X-r\is coardimteslalcdin dianetervalue.
Progam zero mustbe selecledbeforestart programmiog

i
I
Decembor
i998
TEinitrg lltatrual - l,athe NT]MAC MACHINERY SDN. BT{D

Poitrt x z
40 0
B 40 -50
c 70 -50
D 70 -l l 0
E 80 -r l0

fierEise:

Point x z
B
c
D

Erdcise:

Point x z
B
c
D
E
F

D*mber 1998
NTJMACMACHTNERYSDN BHD

Chapter2 BasicProgramming
2.1 Program Configuration
Gene.allya programcoffists ol
l) fbgram Nalne.
2) S€quenceNameard Sequ€ac€label.
3) Coordinatesandcommatrds
4) Remarks.
5) End ofProgram block.

This tufornation is presenledusingALPHABATIC CHARACTERS and NUMf,RIC CHAR{CTER-S


E ch line ofcbamctersis calleda BLOCL

(Canbe omitled d otrlti one programin the file)


N____ G_ X_ Z_ S_ T, M_

:
r,42
E\anple 2. t: Programmingformat

oool2
Nl00 G50s2000
Nl0l 600x5002450
NATOI(ROUGHCI.II OD)
Nl02 T0l0l0I
Nl03 x80 250s430Mol M08
N104 X70230
N105G0l X230.25sF0.5

N600G00x300 2450M05M09
M02

2-l.l ProgramName(Prograu Number)


I ! Programnamedesignation
o
- Up to 4 characterscanbe us€d-
- The .f chamclerscrn b€ nqnenc.
- Alphabeticcharactermustbe a h€adof numericchardcter.
Example2.2:Progrm Name

a)01234 r'
b) oABl2 r'
c) OIAA2

d)Ol23 * O0l13

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

Deember 1998
---alnrngl\,lr.[ual - Lath€ NTJMACMACHINERY SDN, BFID

Nameand Label
zl.2 Sequence
I i { sequeneoameis defircd as a namea$igned to a block. Numeric or alphabeticclnractersfollowing
der -N aredesignatedlor a s€quercen une,

N
naltr€trrrlstbe placedat the beginning of a block. However it is notessentral
- Sequenc€ to include
quence trameitr a proglain.

- i€quencenam€may be slecified in ally order.

2.3iPrognmName
Example

a)N1234 r'
b) NAT02 r'
c) NIAT2
d) Nl23 + N0123

11.3 Coordinatesand 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 commandsthe nrachinelo mo\,ethe cutterat a rapid sp€edio a specificpoint in the

b) M08 commandsthe machineto start spmyingcoolantthroughthe nozdes.


:3nii 2 L G4ode

G-Code CONTENTS
G00 Positionine
G0t Straishtline cuttine
G02 Circr ar cuttins fclockwise)
G0l Circular cunina (counterclockwise)
G0l Dwell
G40 Tool noseradiusconlDensation:Cancel
G.ll Tool nosemdius compensation:left
Tool nosendius comDenlatiolr: neht
c5t) Maximum SDindlesDeeddesiqution
G7 l lanqitudinal comDoundfixed threadcuttine cvcle
Lonsiludinal ercovin(rcomDoundfixed cvcle
Trans:\,ersc
aroovinc/drilline fi yedcacle
co'nDound
ca7lG?8 TaDDins comnoundfixed c-\,cle.
G8o EndofshrDedesisndtion GAP)
G81 SI,3nof lonsitudimlshaDe desreMtron
fLA?l
GE: St?noftnNvers€ sluDedesiFation(LAP)
G3i Callof rouchbarturninec\cle tLA? )
GS i Callof firushlmirq cycle(LA?)
G90 AbsolutcDrosranninc
__ge_i un
_trgs!!1.ti1_pt.9eEln!
_Gll
G!i
G96
_199!Lperminule rlode
feedDerrevolution
Constairt
{mnr,imin)
mode{mm/rc!l
speedcuningON
{r
G9- CmcelofG96 (djreclspirdlespeed)

:,:..rb-r ie98
:mlns \,farual - l-a$e

:*iell:llCodes

\'l Code Codeots


v00 Progam Eop
v0r
MO: EEd of Dmgam
\I0l Sdtrdle clochiis€ rotalon
\4OJ Srindle counFrclockwiserouuon
v05
M08 C-elant on
\I09 Coola.ot
otr

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

settitrgtheunit syslemis in millimeters


- h ieadt parameter
X90-l is eff€cnely90.t mmor 90l00pm
- r"sr br defauhthetmirqsem allows3 sigrificantdigit afterthedecifialpoiDt.
x0.00I
if oteger\alueis assigD€d.
- ar:-s.d pointis not 6s€trtra1
X90 is efre.ti1eas X90.orX9o.0

Exanple 2 .1:
x-10.1tl ztol
x90.001 290
:i a!=: code(address)include F. S.T. P. Q....

&\e=
F= Feedrate
S: SpindleSpeed
I- Iool numberatrdlool offselnumbcr
Y.!al- falh€ NUMAC MACHINERY SDN B}ID.

Irl Selection

da onting tool is madeby 4{igit figutes following a characterT


-

Tool Offset Number


E@ple 2-+ Tool Number

r 9292

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

r82q2q2
\- Tool Offset Number
\
Tool Number

Tool noseradius
compensation

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


a!trT-rtd spindlemrln be rotaling b€forethe cutting processcornmences.Thesecodesare usedto
rb diEcriofls of s?indleroution andits spe€d.

Sransthe spindlein Clockwisedirection. (IMPORTAIYT: Seefigure for the Corvention )

dn\
Eli
Stins the spindlelll Count€r-Clockwisedirectior. (IMPORTANT: Seefigure for $€

'/T\\
w'
hignatcs ',hespindlespeed
R.r'/ mio )
NUMAC MACHINERY SDN. BIID

u0f
xI8€ 2204
xl85
I Xl85 Zl20 m.5
xl90
zloo
xzm
xi002300
5

aEds the machineto s€l€attool trumberL


+ddle speedro 2000 r.p.m
rhe slindle to .o€te itr clocbi.ise directioo at ro(atlons?€eddeterminedby pre\ ious S
G. 2000r.p.m-
t 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 Stop and Program End (M00, M0f, M02)


k;rli stop- Th€ machiniry cycl€ stopswh€trthis codeis encounteredduring program
dio[ PressingCYCm START at $is point will r€s,umethe opemtion.
qrirl nop. M0l performstle sanefunctionasM00. ;xcepl.it is oni) effeclirer{hen
rL OPTIONAL STOP bulton on the controlpanelis swilchedon. Pr€ssingCYCLE
5f.1RT ai this point will resumedle operatior
fl .a pmgram, It mustbe ircluded to indicateendof a progmrn.This codealso resets
ft.ootrol-

fd3 *ops here. TOIOI


s2000M03
c00 xl88 2204
xl85
=.]=n"-*.\
hon is pressed, M00
M08
Sep ifOPTIONAL STOP cnl xl85 zl20 F0.5
xl90
Coflrnu€s here when
ztoo
x200
tirtton is pressed.
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 thestoppingpomt
desiErare

mtol
s20mM03
icao x1E8 2204

-Line Cutting (G0l)


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

Emple 2 9:

ml0l
s2000M03
c00 xl88 2204
xl85
M08
GO1X185 2120 m.5
x190
zrw
x200
G00x3002300
MJ
M09
M2
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.

+ atrdK speciryllre tpsition of the centerpoht relative to lbe sta-rtpoint ofarc.

- 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 20 100

T0l0l
s2000
M03
G00x60zl0l
zI00 ,
M.08
G01220F0.5. . . a
GoJ X80ZI0 K-10 F0.5
c00 x1002300
M5
M09
\a

t2
NI-IMAC MACHINERY SDN. BHD

ml 0 l
s2000M03
cro0x60 zt04
zlN
M08
GOr 220 F05
G02X80 Zto I10 F0*r
croOx300zm
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
- -{dditional}. I ard K canbe replacedbf L {ndius)

lEmber I99E l. ]
I
100

i,,ffi

Decemberlg)s
Traininglranual- Lathe NUMAC MACIII}.ERY SDN. BTID.

3.2 LAP 3 - Bar RoughTurning Cycle

G coderG80 End offinishing $ape desiglation for bar mugll

G coderG8l Stan ofloDgtrudral draF designarioofor rougb


bar tumine c,\de.
G code:G82 Stan of transltrse sbapedesignationfor rough bar

C code:G87 Ca[ offinisL tunine clcle.

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

G80

G code: G8l
D€scription: Sranof lotrg:rudinalsbapedesigMtioo for roughb€r tumin8 clcle

N G8I

N SeouenceBIne of the de6n€dsnape

E\ample: 1.."

NLAPI G81

G80
l{999M02

G code:G82
D€scription: Startof transverseshapedesignationfor roughbar nirniDgclcle

N G82

N Sequetrceoameof the d€finedshape

E\lnrple 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 DF UW

N____ Sequencenameofthe definedshape.


D, Rougtringcycle depthof cut (drameter)
F_ Roughingcyclefeedmte.
U_ Stockresorvefor finishing in X-direction (diameter)
Stockres€rvefor finishing in Z{irection.
Exanple:

NoroG5052000
N020G00x500.2500
N0j0 X6t z16I T0t0t 5500Mol M08 /Feedrate of roucling cycle.
N040G96S | 20
-----'- W0.5
N050 G85 NLAI1 D2 X'0.tU1'0 (Ca[ roughbar turning cycle)
NI,AP G81 (Start
longitudinalroughtumingfinishedshapedefine)
N060G0 x-0.1 zl5?
N ^ rn 7 r{ < F n o K -
^^r -'" "."" ------------
iio*o iio Fef,drare cvcl€
offinishing
N090z 90
NI00x50
. Nll0 250
Nl20 x6I
Nl30 G80 @nd of rough bar tuming shapedefme.)
Nl40 G975500
Nl50 G00x500 2500
Nl60 M02
x=51
i:ts

. ''..'

December1998 l6
NIIMAC MACHINERY SDN, BHD.

G code:G87
Deicription: Call offinish tumitr8 cycle.

G87N_,__ (U_W )

N____ Sequencenameof the definedshape.


U_ Stockreservefor frfther finishing in X-dire{tion (diameter)_
oDtonal,
Stockr€servefor further finishing in Z-direciion-oplion"l

Example:

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

N0l0 G50s2000
N020G00x5002500
N030x6r 216l ml0r s500M03M08 orroug*'*
N040G965120 T91------Reture
N050C85 NLAPI D2 F0.t Ul.0 W0.5 (Callroughbar Rming c) cle.I
NLAP G81 (Start longitudinalroughbar tuming sbapedefine.)
N060G0 x4.l 2157
N070 G'l zl55 F0 06----___--------
Feedrateoffinishing cycte
N090z 90
Nr00xso
Nll0 250
Nl20 x6l
Nl30 G80 Gnd ofroughbartumingfinishedshapedefire )
Nl40 G975500
Nl50 GOO X5002500
Nr60 x4.l 216l m202
Nl70 G96Sl50
NISOG87 NLAPI (CrI firishing cycle.)
Nl90 G95 S500
N200 G00x500 zs00
N999M02

Decenb('r1998 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. Actual cutting palh o tool

R€quiredcuttingpath.

Withoutusingtool nosecompensafon.
Progmnrmingpold set
by tool offset.

G code G,l2
Description: Tool nosecompensatior\righl

Example:

N060CnoG42X32Zl22 (Toolnosecompensation
rigbt.)
N070G01G96Sl00X30Zl20 Z= 50 Z= a0 Z= t20
N080280
N090xsO,z50 X=50
Nl00 248 Z= 3l
Nll0 x52
Nl20 Gito (Canceltool nosecomp€nsation.
)
Nl30 G00xs00,2500

D e c eNh. ' r1998 1E


Training Mrnual - Lathe NIJMAC MACHINERY SDN. BTID

Chapter4 BasicProgramming(FixedCycles)
4.1 LongitudinalThread Cutting Cycle(G7l)
G code:G7l
Description: Longitudinal dread cutting cycle.

G?I X-Z-A_(I)B,D_ U_ H- L_ F J M_Q-

x Final diameterof thr€ad.


z Z coordinateof endpoint of tfuead.
Taperangle.
I Dif€rence in mdiusbetweenskning point and endpoinl for taper
thread(€xpressin radius).
B Infeedangle(B = 0-180;0ifno B provided.Nomrallyis equalto
cutter tip point angle).
D Depth of cut in first threadculting cycle(e+ress in diameter).
U Finishing allowance(expressin diameter).
H Threadheight (€xpressin dia$eter).
L Chamferingdistancein final threadcutting cycle. (effective in M32
modetif no L word is providedin M23 node, L is assumedasthe
distanceequivalentto onelead)
F Threadlead.
J Number of thrc'adswioin a distancespecifiedby F word.
M Usedto selecttfueadcuftrngpattemand modeof infeed.
a The numberof tlreads for multipl€-dread dread cutting.

Dcccrirber
1998 t9
l.
L
N'IIMAC MACHINERY SDN. BHD. !
Training Mrnual - Lathe
I

4.2 LongitudinalGroovingFixed Cycle(G73)


c code:G?3
Description:t ngitudinalgoovingfixedcycle.

G13X_Z_t K_ D_L_ F_E_ T

X X coordinateof targetpoinl
z Z coordinateof targctpoint.
I Shift amountin X-axis direction(in diameter).
K Shift arnountin Z-axisdhection.
D Depth ofcut (infeedamount,iII diameler).
L Total infeedamountfor tool withdmwal modon (in diameter)
F F€edrate-
Duration of dwell motionwhen ta€et point on X-a\is is reached.
T Tool offsel numberdeterminingdle tool offset arnountwher largel
point on z-axis is reached.

Decen$er1998 2{l

.-/
NT]MAC MACHINERY SDN. BHD.

4.3 TransverseGrooving/DrillingFixed Cycle (G74)


c code:G74
grooving/drillingtrxed
Desciiption:TmnsveNe cycle.

G74X-Z_I K_D-L-F_E_ T

x X coordinaleof targetpoint (X=o whendrilling).


z Z coordinateof targetpoi-nt.
I Shift amountin X-&xisdirection (in diameter).
K Shift amountin Z-axi! direction (I(=0 when drilling).
D Deplh of cut (iDfeedamount)-
L Tool infeedamountfor tool withdrawal motion.
F Feedrate,
Dumhon of dwell motion when targetpoint on X-axis is reached.
T Tool ofset numb€rdeterminingthe tool offset amountwhen tr-rget
Dointon Z-axis is reached.

lDlK
<-______<__
v2

Decelnberl9Y8 zl
*-r t

NIJMAC MACHINERY SDN. BIID

{.4 TappingFired Cycle(G77,G78)


G cod€:G77
D€scriptiotr: 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 Z coordinateof tappinged poinl (targetpoin0
K Rapid a{s feedratefor axis feedfrom the cycle stan potm to ue
cuttrnSslart pornt.
F Feedrate(pitch).

X=0

lcc€mber
l99s
NIJMAC NLTCHINERY SD\. BIID.

(CuttingParameter)
Chapter5 BasicProgramming
Control(G94,G95)
5.1 Feedrate
G code:G9.1
DescdprioD:Specfies the feedr'atein the feedminute mode

G code:G95
Descriptioo: Specifiesthe feedmtein the feedrevolutioo D!1de.

Corersior of feed/rev. to fcrd/mi4l

Feed./mln= feed.irev.x RPM

5.2 Cutting SpeedControl (G96,G97)


G codq G96
D€scriptioD:Coonantspeedsutting mod€on.

G cods G97
Descripdoo: Carcel corlsta.Dt
cutting mod€.

Conversiodof cottiDgspeedaospindlespeed:

RPM = (\'\ 1000)/ (i l1 x D)

D: mm

E\"mple:

GiO s2000

c96 S20C

G!7 Si500

\D

You might also like