机械工程毕业设计外文翻译自动化制造系统与PLCWord格式文档下载.docx
《机械工程毕业设计外文翻译自动化制造系统与PLCWord格式文档下载.docx》由会员分享,可在线阅读,更多相关《机械工程毕业设计外文翻译自动化制造系统与PLCWord格式文档下载.docx(23页珍藏版)》请在冰豆网上搜索。
2.1INTRODUCTION
Controlengineeringhasevolvedovertime.Inthepasthumanswerethemainmethodforcontrollingasystem.Morerecentlyelectricityhasbeenusedforcontrolandearlyelectricalcontrolwasbasedonrelays.Theserelaysallowpowertobeswitchedonandoffwithoutamechanicalswitch.Itiscommontouserelaystomakesimplelogicalcontroldecisions.Thedevelopmentoflowcostcomputerhasbroughtthemostrecentrevolution,theProgrammableLogicController(PLC).TheadventofthePLCbeganinthe1970s,andhasbecomethemostcommonchoiceformanufacturingcontrols.
PLCshavebeengainingpopularityonthefactoryfloorandwillprobablyremainpredominantforsometimetocome.Mostofthisisbecauseoftheadvantagestheyoffer.
•Costeffectiveforcontrollingcomplexsystems.
•Flexibleandcanbereappliedtocontrolothersystemsquicklyandeasily.
•Computationalabilitiesallowmoresophisticatedcontrol.
•Troubleshootingaidsmakeprogrammingeasierandreducedowntime.
•Reliablecomponentsmaketheselikelytooperateforyearsbeforefailure.
2.1.1Ladderlogic
LadderlogicisthemainprogrammingmethodusedforPLCs.Asmentionedbefore,ladderlogichasbeendevelopedtomimicrelaylogic.logicdiagramswasastrategicone.Byselectingladderlogicasthemainprogrammingmethod,theamountofretrainingneededforengineersandtradespeoplewasgreatlyreduced.
Moderncontrolsystemsstillincluderelays,butthesearerarelyusedforlogic.Arelayisasimpledevicethatusesamagneticfieldtocontrolaswitch,aspicturedinFigure2.1.Whenavoltageisappliedtotheinputcoil,theresultingcurrentcreatesamagneticfield.Themagneticfieldpullsametalswitch(orreed)towardsitandthecontactstouch,closingtheswitch.Thecontactthatcloseswhenthecoilisenergizediscallednormallyopen.Thenormallyclosedcontactstouchwhentheinputcoilisnotenergized.Relaysarenormallydrawninschematicformusingacircletorepresenttheinputcoil.Theoutputcontactsareshownwithtwoparallellines.Normallyopencontactsareshownastwolines,andwillbeopen(non-conducting)whentheinputisnotenergized.Normallyclosedcontactsareshownwithtwolineswithadiagonallinethroughthem.Whentheinputcoilisnotenergizedthenormallyclosedcontactswillbeclosed(conducting).
Figure2.1SimpleRelayLayoutsandSchematics
Relaysareusedtoletonepowersourcecloseaswitchforanother(oftenhighcurrent)powersource,whilekeepingthemisolated.AnexampleofarelayinasimplecontrolapplicationisshowninFigure2.2.Inthissystemthefirstrelayontheleftisusedasnormallyclosed,andwillallowcurrenttoflowuntilavoltageisappliedtotheinputA.ThesecondrelayisnormallyopenandwillnotallowcurrenttoflowuntilavoltageisappliedtotheinputB.Ifcurrentisflowingthroughthefirsttworelaysthencurrentwillflowthroughthecoilinthethirdrelay,andclosetheswitchforoutputC.Thiscircuitwouldnormallybedrawnintheladderlogicform.ThiscanbereadlogicallyasCwillbeonifAisoffandBison.
Figure2.2ASimpleRelayController
TheexampleinFigure2.2doesnotshowtheentirecontrolsystem,butonlythelogic.WhenweconsideraPLCthereareinputs,outputs,andthelogic.Figure2.3showsamorecompleterepresentationofthePLC.Heretherearetwoinputsfrompushbuttons.Wecanimaginetheinputsasactivating24VDCrelaycoilsinthePLC.Thisinturndrivesanoutputrelaythatswitches115VAC,thatwillturnonalight.Note,inactualPLCsinputsareneverrelays,butoutputsareoftenrelays.TheladderlogicinthePLCisactuallyacomputerprogramthattheusercanenterandchange.Noticethatbothoftheinputpushbuttonsarenormallyopen,buttheladderlogicinsidethePLChasonenormallyopencontact,andonenormallyclosedcontact.DonotthinkthattheladderlogicinthePLCneedsomatchtheinputsoroutputs.Manybeginnerswillgetcaughttryingtomaketheladderlogicmatchtheinputtypes.
Figure2.3APLCIllustratedWithRelays
Manyrelaysalsohavemultipleoutputs(throws)andthisallowsanoutputrelaytoalsobeaninputsimultaneously.ThecircuitshowninFigure1.4isanexampleofthis,itiscalledasealincircuit.Inthiscircuitthecurrentcanflowthrougheitherbranchofthecircuit,throughthecontactslabelledAorB.TheinputBwillonlybeonwhentheoutputBison.IfBisoff,andAisenergized,thenBwillturnon.IfBturnsonthentheinputBwillturnon,andkeepoutputBonevenifinputAgoesoff.AfterBisturnedontheoutputBwillnotturnoff.
Figure2.4ASeal-inCircuit
2.1.2Programming
ThefirstPLCswereprogrammedwithatechniquethatwasbasedonrelaylogicwiringschematics.Thiseliminatedtheneedtoteachtheelectricians,techniciansandengineershowtoprogramacomputer-but,thismethodhasstuckanditisthemostcommontechniqueforprogrammingPLCstoday.AnexampleofladderlogiccanbeseeninFigure2.5.Tointerpretthisdiagramimaginethatthepowerisontheverticallineonthelefthandside,wecallthisthehotrail.Ontherighthandsideistheneutralrail.Inthefiguretherearetworungs,andoneachrungtherearecombinationsofinputs(twoverticallines)andoutputs(circles).Iftheinputsareopenedorclosedintherightcombinationthepowercanflowfromthehotrail,throughtheinputs,topowertheoutputs,andfinallytotheneutralrail.Aninputcancomefromasensor,switch,oranyothertypeofsensor.AnoutputwillbesomedeviceoutsidethePLCthatisswitchedonoroff,suchaslightsormotors.Inthetoprungthecontactsarenormallyopenandnormallyclosed.WhichmeansifinputAisonandinputBisoff,thenpowerwillflowthroughtheoutputandactivateit.AnyothercombinationofinputvalueswillresultintheoutputXbeingoff.
Figure2.5ASimpleLadderLogicDiagram
ThesecondrungofFigure2.5ismorecomplex,thereareactuallymultiplecombinationsofinputsthatwillresultintheoutputYturningon.Ontheleftmostpartoftherung,powercouldflowthroughthetopifCisoffandDison.Powercouldalso(andsimultaneously)flowthroughthebottomifbothEandFaretrue.Thiswouldgetpowerhalfwayacrosstherung,andthenifGorHistruethepowerwillbedeliveredtooutputY.Inlaterchapterswewillexaminehowtointerpretandconstructthesediagrams.
ThereareothermethodsforprogrammingPLCs.Oneoftheearliesttechniquesinvolvedmnemonicinstructions.TheseinstructionscanbederiveddirectlyfromtheladderlogicdiagramsandenteredintothePLCthroughasimpleprogrammingterminal.AnexampleofmnemonicsisshowninFigure2.6.Inthisexampletheinstructionsarereadonelineatatimefromtoptobottom.Thefirstline00000hastheinstructionLDN(inputloadandnot)forinputA..ThiswillexaminetheinputtothePLCandifitisoffitwillremembera1(ortrue),ifitisonitwillremembera0(orfalse).ThenextlineusesanLD(inputload)statementtolookattheinput.Iftheinputisoffitremembersa0,iftheinputisonitremembersa1(note:
thisisthereverseoftheLD).TheANDstatementrecallsthelasttwonumbersrememberedandifthearebothtruetheresultisa1,otherwisetheresultisa0.Thisresultnowreplacesthetwonumbersthatwererecalled,andthereisonlyonenumberremembered.Theprocessisrepeatedforlines00003and00004,butwhenthesearedonetherearenowthreenumbersremembered.TheoldestnumberisfromtheAND,thenewernumbersarefromthetwoLDinstructions.TheANDinline00005combinestheresultsfromthelastLDinstructionsandnowtherearetwonumbersremembered.TheORinstructiontakesthetwonumbersnowremainingandifeitheroneisa1theresultisa1,otherwisetheresultisa0.Thisresultreplacesthetwonumbers,andthereisnowasinglenumberthere.ThelastinstructionistheST(storeoutput)thatwilllookatthelastvaluestoredandifitis1,theoutputwillbeturnedon,ifitis0theoutputwillbeturnedoff.
Figure2.6AnExampleofaMnemonicProgramandEquivalentLadderLogic
TheladderlogicprograminFigure2.6,isequivalenttothemnemonicprogram.EvenifyouhaveprogrammedaPLCwithladderlogic,itwillbeconvertedtomnemonicformbeforebeingusedbythePLC.Inthepastmnemonicprogrammingwasthemostcommon,butnowitisuncommonforuserstoevenseemnemonicprograms.
SequentialFunctionCharts(SFCs)havebeendevelopedtoaccommodatetheprogrammingofmoreadvancedsystems.Thesearesimilartoflowcharts,butmuchmorepowerful.TheexampleseeninFigure2.7isdoingtwodifferentthings.Toreadthechart,startatthetopwhereissaysstart.Belowthisthereisthedoublehorizontallinethatsaysfollowbothpaths.AsaresultthePLCwillstarttofollowthebranchontheleftandrighthandsidesseparatelyandsimultaneously.Onthelefttherearetwofunctionsthefirstoneisthepowerupfunction.Thisfunctionwillrununtilitdecidesitisdone,andthepowerdownfunctionwillcomeafter.Ontherighthandsideistheflashfunction,thiswillrununtilitisdone.Thesefunctionslookunexplained,buteachfunction,suchaspowerupwillbeasmallladderlogicprogram.Thismethodismuchdifferentfromflowchartsbecauseitdoesnothavetofollowasinglepaththroughtheflowchart..
Figure2.7AnExampleofaSequentialFunctionChar
StructuredTextprogramminghasbeendevelopedasamoremodernprogramminglanguage.ItisquitesimilartolanguagessuchasBASIC.AsimpleexampleisshowninFigure2.8