《數(shù)控應(yīng)用專業(yè)英語》課件第12章_第1頁
《數(shù)控應(yīng)用專業(yè)英語》課件第12章_第2頁
《數(shù)控應(yīng)用專業(yè)英語》課件第12章_第3頁
《數(shù)控應(yīng)用專業(yè)英語》課件第12章_第4頁
《數(shù)控應(yīng)用專業(yè)英語》課件第12章_第5頁
已閱讀5頁,還剩54頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(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ì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論