外文翻译--应用于电气系统的可编程序控制器.DOC
附录附录1Programmabledesignedforelectro-pneumaticsystemscontrollerThisprojectdealswiththestudyofelectro-pneumaticsystemsandtheprogrammablecontrollerthatprovidesaneffectiveandeasywaytocontrolthesequenceofthepneumaticactuatorsmovementandthestatesofpneumaticsystem.Theprojectofaspecificcontrollerforpneumaticapplicationsjointhestudyofautomationdesignandthecontrolprocessingofpneumaticsystemswiththeelectronicdesignbasedonmicrocontrollerstoimplementtheresourcesofthecontroller.1.IntroductionTheautomationsystemsthatuseelectro-pneumaticTechnologyareformedmainlybythreekindsofelements:actuatorsormotors,sensorsorbuttonsandcontrolelementslikevalves.Nowadays,mostofthecontrolelementsusedtoexecutethelogicofthesystemweresubstitutedbytheProgrammableLogicController(PLC).Sensorsandswitchesarepluggedasinputsandthedirectcontrolvalvesfortheactuatorsarepluggedasoutputs.Aninternalprogramexecutesallthelogicnecessarytothesequenceofthemovements,simulatesOthercomponentslikecounter,timerandcontrolthestatusofthesystem.WiththeuseofthePLC,theprojectwinsagility,becauseitispossibletocreateandsimulatethesystemasmanytimesasneeded.Therefore,timeCanbesaved,riskofmistakesreducedandcomplexitycanbeincreasedusingThesameelements.AconventionalPLC,thatispossibletofindonthemarketfrommanycompanies,offersmanyresourcestocontrolnotonlypneumaticsystems,butallkindsofsystemthatuseselectricalcomponents.ThePLCcanbeveryversatileandrobusttobeappliedinmanykindsapplicationofintheindustryorevensecuritysystemandautomationofbuildings.Becauseofthosecharacteristics,insomeapplicationsthePLCofferstomuchresourcesthatarenotevenusedtocontrolthesystem,electro-pneumaticsystemisoneofthiskindofapplication.TheuseofPLC,especiallyforsmallsizesystems,canbeveryexpensivefortheautomationproject.Analternativeinthiscaseistocreateaspecificcontrollerthatcanoffertheexactlysizeandresourcesthattheprojectneeds3,4.Thiscanbemadeusingmicrocontrollersasthebaseofthiscontroller.Thecontroller,basedonmicrocontroller,canbeveryspecificandadaptedtoonlyonekindofmachineoritcanworkasagenericcontrollerthatcanbeprogrammedasausualPLCandworkwithlogicthatcanbechanged.Allthesecharacteristicsdependonwhatisneededandhowmuchexperiencethedesignerhaswithdevelopinganelectroniccircuitandfirmwareformicrocontroller.Butthemainadvantageofdesignthecontrollerwiththemicrocontrolleristhatthedesignerhasthetotalknowledgeofhiscontroller,whichmakesitpossibletocontrolthesizeofthecontroller,changethecomplexityandtheapplicationofit.Itmeansthattheprojectgetsmoreindependencefromothercompanies,butatthesametimetheresponsibilityofthecontrolofthesystemstaysatthedesignerhands.2.Electro-pneumaticsystemOnautomationsystemonecanfindthreebasiccomponentsmentionedbefore,plusalogiccircuitthatcontrolsthesystem.Anadequatetechniqueisneededtoprojectthelogiccircuitandintegrateallthenecessarycomponentstoexecutethesequenceofmovementsproperly.Forasimpledirectsequenceofmovementanintuitivemethodcanbeused1,5,butforindirectormorecomplexsequencestheintuitioncangenerateaverycomplicatedcircuitandsignalmistakes.Itisnecessarytouseanothermethodthatcansavetimeoftheproject,makeacleancircuit,caneliminateoccasionalsignaloverlappingandredundantcircuits.Thepresentedmethodiscalledstep-by-steporalgorithmic1,5,itisvalidforpneumaticandelectro-pneumaticsystemsanditwasusedasabaseinthiswork.Themethodconsistsofdesigningthesystemsbasedonstandardcircuitsmadeforeachchangeonthestateoftheactuators,thesechangesarecalledsteps.Thefirstpartistodesignthosekindsofstandardcircuitsforeachstep,thenexttaskistolinkthestandardcircuitsandthelastpartistoconnectthecontrolelementsthatreceivesignalsfromsensors,switchesandthepreviousmovements,andgivetheairorelectricitytothesupplylinesofeachstep.InFigs.1and2thestandardcircuitsaredrawnforpneumaticandelectro-pneumaticsystem8.Itispossibletoseetherelationswiththepreviousandthenextsteps.3.Themethodappliedinsidethecontrollerheresultofthemethodpresentedbeforeisasequenceofmovementsoftheactuatorthatiswelldefinedbysteps.Itmeansthateachchangeonthepositionoftheactuatorsisanewstateofthesystemandthetransitionbetweenstatesiscalledstep.Thestandardcircuitdescribedbeforehelpsthedesignertodefinethestatesofthesystemsandtodefinetheconditiontoeachchangebetweenthestates.Intheendofthedesign,thesystemisdefinedbyasequencethatneverchancesandstatesthathavetheinputsandtheoutputswelldefined.Theinputsaretheconditionforthetransitionandtheoutputsaretheresultofthetransition.Alltheconfigurationofthosestepsstaysinsideofthemicrocontrollerandisexecutedthesamewayitwasdesigned.Thesequencesofstringsareprogrammedinsidethecontrollerwith5bytes;eachstringhastheconfigurationofonestepoftheprocessTherearetwobytesfortheinputs,onebytefortheoutputsandtwomorefortheotherconfigurationsandauxiliaryfunctionsofthestep.Afterprogramming,thissequenceofstringsissavedinsideofanon-volatilememoryofthemicrocontroller,sotheycanbereadandexecutedThecontrollertaskisnottoworkinthesamewayasaconventionalPLC,butthepurposeofitistobeanexampleofaversatilecontrollerthatisdesignforanspecificarea.AconventionalPLCprocessthecontrolofthesystemusingacyclewhereitmakesanimageoftheinputs,executealltheconditionsdefinedbytheconfigurationprogrammedinside,andthenupdatethestateoftheoutputs.Thiscontrollerworksinadifferentway,whereitreadtheconfigurationofthestep,waittheconditionofinputstobesatisfied,thenupdatethestateortheoutputsandafterthatjumptothenextstepandstarttheprocessagain.Itcangeneratesomelimitations,asthefactthatthiscontrollercannotexecute,insidetheprogram,movementsthatmustberepeatedforsometime,butthisproblemcanbesolvedwithsomeexternallogiccomponents.Anotherlimitationisthatthecontrollercannotbeappliedonsystemsthathavenosequence.Theselimitationsareacharacteristicofthesystemthatmustbeanalyzedforeachapplication.4.CharacteristicsofthecontrollerThecontrollerisbasedontheMICROCHIPmicrocontrollerPIC16F8776,7with40pins,andithasalltheresourcesneededforthisprojectIthasenoughpinsforallthecomponents,serialcommunicationimplementedincircuit,EEPROMmemorytosavealltheconfigurationofthesystemandthesequenceofsteps.Fortheexecutionofthemainprogramitofferscompleteresourcesastimersandinterruptions.Thelistofresourcesofthecontrollerwascreatedtoexploreallthecapacityofthemicrocontrollertomakeitascompleteaspossible.Duringthestep,theprogramchooseshowtousetheresourcesreadingtheconfigurationstringofthestep.Thisstringhastwobytesfordigitalinputs,oneusedasamaskandtheotheroneusedasavalueexpected.Onebyteisusedtoconfiguretheoutputsvalue.Onebytesmoreisusedfortheinternaltimer,theanaloginputortime-out.TheEEPROMmemoryinsideis256byteslengththatisenoughtosavethestringofthesteps,withthischaracteristicitispossibletosavebetween48steps(Table1).Thecontroller(Fig.3)hasalsoadisplayandsomebuttonsthatareusedwithaninteractivemenutoprogramthesequenceofstepsandotherconfigurations.4.1.InteractioncomponentsFortherealapplicationthecontrollermusthavesomeelementstointeractwiththefinaluserandtoofferacompletemonitoringofthesystemresourcesthatareavailabletothedesignerwhilecreatingthelogiccontrolofthepneumaticsystem(Fig.3):Interactivemodeofwork;functionavailableonthemainprogramfordidacticpurposes,theusergivesthesignaltoexecutethestep.LCDdisplay,whichshowsthestatusofthesystem,valuesofinputs,outputs,timerandstatisticsofthesequenceexecution.Beeptogiveimportantalerts,stop,startandemergency.Ledstoshowpoweronandotherstoshowthestateofinputsandoutputs.4.2.SecurityTomakethefinalapplicationworksproperty,acorrectconfigurationtoexecutethestepsintherightwayisneeded,butmorethenthatitmustoffersolutionsincaseofbadfunctioningorproblemsintheexecutionofthesequence.Thecontrolleroffersthepossibilitytoconfiguretwointernalvirtualcircuitsthatworkinparalleltotheprincipal.Thesetwocircuitscanbeusedasemergencyorresetbuttonsandcanreturnthesystemtoacertainstateatanytime2.Therearetwoinputsthatworkwithinterruptiontogetanimmediateaccesstothesefunctions.Itispossibletoconfiguretheposition,thebuttonsandthevalueoftime-outofthesystem.4.3.UserinterfaceThesequenceofstringscanbeprogrammedusingtheinterfaceelementsofthecontroller.Acomputerinterfacecanalsobeusedtogeneratetheuserprogrameasily.Withagooddocumentationthefinalusercanusetheinterfacetoconfigurethestringsofbytesthatdefinethestepsofthesequence.Butitispossibletocreateaprogramwithvisualresourcesthatworksasatranslatortotheuser,itchangeshisworktothevaluesthatthecontrollerunderstands.Toimplementthecommunicationbetweenthecomputerinterfaceandthecontrollerasimpleprotocolwithchecksumandnumberofbytesistheminimumrequirementstoguaranteetheintegrityofthedata.4.4.FirmwareThemainloopworksbyreadingthestringsofthestepsfromtheEEPROMmemorythathasalltheinformationaboutthesteps.Ineachstep,thestatusofthesystemissavedonthememoryanditisshownonthedisplaytoo.Dependingoftheuserconfiguration,itcanusetheinterruptiontoworkwiththeemergencycircuitortime-outtokeepthesystemsafety.InFig.4,ablockdiagramofmicrocontrollermainprogramispresented.5.Exampleofelectro-pneumaticsystemThesystemisnotarepresentationofaspecificmachine,butitismadewithsomecommonmovementsandcomponentsfoundinarealone.Thesystemiscomposedoffouractuators.TheactuatorsA,BandCaredoubleactingandD-singleacting.ActuatorAadvancesandstaysinspecifiedpositiontilltheendofthecycle,itcouldworkfixinganobjecttothenextactionforexample(Fig.5),itisthefirststep.WhenAreachestheendposition,actuatorCstartshisworktogetherwithB,makingasmanycyclesaspossibleduringtheadvancingofB.ItdependsonhowfastactuatorBisadvancing;thespeedisregulatedbyaflowingcontrolvalve.Itwasthesecondstep.BandCareexamplesofactuatorsworkingtogether,whileBpushesanobjectslowly,Crepeatsitsworkforsometime.WhenBreachesthefinalposition,Cstopsimmediatelyitscycleandcomesbacktotheinitialposition.TheactuatorDisasingleactingonewithspringreturnandworkstogetherwiththebackofC,itisthethirdstep.Dworksmakingveryfastforwardandbackwardmovement,justonetime.Itsbackwardmovementisthefourthstep.Dcouldbeatooltomakeaholeontheobject.WhenDreachestheinitialposition,AandBreturntoo,itisthefifthstep.