关于PLC的英文文献.docx
《关于PLC的英文文献.docx》由会员分享,可在线阅读,更多相关《关于PLC的英文文献.docx(8页珍藏版)》请在冰点文库上搜索。
关于PLC的英文文献
关于PLC的英文文献
1.PROGRAMMABLELOGICCONTROLLERS
1.1INTRODUCTION
Controlengineeringhasevolvedovertime.Inthepasthumanswasthemainmethodforcontrollingasystem.Morerecentlyelectricityhasbeenusedforcontrolandearlyelectricalcontrolwasbasedonrelays.Theserelaysallowpowertobeswitchedonandoffwithoutamechanicalswitch.Itiscommontouserelaystomakesimplelogicalcontroldecisions.Thedevelopmentoflowcostcomputerhasbroughtthemostrecentrevolution,theProgrammableLogicController(PLC).TheadventofthePLCbeganinthe1970s,andhasbecomethemostcommonchoiceformanufacturingcontrols.PLChavebeengainingpopularityonthefactoryfloorandwillprobablyremainpredominantforsometimetocome.Mostofthisisbecauseoftheadvantagestheyoffer..Costeffectiveforcontrollingcomplexsystems.
.Flexibleandcanbereappliedtocontrolothersystemsquicklyandeasily.
.Computationalabilitiesallowmoresophisticatedcontrol..Troubleshootingaidsmakeprogrammingeasierandreducedowntime..Reliablecomponentsmaketheselikelytooperateforyearsbeforefailure.
1.2LadderLogic
LadderlogicisthemainprogrammingmethodusedforPLC.Asmentionedbefore,ladderlogichasbeendevelopedtomimicrelaylogic.Thedecisiontousetherelaylogicdiagramswasastrategicone.Byselectingladderlogicasthemainprogrammingmethod,theamountofretrainingneededforengineersandtradespeoplewasgreatlyreduced.Moderncontrolsystemsstillincluderelays,butthesearerarelyusedforlogic.Arelayisasimpledevicethatusesamagneticfieldtocontrolaswitch,aspicturedinFigure2.1.Whenavoltageisappliedtotheinputcoil,theresultingcurrentcreatesamagneticfield.Themagneticfield
pullsametalswitch(orreed)towardsitandthecontactstouch,closingtheswitch.Thecontactthatcloseswhenthecoilisenergizediscallednormallyopen.Thenormallyclosedcontactstouchwhentheinputcoilisnotenergized.Relaysarenormallydrawninschematicformusingacircletorepresenttheinputcoil.Theoutputcontactsareshownwithtwoparallellines.Normallyopencontactsareshownastwolines,andwillbeopen(non-conducting)whentheinputisnotenergized.Normallyclosedcontactsareshownwithtwolineswithadiagonallinethroughthem.Whentheinputcoilisnotenergizedthenormallyclosedcontactswillbeclosed(conducting).
Relaysareusedtoletonepowersourcecloseaswitchforanother(oftenhighcurrent)powersource,whilekeepingthemisolated.AnexampleofarelayinasimplecontrolapplicationisshowninFigure2.2.Inthissystemthefirstrelayontheleftisusedasnormallyclosed,andwillallowcurrenttoflowuntilavoltageisappliedtotheinputA.Thesecondrelayisnormallyopenandwillnotallowcurrenttoflowuntila
voltageisappliedtotheinputB.Ifcurrentisflowingthroughthefirsttworelaysthencurrentwillflowthroughthecoilinthethirdrelay,andclosetheswitchforoutputC.Thiscircuitwouldnormallybedrawnintheladderlogicform.ThiscanbereadlogicallyasCwillbeonifAisoffandBison.
1.3Programming
ThefirstPLCwereprogrammedwithatechniquethatwasbasedonrelaylogicwiringschematics.Thiseliminatedtheneedtoteachtheelectricians,techniciansandengineershowtoprogramacomputer-but,thismethodhasstuckanditisthemostcommontechniqueforprogrammingPLCtoday.AnexampleofladderlogiccanbeseeninFigure2.5.Tointerpretthisdiagramimaginesthatthepowerisontheverticallineonthelefthandside,wecallthisthehotrail.Ontherighthandsideistheneutralrail.Inthefiguretherearetworungs,andoneachrungtherearecombinationsofinputs(twoverticallines)and
outputs(circles).Iftheinputsareopenedorclosedintherightcombinationthepowercanflowfromthehotrail,throughtheinputs,topowertheoutputs,andfinallytotheneutralrail.Aninputcancomefromasensor,switch,oranyothertypeofsensor.AnoutputwillbesomedeviceoutsidethePLCthatisswitchedonoroff,suchaslightsormotors.Inthetoprungthecontactsarenormallyopenandnormallyclosed,whichmeansifinputAisonandinputBisoff,thenpowerwillflowthroughtheoutputandactivateit.AnyothercombinationofinputvalueswillresultintheoutputXbeingoff.
ThesecondrungofFigure2.5ismorecomplex,thereareactuallymultiplecombinationsofinputsthatwillresultintheoutputYturningon.Ontheleftmostpartoftherung,powercouldflowthroughthetopifCisoffandDison.Powercouldalso(andsimultaneously)flowthroughthebottomifbothEandFaretrue.Thiswouldgetpowerhalfwayacrosstherung,andthenifGorHistruethepowerwillbedeliveredtooutputY.Inlaterchapterswewillexaminehowtointerpretandconstructthesediagrams.ThereareothermethodsforprogrammingPLC.Oneoftheearliesttechniquesinvolvedmnemonicinstructions.
TheseinstructionscanbederiveddirectlyfromtheladderlogicdiagramsandenteredintothePLCthroughasimpleprogrammingterminal.AnexampleofmnemonicsisshowninFigure2.6.Inthisexampletheinstructionsarereadonelineatatimefromtoptobottom.Thefirstline00000hastheinstructionLDN(inputloadandnot)forinput00001.ThiswillexaminetheinputtothePLCandifitisoffitwillremembera1(ortrue),ifitisonitwillremembera0(orfalse).ThenextlineusesanLD(inputload)statementtolookattheinput.Iftheinputisoffitremembersa0,iftheinputisonitremembersa1(note:
thisisthereverseoftheLD).TheANDstatementrecallsthelasttwonumbersrememberedandiftheyarebothtruetheresultisa1;otherwisetheresultisa0.Thisresultnowreplacesthetwonumbersthatwererecalled,andthereisonlyonenumberremembered.Theprocessisrepeatedforlines00003and00004,butwhenthesearedonetherearenowthreenumbersremembered.TheoldestnumberisfromtheAND,thenewernumbersarefromthetwoLDinstructions.TheANDinline00005combinestheresultsfromthelastLDinstructionsandnowtherearetwonumbersremembered.TheORinstructiontakesthetwonumbersnowremainingandifeitheroneisa1theresultisa1,otherwisetheresultisa0.Thisresultreplacesthetwonumbers,andthereisnowasinglenumberthere.ThelastinstructionistheST(storeoutput)thatwilllookatthelastvaluestoredandifitis1,theoutputwillbeturnedon;ifitis0theoutputwillbeturnedoff.
TheladderlogicprograminFigure2.6,isequivalenttothemnemonicprogram.EvenifyouhaveprogrammedaPLCwithladderlogic,itwillbeconvertedtomnemonicformbeforebeingusedbythePLC.Inthepastmnemonicprogrammingwasthemostcommon,butnowitisuncommonforuserstoevenseemnemonicprograms.
SequentialFunctionCharts(SFC)havebeendevelopedto
accommodatetheprogrammingofmoreadvancedsystems.Thesearesimilartoflowcharts,butmuchmorepowerful.TheexampleseeninFigure2.7isdoingtwodifferentthings.Toreadthechart,startatthetopwhereissaysstart.Belowthisthereisthedoublehorizontallinethatsaysfollowbothpaths.AsaresultthePLCwillstarttofollowthebranchontheleftandrighthandsidesseparatelyandsimultaneously.Onthelefttherearetwofunctionsthefirstoneisthepowerupfunction.Thisfunctionwillrununtilitdecidesitisdone,andthepowerdownfunctionwillcomeafter.Ontherighthandsideistheflashfunction;thiswillrununtilitisdone.Thesefunctionslookunexplained,buteachfunction,suchaspowerupwillbeasmallladderlogicprogram.Thismethodismuchdifferentfromflowchartsbecauseitdoesnothavetofollowasingle
paththroughthe
flowchart.
StructuredTextprogramminghasbeendevelopedasamoremodernprogramminglanguage.ItisquitesimilartolanguagessuchasBASIC.AsimpleexampleisshowninFigure2.8.ThisexampleusesaPLCmemorylocationN7:
0.Thismemorylocationisforaninteger,aswillbeexplainedlaterinthebook.Thefirstlineoftheprogramsetsthevalueto0.Thenextlinebeginsaloop,andwillbewheretheloopreturnsto.ThenextlinerecallsthevalueinlocationN7:
0,adds1toitandreturnsittothesamelocation.Thenextlinecheckstoseeiftheloopshouldquit.IfN7:
0isgreaterthanorequalto10,thentheloopwillquit,otherwisethecomputerwillgobackuptotheREPEATstatementcontinuefromthere.EachtimetheprogramgoesthroughthisloopN7:
0willincreaseby1untilthevaluereaches10.
N7:
0:
=0;
REPEAT
N7:
0:
=N7:
0+1;
UNTILN7:
0>=10
END_REPEAT;
2.PLCConnections
WhenaprocessiscontrolledbyaPLCitusesinputsfrom
sensorstomakedecisionsandupdateoutputstodriveactuators,as
showninFigure2.9.Theprocessisarealprocessthatwillchange
overtime.Actuatorswilldrivethesystemtonewstates(ormodes
ofoperation).Thismeansthatthecontrollerislimitedbythe
sensorsavailable,ifaninputisnotavailable,thecontrollerwillhave
nowaytodetectacondition.
ThecontrolloopisacontinuouscycleofthePLCreadinginputs,solvingtheladderlogic,andthenchangingtheoutputs.Likeanycomputerthisdoesnothappeninstantly.Figure2.10showsthebasicoperationcycleofaPLC.WhenpoweristurnedoninitiallythePLCdoesaquicksanitychecktoensurethatthehardwareisworkingproperly.IfthereisaproblemthePLCwillhaltandindicatethereisanerror.Forexample,ifthePLCbackupbatteryislowandpowerwaslost,thememorywillbecorruptandthiswillresultinafault.IfthePLCpassesthesanitychecksitwillthenscan(read)all