完整版毕业设计机械外文翻译.docx
《完整版毕业设计机械外文翻译.docx》由会员分享,可在线阅读,更多相关《完整版毕业设计机械外文翻译.docx(22页珍藏版)》请在冰豆网上搜索。
完整版毕业设计机械外文翻译
VisualizationofPLCProgramsusingXML
M.BaniYounisandG.Frey
JuniorprofessorshipAgentenbasedAutomation
UniversityofKaiserslautem
P.0.Box3049,D-67653Kaiserslautem,Germany
Abstract-DuetothegrowingcomplexityofPLCprogramsthereisanincreasinginterestintheapplicationofformalmethodsinthisarea.Formalmethodsallowrigidprovingofsystempropertiesinverificationandvalidation.OnewaytoapplyformalmethodsistoutilizeaformaldesignapproachinPLCprogramming.However,forexistingsoftwarethatapproachthatcanstartfromagivenPLCprogram.Therefore,formalizationofPLCprogramsisatopicofcurrentresearch.Thepaperoutlinesare-engineeringapproachbasedontheformalizationofPLCprograms.ThetransformationintoavendorindependentformatandthevisualizationofthestructureofPLCprogramsisidentifiedasanimportantintermediatestepinthisprocess.ItisshownbeusedfortheformalizationandvisualizationofanexistingPLCprogram.
I.INTRODUCTION
ProgrammableLogicControllers(PLCs)areaspecialtypeofcomputersthatareusedinindustrialandsafetycriticalapplications.ThepurposeofaPLCistocontrolaparticularprocess,oracollectionofprocesses,byproducingelectricalcontrolsignalsinresponsetoelectricalprocess-relatedinputssignals.ThesystemscontrolledbyPLCsvarytremendously,withapplicationsinmanufacturing,chemicalprocesscontrol,machining,transportation,powerdistribution,andmanyotherfields.Automationapplicationscanrangeincomplexityfromasimplepaneltooperatethelightsandmotorizedwindowshadesinaconferenceroomtocompletelyautomatedmanufacturinglines.
Withthewideningoftheirapplication,PLCprogramsarebeingsubjecttoincreasedcomplexityandthecomplianceoflimiteddevelopmenttimeaswellasthereusabilityofexistingsoftwareorPLCmodulesrequiresaformalapproachtobedeveloped[I].Ensuringtheandvalidationproceduresaswellasanalysisandsimulationofexistingsystemstobecarriedout[2].OneoftheimportantfieldsfortheformalizationofPLCprogramsthatgrowingupinrecenttimeisReverse-engineering[3].ReverseEngineeringisaprocessofevaluatingsomethingtounderstandordertoduplicateorenhanceit.WhilethereuseofPLCcodesisbeingestablishedasatoolforcombatingthecomplexityofPLCprograms,ReverseEngineeringissupposedtoreceiveincreasedimportanceinthecomingyearsespeciallyifexitingofexistingPLCprogramsisanimportantintermediatestepofReverseEngineering.ThepaperprovidesanapproachtowardsthevisualizationofPLCprogramsusingXMLwhichisanimportantapproachfortheorientationandbetterunderstandingforengineersworkingwithPLCprograms.
Thepaperisstructuredasfollows.First,ashortintroductiontoPLCsandthecorrespondingprogrammingtechniquesaccordingtotheIECstandardisgiven.InSectionⅢanapproachforRe-engineeringbasedonformalizationofPLCprogramsisintroduced.ThetransformationofthePLCcodeintoavendorindependentformatisidentifiedasanimportantfirststepinthisprocess.XMLandcorrespondingtechnologiessuchasXSLandXSLTthatcanbeusedinthistransformationarepresentedinSectionIV.SectionVpresentstheapplicationofXMLforthevisualizationofPLCprogramsandillustratestheapproachwithanexample.ThefinalSectionsummarizestheresultsandgivesanoutlookonfutureworkinthisongoingproject.
ⅡPLCANDIEC61131
Sinceitsinceptionintheearly‘70sthePLCreceivedincreasingattentionduetoitssuccessinfulfillingtheobjectiveofreplacing,researchanddevelopment,mainlyforControlEngineering.
IEC61131isthefirstrealendeavourtostandardizePLCprogramminglanguagesforindustrialautomation.InI993theInternationalElectrotechnicalCommission[4]publishedtheIEC61131IntemationalStandardforProgrammableControllers.BeforethestandardizationPLCprogramminglanguageswerebeingdevelopedasproprietaryprogramminglanguagesusabletoPLCsofaspecialvendor.Butinordertoenhancecompatibility,opennessandinteroperabilityamongdifferentproductsaswellastopromotethedevelopmentoftoolsandmethodologieswithrespecttoafixedsetofnotationstheIEC61131standardevolved.Thethirdpartofthisstandarddefinesasuitoffiveprogramminglanguages:
InstructionList(IL)isalow-leveltextuallanguagewithastructuresimilartoassembler.OriginatedinEuropeILisconsideredtobethePLClanguageinwhichallotherIEC61131-3languagescanbetranslated.
LadderDiagram(LO)isagraphicallanguagethattheUSA.LDsconformtoaprogrammingstyleborrowedfromelectronicandelectricalcircuitsforimplementingcontrollogics.
StructuredText(STJisaverypowerfulBlockDiagram(FBD)isagraphicallanguageanditisverycommontotheprocessindustry.Inthislanguagecontrollersaremodelledassignalanddataflowsthroughfunctionblocks.FBDtransformstextualprogrammingintoconnectingfunctionblocksandthusimprovesmodularityandsoftwarereuse.
SequentialFunctionChart(SFC)isagraphicallanguage.SFCelementsaredefinedforstructuringtheorganizationofprogrammablecontrollerprograms.
OneproblemwithIEC61131-3isthatthereisnostandardizedformatfortheprojectinformationinaPLCprogrammingtool.Atthemomentthereareonlyvendorspecificformats.Thisisalsoonereasonfortherestrictionofformalizationapproachestosingleprogramsoralgorithms.However,recentlythePLCusers’organizationPLCopen(see.org)startedaTechnicalCommitteetodefineanXMLbasedformatforprojectsaccordingtoIEC.ThisnewformatwilleasetheaccessofformalizationtoolstoallrelevantinformationofaPLCproject.
Ⅲ.RE-ENGINEERINGAPPROACH
Thepresentedapproachtowardsre-engineering(cf.Fig.1)isbasedupontheconceptionthatXMLcanbeusedasamediuminwhichPLCcodeswillbetransformed.
Thistransformationofferstheadvantageofobtainingavendorindependentspecificationcode.(EvenifthePLCopensucceedsindefiningastandardizedformatforPLCapplications,therewillremainalotofexistingprogramsthatdonotconformtothisstandard.)
Basedonthiscodeastep-wisetransformationtoaformalmodel(automata)isplanned.Thismodelcanthenbeusedforanalysis,simulation,formalverificationandvalidation,andfinallyforthere-implementationoftheoptimizedalgorithmonthesameoranotherPLC.
Sincere-engineeringofcompleteprogramswill,inmostcases,beonlyasemi-automaticprocess,intermediatevisualizationofthecodeisanimportantpoint.Atdifferentstagesoftheprocessdifferentaspectsofthecodeandorformalmodelawaythatadesignercanguidethefurtherwork.XMLwithitspowerfulvisualizationandtransformationtoolsisanidealtoolforsolvingthistask.
IV.XMLASATOOLFORVISUALIZATION
XML(extensibleMarkupLanguage)isasimpleandflexiblemeta-language,i.e,alanguagefordescribingotherlanguages.TailoredbytheWorldWideWebConsortium(W3C)asadialectofSGML[S],XMLremovestwoconstraintswhichwereasingle,inflexibledocumenttype(HTML)whichwasbeingmuchabusedfortasksitwasneverdesignedforononeside;andthecomplexityoffullSGML,whosesyntaxallowsmanypowerfulbuttheotherside.
WhileHTMLdescribesacrossplatformsandapplications.XMLcanbetailoredtodescribevirtuallyanykindofinformationinaformthattherecipientoftheinformationcanuseinavarietyofways.Itisspecificallydesignedtosupportinformationexchangebetweensystemsthatusefundamentallydifferentformsofdatarepresentation,asforexamplebetweenCADandschedulingapplications.
UsingXMLwithitspowerfulparsersandinherentrobustnessintermsofsyntacticandsemanticgrammarismoreadvantageousthantheconventionalmethodofusingalexicalanalyzerandavalidatingparser(cf.Fig.2,[7]).
Theconventionalmethodofanalysisofprogramcoderequiresascanner(lexicalanalyser)whichgeneratesasetofterminalsymbols(tokens)followedbyaparserthat
checksthegrammaticalstructureofthecodeandgeneratesanobjectnet.Intheobjectnettheinternalstructureoftheprogramisrepresentedbyidentifiedobjectsandtherelationsbetweenthem.Boththescannerandtheparsertobeusedinthismethodaredocumentorientedwhichimpliesthatanalysisofdifferenttypesofdocumentsrequiresrewritingthegeneratedcodeforthescannerandtheparser.Anexampleofanapplicationofthismethodcanbefoundin[8].
ThemostpromisingaspectofusingXMLinsteadisthatXMLanditscomplementaryapplicationsfortransformationsarestandardizedsoastoprovidemaximumflexibilitytoitsuser.
TheXMLbasedmethodisadvantageous,sincethelexicalspecificationisaninvariantcomponentofXML;thereforethewell-formednessisindependentfromtherespectiveindividualapplication.
Hence,anXML-Parseralsocantransferwell-shapedXMLdocumentsinanabstractrepresentationcalledDocumentObjectModel(DOM)withoutusingagrammar.DOMisanapplicationprogramminginterface(APII)forvalidHTMLandwell-formedXMLdocuments.Itdefinesthelogicalstructureofdocumentsandthewayadocumentisaccessedandmanipulated.IntheDOMspecification,theterm"document"isusedinabroadsenseincreasingly.XMLisusedasawayofrepresentingmanydifferentkindofinformationthatmaybestoredindiversesystems,andmuchofthiswouldtraditionallybeseenasdataratherthanasdocuments.Nevertheless,XMLpresentsthisdataasdocuments,andtheDOMcanbeusedtomanagethisdata[5].
XSLT,thetransformationlanguageforXMLiscapableoftransformingXMLnotonlytoanotherXMLorHTMLbuttom