![《数控应用专业英语》课件第12章_第1页](http://file4.renrendoc.com/view12/M07/24/30/wKhkGWbHNlWAN0TSAAD4XhkqqFk218.jpg)
![《数控应用专业英语》课件第12章_第2页](http://file4.renrendoc.com/view12/M07/24/30/wKhkGWbHNlWAN0TSAAD4XhkqqFk2182.jpg)
![《数控应用专业英语》课件第12章_第3页](http://file4.renrendoc.com/view12/M07/24/30/wKhkGWbHNlWAN0TSAAD4XhkqqFk2183.jpg)
![《数控应用专业英语》课件第12章_第4页](http://file4.renrendoc.com/view12/M07/24/30/wKhkGWbHNlWAN0TSAAD4XhkqqFk2184.jpg)
![《数控应用专业英语》课件第12章_第5页](http://file4.renrendoc.com/view12/M07/24/30/wKhkGWbHNlWAN0TSAAD4XhkqqFk2185.jpg)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
12PROGRAMCONFIGULATION
12.1PROGRAMCOMPONENTSOTHERTHAN
PROGRAMSECTIONS12.2PROGRAMSECTIONCONFIGURATION12.3SUBPROGRAMGeneral·Mainprogramandsubprogram
Therearetwoprogramtypes,mainprogramandsubprogram.Normally,theCNCoperatesaccordingtothemainprogram.However,whenacommandcallingasubprogramisencounteredinthemainprogram,controlispassedtothesubprogram.Whenacommandspecifyingareturntothemainprogramisencounteredinasubprogram,controlisreturnedtothemainprogram.Fig.12.0(a)MainprogramandSubprogram
TheCNCmemorycanholdupto400mainprogramsandsubprograms(63asstandard).Amainprogramcanbeselectedfromthestoredmainprogramstooperatethemachine.Seesection9.3orsection10forthemethodsofregisteringandselectingprograms.·Programcomponents
Aprogramconsistsofthefollowingcomponents.Fig.12.0(b)Programconfiguration·Programsectionconfiguration
Aprogramsectionconsistsofseveralblocks.Aprogramsectionstartswithaprogramnumberandendswithaprogramendcode.
Ablockcontainsinformationnecessaryformachining,suchasamovecommandorcoolanton/offcommand.Specifyingaslash(/)atthestartofablockdisablestheexecutionofsomeblocks.12.1PROGRAMCOMPONENTSOTHERTHANPROGRAMSECTIONS
Thissectiondescribesprogramcomponentsotherthanprogramsections.Seesection12.2foraprogramsection.Explanations·Tapestart
ThetapestartindicatesthestartofafilethatcontainsNCprograms.
ThemarkisnotrequiredwhenprogramsareenteredusingSYSTEMPorordinarypersonalcomputers.ThemarkisnotdisplayedontheCRTdisplayscreen.
However,ifthefileisoutput,themarkisautomaticallyoutputatthestartofthefile.
·Leadersection
Dataenteredbeforetheprogramsinafileconstitutesaleadersection.
Whenmachiningisstarted,thelabelskipstateisusuallysetbyturningonthepowerorresettingthesystem.Inthelabelskipstate,allinformationisignoreduntilthefirstendofblockcodeisread.WhenafileisreadintotheCNCunitfromanI/Odevice,leadersectionsareskippedbythelabelskipfunction.
Aleadersectiongenerallycontainsinformationsuchasafileheader.
Whenaleadersectionisskipped,evenaTVparitycheckisnotmade.SoaleadersectioncancontainanycodesexcepttheEOBcode.·Programstart
Theprogramstartcodeistobeenteredimmediatelyafteraleadersection,thatis,immediatelybeforeaprogramsection.Thiscodeindicatesthestartofaprogram,andisalwaysrequiredtodisablethelabelskipfunction.
WithSYSTEMPorordinarypersonalcomputers,thiscodecanbeenteredbypressingthereturnkey.NOTE
Ifonefilecontainsmultipleprograms,theEOBcodeforlabelskipoperationmustnotappearbeforeasecondorsubsequentprogramnumber.·Commentsection
Anyinformationenclosedbythecontroloutandcontrolincodesisregardedasacomment.
Theusercanenteraheader,comments,directionstotheoperator,etc.inacommentsectionusingtheEOBcodeoranyothercode.
Whenaprogramisreadintomemoryformemoryoperation,commentsections,ifany,arenotignoredbutarealsoreadintomemory.Note,however,thatcodesotherthanthoselistedinthecodetableinAppendixAareignored,andthusarenotreadintomemory.
WhendatainmemoryisoutputonexternalI/Odevice,thecommentsectionsarealsooutput.
Whenaprogramisdisplayedonthescreen,itscommentsectionsarealsodisplayed.However,thosecodesthatwereignoredwhenreadintomemoryarenotoutputordisplayed.
DuringmemoryoperationorDNCoperation,allcommentsectionsareignored.
TheTVcheckfunctioncanbeusedforacommentsectionbysettingparameterCTV(bit1ofNo.0100).CAUTION
Ifalongcommentsectionappearsinthemiddleofaprogramsection,amovealonganaxismaybesuspendedforalongtimebecauseofsuchacommentsection.Soacommentsectionshouldbeplacedwheremovementsuspensionmayoccurornomovementisinvolved.NOTE
Ifonlyacontrolincodeisreadwithnomatchingcontroloutcode,thereadcontrolincodeisignored.·Tapeend
AtapeendistobeplacedattheendofafilecontainingNCprograms.
Ifprogramsareenteredusingtheautomaticprogrammingsystem,themarkneednotbeentered.
ThemarkisnotdisplayedontheCRTdisplayscreen.However,whenafileisoutput,themarkisautomaticallyoutputattheendofthefile.
Ifanattemptismadetoexecute%whenM02orM03isnotplacedattheendoftheprogram,theP/Salarm(No.5010)isoccurred.12.2PROGRAMSECTIONCONFIGURATION
Thissectiondescribeselementsofaprogramsection.Fig.12.2(a)Programconfiguration·Programnumber
AprogramnumberconsistingofaddressOfollowedbyafourdigitnumberisassignedtoeachprogramatthebeginningregisteredinmemorytoidentifytheprogram.
InISOcode,thecolon(:)canbeusedinsteadofO.
Whennoprogramnumberisspecifiedatthestartofaprogram,thesequencenumberatthestartoftheprogramisregardedasitsprogramnumber.Ifafivedigitsequencenumberisused,thelowerfourdigitsareregisteredasaprogramnumber.Ifthelowerfourdigitsareall0,theprogramnumberregisteredimmediatelybeforeaddedto1isregisteredasaprogramnumber.Note,however,thatN0cannotbeusedforaprogramnumber.
Ifthereisnoprogramnumberorsequencenumberatthestartofaprogram,aprogramnumbermustbespecifiedusingtheCRT/MDIpanelwhentheprogramisstoredinmemory.NOTE
Programnumbers8000to9999maybeusedbymachinetoolbuilders,andtheusermaynotbeabletousethesenumbers.·Sequencenumberandblock
Aprogramconsistsofseveralcommands.Onecommandunitiscalledablock.OneblockisseparatedfromanotherwithanEOBofendofblockcode.
Attheheadofablock,asequencenumberconsistingofaddressNfollowedbyanumbernotlongerthanfivedigits(1to99999)canbeplaced.Sequencenumberscanbespecifiedinarandomorder,andanynumberscanbeskipped.Sequencenumbersmaybespecifiedforallblocksoronlyfordesiredblocksoftheprogram.Ingeneral,however,itisconvenienttoassignsequencenumbersinascendingorderinphasewiththemachiningsteps.(Forexample,whenanewtoolisusedbytoolreplacement,andmachiningproceedstoanewsurfacewithtableindexing.)
Sequencenumberandblock(example):N300X200.0Z300.0;AsequencenumberisunderlinedNOTE
N0mustnotbeusedforthereasonoffilecompatibilitywithotherCNCsystems.
Programnumber0cannotbeused.So0mustnotbeusedforasequencenumberregardedasaprogramnumber.·TVcheck(Verticalparitycheckalongtape)
Aparitycheckismadeforablockoninputtapevertically.Ifthenumberofcharactersinoneblock(startingwiththecodeimmediatelyafteranEOBandendingwiththenextEOB)isodd,anP/Salarm(No.002)isoutput.NoTVcheckismadeonlyforthosepartsthatareskippedbythelabelskipfunction.Bit1(CTV)ofparameterNo.0100isusedtospecifywhethercommentsenclosedinparenthesesarecountedascharactersduringTVcheck.TheTVcheckfunctioncanbeenabledordisabledbysettingontheMDIunit.·Blockconfiguration(Wordandaddress)
Ablockconsistsofoneormorewords.Awordconsistsofanaddressfollowedbyanumbersomedigitslong.(Theplussign(+)orminussign(-)maybeprefixedtoanumber.)Word=Address+number(Example:X-1000)
Foranaddress,oneoftheletters(AtoZ)isused;anaddressdefinesthemeaningofanumberthatfollowstheaddress.Table12.6indicatestheusableaddressesandtheirmeanings.
Thesameaddressmayhavedifferentmeanings,dependingonthepreparatoryfunctionspecification.NOTE
InISOcode,thecolon(:)canalsobeusedastheaddressofaprogramnumber.Fig.12.2(b)1block(example)
·Majoraddressesandrangesofcommandvalues
Majoraddressesandtherangesofvaluesspecifiedfortheaddressesareshownbelow.NotethatthesefiguresrepresentlimitsontheCNCside,whicharetotallydifferentfromlimitsonthemachinetoolside.Forexample,theCNCallowsatooltotraverseuptoabout100m(inmillimeterinput)alongtheXaxis.
However,anactualstrokealongtheXaxismaybelimitedto2mforaspecificmachinetool.
Similarly,theCNCmaybeabletocontrolacuttingfeedrateofupto240m/min,butthemachinetoolmaynotallowmorethan3m/min.Whendevelopingaprogram,theusershouldcarefullyreadthemanualsofthemachinetoolaswellasthisbooktobefamiliarwiththerestrictionsonprogramming.NOTE
InISOcode,thecolon(:)canalsobeusedastheaddressofaprogramnumber.·Optionalblockskip
Whenaslashfollowedbyanumber(/n(n=1to9))isspecifiedattheheadofablock,andoptionalblockskipswitchnonthemachineoperatorpanelissettoon,theinformationcontainedintheblockforwhich/ncorrespondingtoswitchnumbernisspecifiedisignoredinDNCoperationormemoryoperation.
Whenoptionalblockskipswitchnissettooff,theinformationcontainedintheblockforwhich/nisspecifiedisvalid.Thismeansthattheoperatorcandeterminewhethertoskiptheblockcontaining/n.
Number1for/1canbeomitted.However,whentwoormoreoptionalblockskipswitchesareusedforoneblock,number1for/1cannotbeomitted.
Example:
(Incorrect)(Correct)//3G00X10.0;/1/3G00X10.0;
Thisfunctionisignoredwhenprogramsareloadedintomemory.Blockscontaining/narealsostoredinmemory,regardlessofhowtheoptionalblockskipswitchisset.Programsheldinmemorycanbeoutput,regardlessofhowtheoptionalblockskipswitchesareset.
Optionalblockskipiseffectiveevenduringsequencenumbersearchoperation.
Dependingonthemachinetool,alloptionalblockskipswitches(1to9)maynotbeusable.Refertomanualsofthemachinetoolbuildertofindwhichswitchesareusable.WARNING
Ⅰ.Positionofaslash
Aslash(/)mustbespecifiedattheheadofablock.Ifaslashisplacedelsewhere,theinformationfromtheslashtoimmediatelybeforetheEOBcodeisignored.
Ⅱ.Disablinganoptionalblockskipswitch
Optionalblockskipoperationisprocessedwhenblocksarereadfrommemoryortapeintoabuffer.NOTETVandTHcheck
Whenanoptionalblockskipswitchison.THandTVchecksaremadefortheskippedportionsinthesamewayaswhentheoptionalblockskipswitchisoff.·Programend
Theendofaprogramisindicatedbyprogrammingoneofthefollowingcodesattheendoftheprogram.
Ifoneoftheprogramendcodesisexecutedinprogramexecution,theCNCterminatestheexecutionoftheprogram,andtheresetstateisset.Whenthesubprogramendcodeisexecuted,controlreturnstotheprogramthatcalledthesubprogram.WARNING
Ablockcontaininganoptionalblockskipcodesuchas/M02;,/M30;,or/M99;isnotregardedastheendofaprogram,iftheoptionalblockskipswitchonthemachineoperator’spanelissettoon.
(See“·Optionalblockskip”.)12.3SUBPROGRAM
Ifaprogramcontainsafixedsequenceorfrequentlyrepeatedpattern,suchasequenceorpatterncanbestoredasasubprograminmemorytosimplifytheprogram.
Asubprogramcanbecalledfromthemainprogram.
Acalledsubprogramcanalsocallanothersubprogram.Format·SubprogramconfigurationFig.12.3(a)Subprogramconfiguration·SubprogramcallFig.12.3(b)SubprogramcallExplanations
Whenthemainprogramcallsasubprogram,itisregardedasaonelevelsubprogramcall.Thus,subprogramcallscanbenesteduptofourlevelsasshownbelow.Fig.12.3(c)Subprogramcallrepeatedly
Asinglecallcommandcanrepeatedlycallasubprogramupto999times.
Forcompatibilitywithautomaticprogrammingsystems,inthefirstblock,NxxxxcanbeusedinsteadofasubprogramnumberthatfollowsO(or:).AsequencenumberafterNisregisteredasasubprogramnumber.·Reference
SeeChapter10forthemethodofregisteringasubprogram.NOTE
(ⅰ)TheM98andM99codesignalandstrobesignalarenotoutputtothemachinetool.
(ⅱ)IfthesubprogramnumberspecifiedbyaddressPcannotbefound,analarm(No.078)isoutput.Examples·M98P51002;
Thiscommandspecifies“Callthesubprogram(number1002)fivetimesinsuccession.”Asubprogramcallcommand(M98P-)canbespecifiedinthesameblockasamovecommand.·X1000.0M98P1200;
Thisexamplecallsthesubprogram(number1200)afteranXmovement.·Executionsequenceofsubprogramscalledfromamain
program
Asubprogramcancallanothersubprograminthesamewayasamainprogramcallsasubprogram.Fig.12.3(d)ExecutionsequenceofsubprogramscalledfromamainprogramSpecialUsage·Specifyingthesequencenumberforthereturndestinationinthemainprogram
IfPisusedtospecifyasequencenumberwhenasubprogramisterminated,controldoesnotreturntotheblockafterthecallingblock,butreturnstotheblockwiththesequencenumberspecifiedbyP.Note,however,thatPisignoredifthemainprogramisoperatinginamodeotherthanmemoryoperationmode.
Thismethodconsumesamuchlongertimethanthenormalreturnmethodtoreturntothemainprogram.Fig.12.3(e)Returntothemainprogram·UsingM99inthemainprogram
IfM99isexecutedinamainprogram,controlreturnstothestartof
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年临时租赁合同样本(2篇)
- 2025年个人无抵押借款合同格式版(2篇)
- 2025年个人简单劳动合同常用版(4篇)
- 2025年临时聘用协议经典版(2篇)
- 2025年书面劳动合同(三篇)
- 2025年临时聘用协议简单版(三篇)
- 2025年二婚婚前协议参考样本(2篇)
- 2025年个人门面常用版房屋租赁合同(2篇)
- 北京市装修工程验收合同
- 产业升级渣土运输协议样本
- 化学选修4《化学反应原理》(人教版)全部完整PP课件
- 茶文化与茶健康教学课件
- 建筑公司工程财务报销制度(精选7篇)
- 降水预报思路和方法
- 工程设计方案定案表
- 虚位移原理PPT
- 初二物理弹力知识要点及练习
- QE工程师简历
- 辅音和辅音字母组合发音规则
- 2021年酒店餐饮传菜员岗位职责与奖罚制度
- 最新船厂机舱综合布置及生产设计指南
评论
0/150
提交评论