版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024至2030年单节文件柜项目投资价值分析报告
- 投标协议合同范例
- 窗帘店欠款合同范例
- 2024年铝合金三元变质剂项目可行性研究报告
- 转让造纸设备合同范例
- 复式公寓房屋买卖合同范例
- 砖厂销售砖合同范例
- 购销双方合同范例
- 林场承包出售合同范例
- 三年级数学(上)计算题专项练习附答案
- 总裁秘书劳动合同模板
- 2023级《中国特色社会主义》学习通超星期末考试答案章节答案2024年
- 瑞士万通831KF卡尔费休水分测定仪干货-库仑法
- 广东省肇庆市2023-2024学年高二上学期期末教学质量检测试题 化学 含解析
- 护理课件题目教学课件
- 国有企业重组整合研究-以A集团与B公司重组为例
- 2024年大学试题(法学)-知识产权法考试近5年真题集锦(频考类试题)带答案
- 2024北京海淀区高三二模语文试题及答案
- 2024年客运值班员(技师)职业鉴定理论考试题库(含答案)
- 中华民族现代文明有哪些鲜明特质?建设中华民族现代文明的路径是什么?参考答案
- 关于加强中小学生欺凌综合治理方案的实施办法
评论
0/150
提交评论