CNC Part Programming 1- Manual Part Programming (G-Code) 2- Computer Assisted Part Programming (APT)
3- Part Programming Using CAD/CAM
Computer-Assisted Computer-Assisted Part Programming APT: Automatically Programmed Tooling. APT is a three-dimensional three-dimensional programming s!stem"
•
APT is not onl! a language# language# it is also also the $omputer program that pro$esses the APT statements to $al$ulate the $orresponding $utter positions and generate the ma$hine tool $ontrol $ommands"
•
C
Computer-Assisted Computer-Assisted Part Programming %n $omputer-assisted part programming (APT)& the ma$hining instru$tions are 'ritten in English-like statements that are suseuentl! translated ! the $omputer into the low-level machine $ode machine $ode that $an e interpreted and e*e$uted ! the ma$hine tool $ontroller" $ontroller" •
+hen using one o, the part programming languages& the t'o main tass o, the programmer are.
•
(!
"e#ining the geometry o# the workpart.
($! %peci#ying the tool path and operation se&uence.
Computer-Assisted Part Programming To program in APT' the part geometry must #irst e de#ined. Then the tool is dire$ted to arious point lo$ations and along sur,a$es o, the 'orpart to a$$omplish the reuired ma$hining operations" •
The ie'point o, the programmer is that the 'orpie$e remains stationar!& and the tool is instru$ted to moe relatie to the part" •
To $omplete the program& speeds and #eeds must e spe$i,ied& tools must e $alled& tolerances must e gien ,or circular interpolation& and so ,orth" •
Computer-Assisted Part Programming There are #our asic types o# statements in the APT language: . )eometry statements& also $alled de,inition statements& are used to de,ine the geometr! elements that $omprise the part" $. *otion commands are used to spe$i,! the tool path" +. Postprocessor statements $ontrol the ma$hine tool operation& ,or e*ample& to spe$i,! speeds and ,eeds& set toleran$e alues ,or $ir$ular interpolation& and a$tuate other $apailities o, the ma$hine tool" ,. Auiliary statements& a group o, mis$ellaneous statements used to name the part program& insert $omments in the program and a$$omplish similar ,un$tions"
Computer-Assisted Part Programming The statements are $onstru$ted o, APT vocaulary words' symols' and numers' all arranged using appropriate punctuation. •
APT vocaulary words $onsist o, si or #ewer characters" •
Most APT statements in$lude a slash (! as part o, the pun$tuation" •
APT o$aular! 'ords that immediatel! pre$ede the slash are $alled ma/or words& 'hereas those that ,ollo' the slash are $alled minor words" •
Computer-Assisted Part Programming )eometry %tatements
%0*123 4 )E2*ET50 T0PE"E%C56PT67E "ATA
Points P1 0 P%T/2"&"&4" P2 0 P%T/%T5&61&62
•
Commas are used to separate the 'ords
and numeri$al alues in the des$riptie data"
Computer-Assisted Part Programming )eometry %tatements Lines A line de,ined in APT is $onsidered to e in,inite length in oth dire$tions" Also& APT treats a line as a erti$al plane that is perpendi$ular to the *-! plane" •
63 0 6%7/P3&P 6 0 6%7/P8&PA9676&63
Computer-Assisted Part Programming )eometry %tatements Circles %n APT& a $ir$le is $onsidered to e a $!lindri$al sur,a$e that is perpendi$ular to the *-! plane and e*tends to in,init! in the :-dire$tion" C1 0 C%9C67/C7T79&P1&9AD%U;&28" C2 0 C%9C67/P&P8&P4 •
Planes %n APT& a plane e*tends inde,initel!" P61 0 P6A7/P1&P2&P3 •
P62 0 P6A7/P2&PA9676&P61
Computer-Assisted Part Programming )eometry %tatements 5ules #or #ormulating APT geometry statements: 1" Coordinate data must e spe$i,ied in the order *& then !& then :" 2" An! s!mols used as des$riptie data must hae een preiousl! de,ined" 3" A s!mol $an e used to de,ine onl! one geometr! element" " nl! one s!mol $an e used to de,ine an! gien
element"
Computer-Assisted Part Programming Eample Part )eometry 8sing APT
Computer-Assisted Part Programming Eample Part )eometry 8sing APT
Computer-Assisted Part Programming Eample Part )eometry 8sing APT P1 0 P%T/&& P2 0 P%T/14"&& P3 0 P%T/14"&4"& P 0 P%T/38"&<"& P8 0 P%T/="&3"& P4 0 P%T/12"&3"& P= 0 P%T/="&4"& P> 0 P%T/13"&4"& 61 0 6%7/P1&P2 62 0 6%7/P2&P3 C1 0 C%9C67/C7T79&P>&9AD%U;&3"
63 0 6%7/P&PA9676&61 6 0 6%7/P&P1
Computer-Assisted Part Programming *otion Commands The ,ormat o, an APT motion $ommand is. *2T62N C2**AN""E%C56PT67E "ATA 7*ample. GT/P1 The statement $onsists o, t'o se$tions separated ! a slash" The ,irst se$tion is the asi$ $ommand that indi$ates 'hat moe the tool should mae" The des$riptie data •
,ollo'ing the slash tell the tool 'here to go"
Computer-Assisted Part Programming *otion Commands At the eginning o, the seuen$e o, motion statements& the tool must e gien a starting point" This is liel! to e the target point& the lo$ation 'here the operator has positioned the tool at the start o, the ?o" The part programmer e!s into this starting position 'ith the ,ollo'ing statement. 59M/PTA9G •
•
+here 59M is an APT o$aular! 'ord indi$ating that this is the initial point# and PTA9G is the s!mol assigned to the starting point" Another 'a! to mae this statement is the ,ollo'ing. 59M/-2"&-2"& •
•
•
The 59M statement occurs only at the start o, the
motion seuen$e"
Computer-Assisted Computer-Assisted Part Programming *otion Commands Point-to-point Point-to-point motions There are onl! t'o $ommands. )2T2 and )2T2 and )2"3TA" )2"3TA" The GOTO statement instru$ts the tool to go to a parti$ular point lo$ation spe$i,ied in the des$riptie data" 7*amples. GT/P2 GT/28"&"& %n the ,irst $ommand& P2 is the destination o, the tool point" %n the se$ond $ommand& the tool has een instru$ted to go to the lo$ation 'hose $oordinates are *028"& !0"& and :0" •
•
The GODLTA $ommand spe$i,ies an in$remental moe ,or the tool" To illustrate& the ,ollo'ing statement instru$ts the tool to moe ,rom its present position ! a distan$e o, 8"mm in the *-dire$tion& 12"mm in the !-dire$tion& and "mm in the :-dire$tion.
•
GD6TA/8"&12"&"
Computer-Assisted Computer-Assisted Part Programming *otion Commands Point-to-point motions @The GD6TA statement is use,ul in drilling and related ma$hining operations" operations" The tool $an e dire$ted to go to a gien hole lo$ation# then the GD6TA $ommand $an e used to drill the hole& as in the ,ollo'ing seuen$e. )2T2P$ )2"3TA9'9'-9.9
)2"3TA9'9'9.9
Computer-Assisted Part Programming *otion Commands Contouring *otion Commands The tools position must e $ontinuousl! $ontrolled throughout the moe" The tool is dire$ted along two intersecting sur#aces until it rea$hes a third sur#ace& as sho'n in the ,ollo'ing 5igure" •
These three sur,a$es hae spe$i,i$ names in APT# the! are. ."rive sur#ace" This sur,a$e guides the side o, the $utter" •
$.Part sur#ace" This is the sur,a$e on 'hi$h the ottom or nose o, the tool is guided" +.Check sur#ace" This is the sur,a$e that stops the ,or'ard motion o, the tool in the e*e$ution o, the $urrent $ommand" ne might sa! that this sur,a$e B$he$sB the adan$e o, the tool"
Computer-Assisted Part Programming
*otion Commands
The sur,a$es in APT $ontouring motions that guide the $utting tool
Computer-Assisted Part Programming *otion Commands There are seeral 'a!s in 'hi$h the $he$ sur,a$e $an e used" This is determined ! using an! o, ,our APT modi#ier words in the des$riptie data o, the motion statement" The ,our modi,ier 'ords are T2' 2N' PA%T& and TANT2"
Computer-Assisted Part Programming *otion Commands
8se o# APT modi#ier words in motion statements: (a! T2 moves the tool into initial contact with the check sur#ace; (! 2N positions the tool center on the check sur#ace; (c! PA%T moves the tool /ust eyond the check sur#ace.
Computer-Assisted Part Programming *otion Commands The modi,ier 'ord TAT is used 'hen the drie sur,a$e is tangent to a $ir$ular $he$ sur,a$e"
8se o# the APT modi#ier word TANT2. TANT2 moves the tool to the point o# tangency etween two sur#aces' at least one o# which is a circular sur#ace.
Computer-Assisted Part Programming *otion Commands %n 'riting a motion statement& the part programmer must eep in mind the dire$tion ,rom 'hi$h the tool is $oming in the pre$eding motion" •
The programmer must pretend to e riding on the top o# the tool& as i, driving a car " •
A,ter the tool rea$hes the $he$ sur,a$e in the pre$eding moe& does the ne*t moe inole a right turn or le,t turn or 'hat The ans'er to this uestion is determined ! one o, the ,ollo'ing si* motion 'ords& 'hose interpretations are illustrated in the ,ollo'ing ,igure. •
Computer-Assisted Part Programming *otion Commands
se o# the APT motion words. The tool has moved #rom a previous position to its present position. The direction o# the net move is determined y one o# the APT motion words )23
)2<="' )21AC>' )28P' or )2"2=N.
Computer-Assisted Part Programming *otion Commands To egin the seuen$e o, motion $ommands& the <52* statement is used" The statement ,ollo'ing the 59M $ommand de,ines the initial drive sur#ace' part sur#ace' and check sur#ace. +ith re,eren$e to the ,ollo'ing ,igure& the seuen$e taes the ,ollo'ing ,orm. <52*PTA5) )2T2'P3'T2'P3$'T2'P3+ The s!mol PTA9G represents the target point 'here the operator has set up the tool" The G $ommand instru$ts the tool to moe to the interse$tion o, the drie sur,a$e (P61)& the part sur,a$e (P62)& and the $he$ sur,a$e (P63)" e$ause the modi,ier 'ord T has een used ,or ea$h o, the three sur,a$es& the $ir$um,eren$e o, the $utter is tangent to P61 and P63& and the ottom o, the $utter is on P62" The three sur,a$es in$luded in the G statement must e spe$i,ied in the order. (1) drie sur,a$e& (2) part sur,a$e& and (3) $he$ sur,a$e" •
Computer-Assisted Part Programming
*otion Commands
%nitiali:ation o, APT $ontouring motion seuen$e"
Computer-Assisted Part Programming *otion Commands ote that G/T is not the same as the GT $ommand" GT is used onl! ,or PTP motions" The G/ $ommand is used to initiali:e a seuen$e o, $ontouring motions and ma! tae alternaties ,orms su$h as G/&G/T& or G/PA;T"
Computer-Assisted Part Programming *otion Commands
A,ter initiali:ation& the tool is dire$ted along its path ! one o, the si* motion $ommand 'ords" %t is not ne$essar! to rede,ine the part sur,a$e in eer! motion $ommand a,ter it has een initiall! de,ined as long as it remains the same in suseuent $ommands" %n the pre$eding motion $ommand. •
•
G/T&P61&T&P62&T&P63
The $utter has een dire$ted ,rom PTA9G to the interse$tion o, sur,a$es P61& P62& and P63" ;uppose it is no' desired to moe the tool along plane P63& 'ith P62 remaining as the part sur,a$e" The ,ollo'ing $ommand 'ould a$$omplish this motion. •
•
G9GT/P63&PA;T&P6
Computer-Assisted Part Programming *otion Commands ote that P62 is not mentioned in this ne' $ommand" P63& 'hi$h 'as the $he$ sur,a$e in the pre$eding $ommand is no' the drie sur,a$e in the ne' $ommand" And the ne' $he$ sur,a$e is P6" Although the part sur,a$e ma! remain the same throughout the motion seuen$e& the drie sur,a$e and $he$ sur,a$e must e rede,ined in ea$h ne' $ontouring motion $ommand"
Computer-Assisted Part Programming *otion Commands The planes around the part outline can e replaced y lines& and the APT $ommands $an e repla$ed ! the ,ollo'ing. <52*PTA5) )2T2'3'T2'P3$'T2'3+ )25)T3+'PA%T'3,
Computer-Assisted Part Programming Eample APT Contouring *otion Commands
Computer-Assisted Part Programming Eample APT Contouring *otion Commands
Computer-Assisted Part Programming Eample APT Contouring *otion Commands @ 6et us 'rite the APT motion $ommands to pro,ile mill the outside edges o, our sample 'orpart" @The tool egins its motion seuen$e ,rom a target point PTA9G lo$ated at *0& !0-8mm and :01mm" @ +e also assume that Bpart sur,a$eB P62 has een de,ined as a plane parallel to the *-! plane and lo$ated 28mm elo' the top sur,a$e o, the part" The reason ,or de,ining in this 'a! is to ensure that the $utter 'ill ma$hine the entire thi$ness o, the part.
Computer-Assisted Part Programming
Eample APT Contouring *otion Commands <52*PTA5) )2T2'3'T2'P3$'2N'3, )25)T3'PA%T'3$ )23
)2T2P9
Computer-Assisted Part Programming Postprocessor and Auiliary %tatements A $omplete APT part program must in$lude ,un$tions not a$$omplished ! geometr! statements and motion $ommands" These additional ,un$tions are implemented ! postpro$essor statements and au*iliar! statements" Postprocessor statements $ontrol the operation o, the ma$hine tool and pla! a supporting role in generating the tool path" ;u$h statements are used to de,ine cutter si?e' speci#y speeds and #eeds' turn coolant #low 2N and 2<<' and control other #eatures o, the parti$ular ma$hine tool on 'hi$h the ma$hining ?o 'ill e per,ormed" The general ,orm o, a postpro$essor statement is the ,ollo'ing.
Computer-Assisted Part Programming Postprocessor and Auiliary %tatements P2%TP52CCE5 C2**AN""E%C56PT67E "ATA +here the P;TP9C7;;9 CMMAD is an APT ma?or 'ord in$luding the t!pe o, ,un$tion or a$tion to e a$$omplished& and the des$riptie data $onsists o, APT minor 'ords and numeri$al alues" %n some $ommands& the des$riptie data is omitted" Examples:
8N6T%** indi$ates that the spe$i,ied units in the program are %CE7; or MM" •
6NT239.9$ spe$i,ies in'ard interpolation (28TT239.9$)" •
toleran$e
,or
$ir$ular
%P6N"3999'C3= spe$i,ies spindle rotation speed in reolutions per minute" 7ither C3= ($lo$'ise) or CC3= ($ounter$lo$'ise) $an e spe$i,ied" (%P6N"32<
Computer-Assisted Part Programming C8TTE5$9 de,ines $utter diameter ,or tool path o,,set $al$ulation •
"E3A0+9 temporaril! stops the ma$hine tool ,or a period spe$i,ied in se$onds" •
•
•
5AP6" engage high ,eedrate ,or ne*t moes" C223NT<322" turns ,luid one (C223NT*6%T!
(C223NT2<
32A"T39 used 'ith automati$ tool $hanging"
Computer-Assisted Part Programming Postprocessor and Auiliary %tatements Auxiliary statements are used to identi,! the part program& spe$i,! 'hi$h postpro$essor to use& insert remars into the program& and so on" Au*iliar! statements hae no e,,e$t on the generation o, tool path" Examples:
PA5TN2 is the ,irst statement in an APT program& used to identi,! the program# ,or e*ample& PA9T ;AMP67 PA9T UM79 7 5E*A5> is used to insert e*planator! $omments into the program that are not interpreted or pro$essed ! the APT pro$essor" •
•
•
<6N6 indi$ates the end o, an APT program"
Computer-Assisted Part Programming Eample:
Computer-Assisted Part Programming Eample: Drilling •
•
•
•
•
•
Drill tool diameter 0 = mm Tool numer 1 N 0 1 r"p"m $lo$'ise V f 0 "8 mm/min
Milling •
•
•
•
7nd mill tool diameter 0 2 mm Tool numer 2 N 0 1 r"p"m $lo$'ise V f 0 8 mm/min
@ ;tarting point (PTA9G) at &-8&1
Computer-Assisted Part Programming %olution: PA9T D9%66%G AD M%66%G U%T;/MM CUTT79/2 PTA9G 0 P%T/&-8&1 P1 0 P%T/&&-1 P2 0 P%T/14&&-1 P3 0 P%T/14&4&-1 P 0 P%T/38&<&1 P8 0 P%T/=&3&1 P4 0 P%T/12&3&1 P= 0 P%T/=&4&1 P> 0 P%T/13&4&1 61 0 6%7/P1&P2 62 0 6%7/P2&P3 63 0 6%7/P&PA9676&61
6 0 6%7/P&P1
Computer-Assisted Part Programming C1 0 C%9C67/C7T79&P>&9AD%U;&3 P61 0 P6A7/P1&P2&P3 97MA9F ;tart Milling peration 59M/PTA9G 6ADT6/2 ;P%D6/1&C6+ 57D9AT/8&%PM C6T/56D G/T&61&T&P61&T6 G9GT/61&PA;T&62 G65T/62&TAT&C1 G5+D/C1&PA;T&63 G5+D/63&PA;T&6 G65T/6&PA;T&61
Computer-Assisted Part Programming 97MA9F ;tart Drilling peration 9AP%D GT/PTA9G ;P%D6/55 C6T/55 6ADT6/1 9AP%D GT/P8 C6T/56D ;P%D6/1&C6+ 57D9AT/"8&%PM GD6TA/&&-2 GD6TA/&&2 9AP%D GT/P4 57D9AT/"8&%PM GD6TA/&&-2
GD6TA/&&2
Computer-Assisted Part Programming 9AP%D GT/P= 57D9AT/"8&%PM GD6TA/&&-2 GD6TA/&&2 9AP%D GT/P> 57D9AT/"8&%PM GD6TA/&&-2 GD6TA/&&2 9AP%D GT/PTA9G ;P%D6/55 C6T/55
5%%