数控编程.docx
- 文档编号:16637516
- 上传时间:2023-07-15
- 格式:DOCX
- 页数:28
- 大小:34.18KB
数控编程.docx
《数控编程.docx》由会员分享,可在线阅读,更多相关《数控编程.docx(28页珍藏版)》请在冰点文库上搜索。
数控编程
Letteraddresses[edit]
Someletteraddressesareusedonlyinmillingoronlyinturning;mostareusedinboth. Bold belowarethelettersseenmostfrequentlythroughoutaprogram.
Sources:
Smid2008;[1] Smid2010;[2] Greenetal.1996.[3]
Variable
Description
Corollaryinfo
A
AbsoluteorincrementalpositionofAaxis(rotationalaxisaroundXaxis)
B
AbsoluteorincrementalpositionofBaxis(rotationalaxisaroundYaxis)
C
AbsoluteorincrementalpositionofCaxis(rotationalaxisaroundZaxis)
D
Definesdiameterorradialoffsetusedforcuttercompensation.Disusedfordepthofcutonlathes.
E
Precisionfeedrateforthreadingonlathes
F
Defines feedrate
Commonunitsaredistancepertimeformills(inchesperminute,IPM,ormillimetresperminute,mm/min)anddistanceperrevolutionforlathes(inchesperrevolution,IPR,ormillimetresperrevolution,mm/rev)
G
Addressforpreparatorycommands
Gcommandsoftentellthecontrolwhatkindofmotioniswanted(e.g.,rapidpositioning,linearfeed,circularfeed,fixedcycle)orwhatoffsetvaluetouse.
H
Definestoollengthoffset;
IncrementalaxiscorrespondingtoCaxis(e.g.,onaturn-mill)
I
DefinesarccenterinXaxisfor G02 or G03 arccommands.
Alsousedasaparameterwithinsomefixedcycles.
J
DefinesarccenterinYaxisfor G02 or G03 arccommands.
Alsousedasaparameterwithinsomefixedcycles.
K
DefinesarccenterinZaxisfor G02 or G03 arccommands.
Alsousedasaparameterwithinsomefixedcycles,equalto L address.
L
Fixedcycleloopcount;
Specificationofwhatregistertoeditusing G10
Fixedcycleloopcount:
Definesnumberofrepetitions("loops")ofafixedcycleat each position.Assumedtobe1unlessprogrammedwithanotherinteger.Sometimesthe K addressisusedinsteadofL.Withincrementalpositioning(G91),aseriesofequallyspacedholescanbeprogrammedasaloopratherthanasindividualpositions.
G10 use:
Specificationofwhatregistertoedit(workoffsets,toolradiusoffsets,toollengthoffsets,etc.).
M
Miscellaneousfunction
Actioncode,auxiliarycommand;descriptionsvary.ManyM-codescallformachinefunctions,whichiswhypeopleoftensaythatthe"M"standsfor"machine",althoughitwasnotintendedto.
N
Line(block)numberinprogram;
Systemparameternumbertobechangedusing G10
Line(block)numbers:
Optional,sooftenomitted.Necessaryforcertaintasks,suchas M99 P address(totellthecontrolwhichblockoftheprogramtoreturntoifnotthedefaultone)or GoTo statements(ifthecontrolsupportsthose). N numberingneednotincrementby1(forexample,itcanincrementby10,20,or1000)andcanbeusedoneveryblockoronlyincertainspotsthroughoutaprogram.
Systemparameternumber:
G10 allowschangingofsystemparametersunderprogramcontrol.
O
Programname
Forexample,O4501.FormanyyearsitwascommonforCNCcontroldisplaystouse slashedzero glyphstoensureeffortlessdistinctionofletter"O"fromdigit"0".Today'sGUIcontrolsoftenhaveachoiceoffonts,likeaPCdoes.
P
ServesasparameteraddressforvariousGandMcodes
∙With G04,definesdwelltimevalue.
∙Alsoservesasaparameterinsomecannedcycles,representingdwelltimesorothervariables.
∙Alsousedinthecallingandterminationofsubprograms.(With M98,itspecifieswhichsubprogramtocall;withM99,itspecifieswhichblocknumberofthemainprogramtoreturnto.)
Q
Peckincrementincannedcycles
Forexample, G73, G83 (peckdrillingcycles)
R
Definessizeofarcradius,ordefinesretractheightinmillingcannedcycles
Forradii,notallcontrolssupporttheRaddressfor G02 and G03,inwhichcaseIJKvectorsareused.Forretractheight,the"Rlevel",asit'scalled,isreturnedtoif G99 isprogrammed.
S
Defines speed,eitherspindlespeedorsurfacespeeddependingonmode
Datatype=integer.In G97 mode(whichisusuallythedefault),anintegerafterSisinterpretedasanumberofrev/min (rpm).In G96 mode(CSS),anintegerafterSisinterpretedas surfacespeed—sfm(G20)orm/min(G21).Seealso Speedsandfeeds.Onmultifunction(turn-millormill-turn)machines,whichspindlegetstheinput(mainspindleorsubspindles)isdeterminedbyotherMcodes.
T
Toolselection
TounderstandhowtheTaddressworksandhowitinteracts(ornot)with M06,onemuststudythevariousmethods,suchaslatheturretprogramming,ATCfixedtoolselection,ATCrandommemorytoolselection,theconceptof"nexttoolwaiting",andemptytools.Programmingonanyparticularmachinetoolrequiresknowingwhichmethodthatmachineuses.Waysofobtainingthistrainingarementionedinthecommentsfor M06.
U
IncrementalaxiscorrespondingtoXaxis(typicallyonlylathegroupAcontrols)
Alsodefinesdwelltimeonsomemachines(insteadof"P"or"X").
Inthesecontrols,XandUobviate G90 and G91,respectively.Ontheselathes,G90isinstead afixedcycleaddressforroughing.
V
IncrementalaxiscorrespondingtoYaxis
Untilthe2000s,theVaddresswasveryrarelyused,becausemostlathesthatusedUandWdidn'thaveaY-axis,sotheydidn'tuseV.(Green etal. 1996[3] didnotevenlistVintheirtableofaddresses.)Thatisstilloftenthecase,althoughtheproliferationoflivelathetoolingandturn-millmachininghasmadeVaddressusagelessrarethanitusedtobe(Smid2008[1] showsanexample).Seealso G18.
W
IncrementalaxiscorrespondingtoZaxis(typicallyonlylathegroupAcontrols)
Inthesecontrols,ZandWobviate G90 and G91,respectively.Ontheselathes,G90isinstead afixedcycleaddressforroughing.
X
AbsoluteorincrementalpositionofXaxis.
Alsodefinesdwelltimeonsomemachines(insteadof"P"or"U").
Y
AbsoluteorincrementalpositionofYaxis
Z
AbsoluteorincrementalpositionofZaxis
Themainspindle'saxisofrotationoftendetermineswhichaxisofamachinetoolislabeledasZ.
ListofG-codescommonlyfoundon FANUC andsimilarlydesignedcontrols[edit]
Sources:
Smid2008;[1] Smid2010;[2] Greenetal.1996.[3]
Note:
Modal meansacodestaysineffectuntilreplaced,orcancelled,byanotherpermittedcode. Non-Modal meansitexecutesonlyonce.See,forexample,codesG09,G61&G64below.
Code
Description
Milling
(M)
Turning
(T)
Corollaryinfo
G00
Rapidpositioning
M
T
On2-or3-axismoves,G00(unlike G01)traditionallydoesnotnecessarilymoveinasinglestraightlinebetweenstartpointandendpoint.Itmoveseachaxisatitsmaxspeeduntilitsvectorisachieved.Shortervectorusuallyfinishesfirst(givensimilaraxisspeeds).Thismattersbecauseitmayyieldadog-legorhockey-stickmotion,whichtheprogrammerneedstoconsiderdependingonwhatobstaclesarenearby,toavoidacrash.Somemachinesofferinterpolatedrapidsasafeatureforeaseofprogramming(safetoassumeastraightline).
G01
Linearinterpolation
M
T
Themostcommonworkhorsecodeforfeedingduringacut.Theprogramspecsthestartandendpoints,andthecontrolautomaticallycalculates(interpolates)theintermediatepointstopassthroughthatwillyieldastraightline(hence"linear").Thecontrolthencalculatestheangularvelocitiesatwhichtoturntheaxisleadscrews viatheirservomotorsorsteppermotors.Thecomputerperformsthousandsofcalculationspersecond,andthemotorsreactquicklytoeachinput.Thustheactualtoolpathofthemachiningtakesplacewiththegivenfeedrateonapaththatisaccuratelylineartowithinverysmalllimits.
G02
Circularinterpolation,clockwise
M
T
VerysimilarinconcepttoG01.Again,thecontrol interpolates intermediatepointsandcommandstheservo-orsteppermotorstorotatetheamountneededfortheleadscrewtotranslatethemotiontothecorrecttooltippositioning.Thisprocessrepeatedthousandsoftimesperminutegeneratesthedesiredtoolpath.InthecaseofG02,theinterpolationgeneratesacircleratherthanaline.AswithG01,theactualtoolpathofthemachiningtakesplacewiththegivenfeedrateonapaththataccuratelymatchestheideal(inG02'scase,acircle)towithinverysmalllimits.Infact,theinterpolationissoprecise(whenallconditionsarecorrect)thatmillinganinterpolatedcirclecanobviateoperationssuchasdrilling,andoftenevenfineboring. Addressesforradiusorarccenter:
G02andG03takeeitheran R address(fortheradiusdesiredonthepart)or IJKaddresses(forthecomponentvectorsthatdefinethevectorfromthearcstartpointtothearccenterpoint).Cuttercomp:
Onmostcontrolsyoucannotstart G41 or G42 in G02 or G03 modes.Youmustalreadyhavecompensatedinanearlier G01 block.Oftenashortlinearlead-inmovementwillbeprogrammed,merelytoallowcuttercompensationbeforethemainevent,thecircle-cutting,begins. Fullcircles:
Whenthearcstartpointandthearcendpointareidentical,a360°arc,afullcircle,willbecut.(Someoldercontrolscannotsupportthisbecausearcscannotcrossbetweenquadrantsofthecartesiansystem.Instead,fourquarter-circlearcsareprogrammedback-to-back.)
G03
Circularinterpolation,counterclockwise
M
T
SamecorollaryinfoasforG02.
G04
Dwell
M
T
Takesanaddressfordwellperiod(maybe X, U,or P).Thedwellperiodisspecifiedbyacontrolparameter,typicallysetto milliseconds.SomemachinescanaccepteitherX1.0(s)orP1000(ms),whichareequivalent.Choosingdwellduration:
Oftenthedwellneedsonlytolastoneortwofullspindlerotations.Thisistypicallymuchlessthanonesecond.Beawarewhenchoosingadurationvaluethatalongdwellisawasteofcycletime.Insomesituationsitwon'tmatter,butforhigh-volumerepetitiveproduction(overthousandsofcycles),itisworthcalculatingtha
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数控 编程