版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
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. 人人文庫網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年煙度計(jì)合作協(xié)議書
- 2024年聚烯烴及改性材料項(xiàng)目發(fā)展計(jì)劃
- 2024年P(guān)VC抗沖改性型項(xiàng)目建議書
- 2024年恩施土家族苗族自治州建始縣四上數(shù)學(xué)期末監(jiān)測(cè)模擬試題含解析
- 幼兒園中班教案《蔬菜湯》含反思
- 2024年透射式電子顯微鏡項(xiàng)目發(fā)展計(jì)劃
- 2024年體育項(xiàng)目發(fā)展計(jì)劃
- 2024年達(dá)州市渠縣數(shù)學(xué)六上期末監(jiān)測(cè)試題含解析
- 2024年迭部縣三上數(shù)學(xué)期末綜合測(cè)試模擬試題含解析
- 2024年北海市合浦縣數(shù)學(xué)六上期末聯(lián)考模擬試題含解析
- 急診診療操作技術(shù)操作規(guī)范2023版
- 人教版三年級(jí)數(shù)學(xué)下冊(cè) 計(jì)算經(jīng)過的時(shí)間教學(xué)方案
- 節(jié)約糧食光盤行動(dòng)主題班會(huì)PPT模板
- 勞動(dòng)關(guān)系協(xié)調(diào)員(四級(jí))理論考試復(fù)習(xí)題庫(核心400題)
- 新疆喀什地區(qū)地直機(jī)關(guān)遴選公務(wù)員53人3筆試題庫含答案解析
- 六年級(jí)上冊(cè)科學(xué)全冊(cè)練習(xí)題(2023年新教科版)
- 中國慢性便秘診治指南
- 第二次世界大戰(zhàn)歐洲戰(zhàn)場(chǎng)
- 鼻腔沖洗護(hù)理技術(shù)護(hù)理團(tuán)體標(biāo)準(zhǔn)
- 義務(wù)教育體育與健康課程標(biāo)準(zhǔn)(2022年版)
- 中文自修杯美麗漢字小達(dá)人歷年真題(二到七屆)
評(píng)論
0/150
提交評(píng)論