版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
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等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 簡(jiǎn)單隨機(jī)抽樣課件好
- 家紡導(dǎo)購(gòu)專業(yè)知識(shí)培訓(xùn)課件
- 酒店物業(yè)管理服務(wù)合同三篇
- 社團(tuán)活動(dòng)對(duì)學(xué)生發(fā)展的影響計(jì)劃
- 秋季學(xué)期學(xué)生學(xué)習(xí)成果展示計(jì)劃
- 促肝細(xì)胞生長(zhǎng)素相關(guān)項(xiàng)目投資計(jì)劃書
- 前臺(tái)文員的個(gè)人發(fā)展規(guī)劃計(jì)劃
- 銷售心理學(xué)與客戶洞察培訓(xùn)
- 張緊裝置相關(guān)項(xiàng)目投資計(jì)劃書范本
- 輸尿管癌的護(hù)理查房
- 2024全固態(tài)電池產(chǎn)業(yè)研究:全固態(tài)電池即將迎來量產(chǎn)元年
- 【MOOC】大學(xué)英語綜合教程(中級(jí))-華中農(nóng)業(yè)大學(xué) 中國(guó)大學(xué)慕課MOOC答案
- 《小學(xué)單詞職業(yè)類》課件
- 24年一年級(jí)上冊(cè)語文期末復(fù)習(xí)21天沖刺計(jì)劃(每日5道題)
- 中資企業(yè)在哈薩克斯坦發(fā)展報(bào)告 2023-2024
- 《復(fù)雜網(wǎng)絡(luò)入門必讀》課件
- 傳感器基礎(chǔ)知識(shí)單選題100道及答案解析
- 總裁秘書勞動(dòng)合同模板
- 2023級(jí)《中國(guó)特色社會(huì)主義》學(xué)習(xí)通超星期末考試答案章節(jié)答案2024年
- 瑞士萬通831KF卡爾費(fèi)休水分測(cè)定儀干貨-庫(kù)侖法
- 廣東省肇慶市2023-2024學(xué)年高二上學(xué)期期末教學(xué)質(zhì)量檢測(cè)試題 化學(xué) 含解析
評(píng)論
0/150
提交評(píng)論