Phases of a CNC Program1

5
8/19/2019 Phases of a CNC Program1 http://slidepdf.com/reader/full/phases-of-a-cnc-program1 1/5 Three Major Phases of a CNC Program  Phase 1 - Program Setup % (Program start flag) : 1001 (Four digit program number)  N5 G90 G20 (Absolute units in!"es) (OR)  N5 G91 G21#G$1 (n!remental units &etri! 'nits)  N10 &0 2 (*top for tool !"ange use tool + 2)  N15 &0, *1200 (urn t"e spindle on -. to 1200 rpm)  Phase 2 –Material Removal  N20 G00 /1 1 (apid to /1 1 from origin point)  N25 03125 (apid do4n to 03125)  N,0 G01 03125 F5 (Feed do4n to 03125 at 5 ipm)  N,5 G01 /2 2 (Feed diagonall6 to /2 2)  N70 G00 1 (apid up to 1)  N75 /0 0 (apid to /0 0)  Phase 3 – System Shutdo!  N50 &05 (urn t"e spindle off)  N55 &,0 (8nd of program)  "lo#$ %ormat  N1,5 G01 /130 130 03125 F5 Preparator6 Fun!tion (G -odes)  & 2-digit !um'er folloi!g address ( determi!es the mea!i!g of the #omma!d of the 'lo#$ #o!#er!ed) The ( #odes are divided i!to the folloi!g to types* P8* &8ANNG ne s"ot G !odes The ( #odes is effe#tive o!ly at the 'lo#$ i! hi#h it as spe#ified &odel G !odes The ( #odes is effe#tive u!til a!other g #ode i! the same group is #omma!ded  N8 N G -8*  Ma+imum spi!dle speed setti!g ,(./ is valid he! the #o!sta!t surfa#e speed #o!trol ,optio!/ is provided  The ( #odes are mar$ed 0 are set he! the poer is tur!ed N  The ( #odes i! group .. are !ot modal) They are effe#tive o!ly i! the 'lo#$ i! hi#h they are spe#ified)  & !um'er of ( #odes #a! 'e spe#ified i! a 'lo#$ eve! if they do !ot 'elo!g to the same  group) he! a !um'er of ( #odes of the same group are spe#ified ( #ode spe#ified last is effe#tive  &ll the ( #odes may !ot apply to ea#h ma#hi!e

Transcript of Phases of a CNC Program1

Page 1: Phases of a CNC Program1

8/19/2019 Phases of a CNC Program1

http://slidepdf.com/reader/full/phases-of-a-cnc-program1 1/5

Three Major Phases of a CNC Program

 Phase 1 - Program Setup

% (Program start flag)

: 1001 (Four digit program number) N5 G90 G20 (Absolute units in!"es) (OR)

 N5 G91 G21#G$1 (n!remental units &etri! 'nits)

 N10 &0 2 (*top for tool !"ange use tool + 2) N15 &0, *1200 (urn t"e spindle on -. to 1200 rpm)

 Phase 2 –Material Removal  N20 G00 /1 1 (apid to /1 1 from origin point)

 N25 03125 (apid do4n to 03125)

 N,0 G01 03125 F5 (Feed do4n to 03125 at 5 ipm)

 N,5 G01 /2 2 (Feed diagonall6 to /2 2)

 N70 G00 1 (apid up to 1) N75 /0 0 (apid to /0 0)

 Phase 3 – System Shutdo! N50 &05 (urn t"e spindle off)

 N55 &,0 (8nd of program)

 "lo#$ %ormat  N1,5 G01 /130 130 03125 F5

Preparator6 Fun!tion (G -odes)

 & 2-digit !um'er folloi!g address ( determi!es the mea!i!g of the #omma!d of the

'lo#$ #o!#er!ed) The ( #odes are divided i!to the folloi!g to types*

P8* &8ANNG

ne s"ot G !odes The ( #odes is effe#tive o!ly at the 'lo#$ i! hi#h it as spe#ified 

&odel G !odes The ( #odes is effe#tive u!til a!other g #ode i! the same group is

#omma!ded 

 N8 N G -8*

 Ma+imum spi!dle speed setti!g ,(./ is valid he! the #o!sta!t surfa#e speed #o!trol

,optio!/ is provided  The ( #odes are mar$ed 0 are set he! the poer is tur!ed N 

The ( #odes i! group .. are !ot modal) They are effe#tive o!ly i! the 'lo#$ i! hi#h they

are spe#ified)

 & !um'er of ( #odes #a! 'e spe#ified i! a 'lo#$ eve! if they do !ot 'elo!g to the same

 group) he! a !um'er of ( #odes of the same group are spe#ified ( #ode spe#ified lastis effe#tive

 &ll the ( #odes may !ot apply to ea#h ma#hi!e

Page 2: Phases of a CNC Program1

8/19/2019 Phases of a CNC Program1

http://slidepdf.com/reader/full/phases-of-a-cnc-program1 2/5

G !odes

G -ode Group Fun!tion

G00

G01

G02

G0,

1

1

1

1

 Positio!i!g ,Rapid Tra!sverse/

 4i!ear 5!terpolatio! ,%eed/

Cir#ular 5!terpolatio! ,C/

Cir#ular 5!terpolatio! ,CC/

G07 0  6ell 

G20

G21

 5!#h 6ata 5!put 

 Metri# 6ata 5!put 

G2; 9  Refere!#e Poi!t Retur!

G,2 1 Thread Cutti!g 

G70

G71

G72

$

$

$

Tool !ose radius #ompe!satio! #a!#el 

Tool !ose radius #ompe!satio! left 

Tool !ose radius #ompe!satio! right 

G50 0 ord #o-ord) Cha!ge 7 Ma+) Spi!dle speed setti!g 

G$0

G$1

7

7

 %i!ishi!g #y#le

Sto#$ removal i! tur!i!g 

G$2

G$,

G$7

G$5

G$

0

0

0

0

0

Sto#$ removal i! fa#i!g 

 Patter! repeati!g 

 Pe#$ drilli!g i! 8 a+is

(roovi!g i! 9 a+is

Thread #utti!g #y#le

G90

G92

G97

1

1

1

Cutti!g #y#le &

Thread #utti!g #y#le

Cutti!g #y#le "

G9

G9$

2

2

Co!sta!t surfa#e speed #o!trol 

Co!sta!t surfa#e speed #o!trol #a!#el 

G9;

G99

11

11

 %eed per mi!ute

 %eed per revolutio!

&*-8<<AN8'* F'N-N (& -8*)

 M Codes are i!stru#tio!s des#ri'i!g mis#ella!eous fu!#tio!s li$e #alli!g the Tool

Spi!dle rotatio! Coola!t N et#)

&-8* F'N-N*

Page 3: Phases of a CNC Program1

8/19/2019 Phases of a CNC Program1

http://slidepdf.com/reader/full/phases-of-a-cnc-program1 3/5

 M Program Stop

 M1 ptio!al Stop

 M2 Program e!d 

 M3 Spi!dale %orard,C/

 M: Spi!dale %orard ,CC/

 M Spi!dle stop

 M; Tool #ha!ge

 M< Coola!t N 

 M.= Coola!t %% 

 M1. Chu#$ pe!

 M11 Chu#$ #lose

 M;2 utput1 N 

 M;3 utput 2 N 

 M;: utput 1%% 

 M; utput 2%% 

 M;; ait i!put 1 N 

 M;> ait i!put 2 N 

 M>; ait i!put 1 %% 

 M>> ait i!put 2 %% 

 M=< Sup program Call 

 M== Sup program ?+it

 Program 'uild-up for CNC 4athe ,%&N@C/

CNC program #a! 'e divided i!to 3 parts

*tartup

=od68nd of program

Page 4: Phases of a CNC Program1

8/19/2019 Phases of a CNC Program1

http://slidepdf.com/reader/full/phases-of-a-cnc-program1 4/5

*tartup of -N- program

1000

>=<<8 /20 0

G21#G20 G9;#G99 G70G50 *1;00

G2; '0 .0

&0 0101&0,#&07 *1000

G00 /21 1

8/P<ANAN

1000 ."ile 4riting a program on FAN'- !ontroller first line "as to bestarted 4it" letter ?@ follo4ed b6 four digit number 4"i!" spe!ifies

t"e program name>=<<8 /20 0 "is dire!tie is used onl6 for simulation purpose3 t defines t"e 4orB 

 pie!e dimensions as 0mm long and 20mm in diameter3

G21#G20 G9;#G99 G70 G21 C "is !ode spe!ifies t"at program is done in metri! unitsr 

G20 C "is !ode spe!ifies t"at program is done in imperial units

G9; C Gies t"e unit of feed in mm#minuter 

G99 C gie t"e unit of feed in mm#reolution

G70 C -ompensation !an!el

G50 *1;00 -lamps t"e spindle speed at 1;00 rpm

G2; '0 .0 &aBe t"e tool to go to "ome position3 ' D . are se!ondar6

moements about / and aEis

&0

0101

ool !"ange

"e first t4o digit spe!if6 t"e tool position in t"e turret and last t4odigits denotes t"e tool offset number 

&0,#&07 *1000 &0, C &aBes t"e spindle rotate in !lo!B4ise dire!tion&07 C &aBes t"e spindle to rotate in !ounter!lo!B4ise dire!tion

*1000 C *pindle rotates at 1000rpm

G00 /21 1 G00 C Gies rapid position of t"e tool to a point /21 1

 "ody of the program

"is is dealt operation 4ise in t"e su!!eeding pages3

 ?!d of program

Page 5: Phases of a CNC Program1

8/19/2019 Phases of a CNC Program1

http://slidepdf.com/reader/full/phases-of-a-cnc-program1 5/5

G2; '0 .0

&05

&,0

 ?9P4&N&T5N 

G2; '0 .0 &aBe t"e tool to go to "ome position3 ' D . are se!ondar6 moements

about / and aEis

&05 *top t"e spindle rotation

&02#&,0 &02 ptional stop&,0 Program stop and re4ind

&8A< -'NG PAA&88* F *A 'N <A8

=<<8 &A8A<: A<'&N'&#*88< et!3

Operations  Speed

rpm

Feed

mm/min.

Depth of cut

Mm

'NNG

1000 2500 (up to

maE3 of ma!"ine

spe!3)

75 C 55(up to maE3 of 

ma!"ine spe!3)

035 C 130(up to maE3

of ma!"ine spe!3)

GNG

00 ;00(up to maE3

of ma!"ine spe!3)

15 25(up to maE3 of 

ma!"ine spe!3)

0325 C 035(up to maE3

of ma!"ine spe!3)

8ANG,00 ,5,0(up to maE3

of ma!"ine spe!3)030,0307(up to maE3

of ma!"ine spe!3)