毕业设计方案(机械)外文翻译_第1页
毕业设计方案(机械)外文翻译_第2页
毕业设计方案(机械)外文翻译_第3页
毕业设计方案(机械)外文翻译_第4页
毕业设计方案(机械)外文翻译_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Visualization of PLC Programs using XMLBani Younis and G. Frey Juniorprofessorship Agentenbased Automation University of Kaiserslautem0. Box 3049, D-67653 Kaiserslautem, GermanyAbstract- Due to the growing complexity of PLC programsthere is an increasing interest in the application of formalmethods

2、in this area. Formal methods allow rigid proving ofsystem properties in verification and validation. One way to apply formal methods is to utilize a formal design approach inPLC programming. However, forexisting software that has tobe optimized, changed, or ported to new systems .There is theneed fo

3、r an approach that can start from a given PLC program.Therefore, formalization ofPLC programs is a topic of current research. The paper outlines a re-engineering approach based on the formalization of PLC programs.Thetransformation into a vendor independent format and the visualization of the struct

4、ure of PLC programs is identified as an important intermediate step in this process. It is shownhow XML and corresponding technologies can be used for theformalization and visualization of an existing PLC program.I. INTRODUCTIONProgrammable Logic Controllers (PLCs are a specialtype of computers that

5、 are used in industrial and safetycritical applications. The purpose of a PLC is to control a particular process, or a collection of processes, by producing electrical control signals in response to electrical process- related inputs signals. The systems controlled by PLCs vary tremendously, with ap

6、plications in manufacturing,chemical process control, machining, transportation, power distribution, and many other fields. Automation applications can range in complexity froma simple panel to operate the lights and motorized window shades in a conference room to completely automated manufacturing

7、lines.With the widening of their application horizon , PLC programs are being subject to increased complexity and highquality demands especially for safety-critical applications.The growing complexity of the applications within the compliance of limited development time as well as the reusability of

8、 existing software orPLC modules requires a formal approach to be developed I. Ensuring the highquality demands requires verification and validation procedures as well as analysis and simulation of existing systems to be carried out2. One of the important fields for the formalization of PLC programs

9、 that have been growing up in recent time is Reverse-engineering 3. Reverse Engineering is a process of evaluating something to understand how it works in order to duplicate or enhance it. While the reuse of PLC codes is being established as a tool for combating the complexity of PLC programs, Rever

10、se Engineering is supposed to receive increased importance in the coming years especially if exiting hardware has to be replaced by new hardware with different programming environmentsVisualization of existing PLC programs is an important intermediate step of Reverse Engineering. The paper provides

11、an approach towards the visualization of1/20PLC programs using XML which is an important approach for the orientation and better understanding for engineers working with PLC programs.The paper is structured as follows. First, a short introduction to PLCs and thecorresponding programming techniques a

12、ccording to the IEC 61131-3 standard isgiven. In Section an approach for Re-engineering based on formalization of PLCprograms isintroduced. The transformationof the PLC code into a vendorindependent format is identified as an important first step in this process. XMLandcorresponding technologies suc

13、h as XSLand XSLTthat can beused in thistransformation are presented in Section IV .Section Vpresents the applicationofXML for the visualization of PLC programs and illustrates the approach withanexample. The final Section summarizes the resultsand gives an outlook on futurework in this ongoing proje

14、ct.PLC AND IEC61131Since its inception in the early 70s the PLC received increasing attention due toits successinfulfillingthe objective of replacing hard-wired control equipments atmachines. Eventuallyit grew up as a distinct field ofapplication,research anddevelopment, mainly for Control Engineeri

15、ng.IEC 61131 isthe first real endeavour to standardize PLCprogramminglanguages forindustrial automation. In I993 the International ElectrotechnicalCommission 4 published the IEC 61131 Intemational Standard for ProgrammableControllers. Before the standardizationPLCprogramminglanguages werebeingdevelo

16、ped asproprietary programminglanguages usable to PLCsof aspecialvendor.But in order to enhance compatibility,opennessand interoperabilityamongdifferent products as well asto promote the development of tools and methodologies with respect to a fixed set of notations the IEC 61131standard evolved. The

17、 third part of this standard defines a suit offive programming languages:Instruction List (IL is a low-level textual language with a structure similar to assembler. Originated in Europe IL is considered to be the PLC language in which all other IEC61 131-3 languages can be translated.Ladder Diagram

18、(LO is a graphical language that has its roots in the USA. LDs conform to a programming style borrowed from electronic and electrical circuits for implementing control logics.Structured Text (STJ is a very powerful high-level language. ST borrows its syntax from Pascal, augmenting it with some featu

19、res from Ada. ST contains all the essential elements of a modem programming language.Function Block Diagram (FBD is a graphical languageand it is very common to the process industry. In this language controllers are modelled assignal and data flows through function blocks. FBD transforms textual pro

20、gramming into connecting function blocks and thus improvesmodularity and software reuse.Sequential Function Chart (SFC is a graphical language. SFC elements are defined for structuring the organization of programmable controller programs.One problem with IEC 61 131-3 is that there is no standardized

21、 format for the project information in a PLC programming tool. At the moment there are only vendor specificformats. This is also one reason for the restriction of formalization approaches2/20to single programs or algorithms.However, recently the PLC users . RE-ENGINEERING APPROACHThe presented appro

22、ach towards re-engineering (cf. Fig.1 is based upon the conception that XML can be used as amedium in which PLC codes will be transformed.This transformation offers the advantage of obtaining avendor independent specification code. (Even if the PLCopen succeeds in defining a standardized format for

23、PLC applications, there will remain a lot of existing programsthat do not conform to this standard.Based on this code a step-wise transformation to a formalmodel (automata is planned. This model can then beused for analysis, simulation, formal verification and validation,and finally for the re-imple

24、mentation of the optimizedalgorithm on the same or another PLC.Since re-engineering of complete programs will, in mostcases, be only a semi-automatic process, intermediate visualizationof the code is an important point. At differentstages of the process different aspects of the code and/orformal mod

25、el have to be visualized in a way that a designercan guide the further work. XML with its powerful visualizationand transformation tools is an ideal tool for solvingthis task. IV. XML AS A TOOL FOR VISUALIZATIONXML (extensible Markup Language is a simple and flexible meta-language, i.e, a language f

26、or describing other languages. Tailored by the World Wide Web Consortium (W3C asa dialect of SGML S , XML removes two constraints which were holding back Web developments 6.The dependenceon a single, inflexible document type(HTML which was being much abused for tasks it wasnever designed for on one

27、side。 and the complexity of fullSGML, whose syntax allows many powerful but hard-to-programoptions on the other side.While HTML describes how data should be presented,XML describes the data itself. A number of industries andscientific disciplines-medical records and newspaper publishingamong them-ar

28、e already using XML to exchangeinformation across platforms and applications. XML can betailored to describe virtually any kind of information in aform that the recipient of the information can use in a varietyof ways. It is specifically designed to support informationexchange between systems that u

29、se fundamentally differentforms of data representation, as for example betweenCAD and scheduling applications.3/20Using XML with its powerful parsers and inherent robustnessin terms of syntactic and semantic grammar ismore advantageous than the conventional method of usingalexical analyzer and a val

30、idating parser (cf. Fig. 2,7.The conventional method of analysis of program coderequires a scanner (lexical analyser which generates a setof terminal symbols (tokens followed by a parser thatchecks the grammatical structure of the code and generatesan object net. In the object net the internal struc

31、ture of theprogram is representedby identified objects and the relationsbetween them. Both the scanner and the parser to beused in this method are document oriented which impliesthat analysis of different types of documents requires rewritingthe generated code for the scanner and the parser. Anexamp

32、le of an application of this method can be foundin8.The most promising aspect of using XML instead is thatXML and its complementary applications for transformationsare standardized so as to provide maximum flexibilityto its user.The XML based method is advantageous, since the lexicalspecification is

33、 an invariant component of XML 。 thereforethe well-formedness is independent from the respectiveindividual application.Hence, an XML-Parser also can transfer well-shapedXML documents in an abstract representation called DocumentObject Model (DOM without using a grammar.DOM is an application programm

34、ing interface (APII forvalid HTML and well-formed XML documents. It definesthe logical structure of documents and the4/20way a documentis accessed and manipulated. In the DOM specification, thetermdocument is used in a broad sense increasingly. XMLis used as a way ofrepresenting many different kind

35、of information that may be stored in diverse systems, andmuch of this would traditionally be seen as data rather thanasdocuments. Nevertheless, XML presents this data asdocuments,and the DOM can be used to manage this data5.XSLT, the transformation language for XML is capableof transforming XML not

36、only to another XML or HTMLbut to many other user-friendly formats. Before the adventof XSLT, the transformation of XML to any other formatwas only possible through custom applications developedin a procedural language such asC+, Visual Basic or,Java. This procedure lacked the generality with respec

37、t tothe structural variation of XML documents. Capitalizing onthe concept that the custom applications for the transformationsare all very similar, XSLT evolved as a high-leveldeclarativelanguage9.XSLTfunctionsintwosteps. Inthe firststep, itperformsa structuraltransformation so as to convert the XML

38、intoa structure that reflects the desiredoutput. The secondstage is formatting the new structure into the required format,such as HTML or PDF (cf. Fig. 3 . The most importantadvantage of this transformation is that it allows a simpleand easily-conceivable representation of the documentor data struct

39、ure embedded inside the well-structured buthard-to-understand XML to beproduced. When HTMLischosen as the format of the transformed produce it ispossibleto use the extensive ability of HTML to produce aneasily-conceivable and attractive visualization of a program.Every XML document has its own synta

40、x and vocabulary.Therefore, in addition to being well-formed, the XMLdocument needs to conform to a set of rules. According toW3C recommendations this set of rules has to be definedeither through a Document Type Definition (DTD or anXML Schema. The rules defined in a DTD or an XMLSchema state the hi

41、erarchical and structural constraints ofthe XML document. The DTD is for defining the document grammars。 morerecently a number of5/20alternative languages have been proposed.The W3C XML Schema language replicates theessential functionality of DTDs, and adds a number of features:the use of XML instan

42、ce syntax rather than an ad hocnotation, clear relationships between schemas and namespaces,asystematic distinction between element types anddata types, and a single-inheritance form of type derivation.In other words schemas offer a richer and more powerfulway of describing information than what is

43、possible withDTDs. Fig. 4shows the XML technologies discussedaboveand the connection between them.V. AN APPROACH FOR THE VISUALIZATION OFPLC PROGRAMS A. OverviewSince Instruction List (IL is the most commonly usedPLC language in Europe, the presented approach is basedon this language. The proprietar

44、y IL dialect Siemens STEP5and the standardized version according to IEC 61131-3are considered.The generation of XML documents showing differentaspects of a PLC program is realized in the following threesteps (cf. Fig. 5:1.Transformation of the PLC program to an XMLdocument2.Validation of the XML aga

45、inst the XML Schemawhich sets the syntax of the XML3.Identification of the Instruction elements of thetransformed XML according to the instruction setof the source PLCThese three steps are discussed in sub-sections B to Drespectively. Sub-section E explains the visualization of thedifferent XMLs obt

46、ained during the preceding steps.6/20Throughout this Section an example is used to illustrate the presented concepts. Fig. 6shows a PLC code written in Instruction List Siemens S5. The PLC code is written in atabular form where each row element is either a delimited list consisting of address, label

47、, instruction, operand and descriptionor a comment.Kommentar:Autor0005:UM98.7 ABFRAGE OB EMPFANG MOEGLICH00060007 :SPB= MOOl00080009 :A DB140 EMPFANGSFACH IST DB 140OOOA :L KF+20 LAENGE DES DATENPAKETSoooc :T DLOOOOD :L KF+O ZIELNUMMER O=MASTEROOOF :TDRO00100011 :UNM98.7 FANGEN WIEDER ERLAUBEN0012 :

48、S M98.70013 MOOl :NOP 000140015 :BE BAUSTEIN ENDEFig. 6 APLC program written in SiemensS5 Instruction ListB. Conversion of a PLCProgram inio a well-formedXML7/20Given a PLC program in ASCII format and in a tabularstructure with separate columns for addresses,labels, instructions,operands and descrip

49、tions delimited by whitespaces,XSLT can convert it into a well-formed XMLdocument. The XML document obtained through this transformationis a hierarchically structured document. Fig. 7 shows the XML document obtained through thetransformation of the PLCcode of Fig. 6. The XML documentis structured in

50、 a hierarchy in which the root elementisthe ILCodeBlock representing the whole PLC code. Eachof the rows of the PLC code is contained within a correspondingILRow element which is M e r smtctured intochild elements.Note: The structure chosen for the XML representationof IL-Code is oriented at the wor

51、king proposal of thePLCopen.C. XML Validation against the XML SchemaThe XML obtained asa result of the previous processing can be validated using a validating parser that confirms that the XML document in addition to being well-formed conforms to the set of syntactic rules defined in context of theP

52、LC programming language.D. rdenhpcation of instructionsThis step in the process of visualization of PLC programsusing XML ensures that the XML document to beused for visualization contains only valid instructions.XSLT can be used to transform the well-formed and validXh4Ltoanother XML which as a res

53、ult of identification oninstructions has an additional attribute appended to the8/20instructiontags. This attribute notifies whether the instructionis a valid instruction of the concerned instruction set. Thistransformation procedure is also capable of attaching attributesto the instruction tags tha

54、t declares a classificationof the instructions into predefined classes.The instruction identification of the transformed XMLproofs the semantic of the XML in accordance with theoperation types of the PLC programming language.In the example of this section, (cf. Fig. 8, the new XMLcontains additional

55、 attributes which classify the instructionsaccording to the type of operation it represents. The STEPSinstructions are categorized into eleven different types ofoperations e.g. logical, jump, load or transfer operation assignment, etc.(Instruction instructionId=Logical OperationU-.SPB- BEFig. 8 A ne

56、w transformed XML showing only the inslructions and the corresponding instruction IDE. Visualization of XMLBoth of the XML documents generated above can be transformed into HTML or other readable documents with the help of XSL. Aningenious XSL can be designed so as to produce an HTML which can conve

57、y the logical and other features of the PLC program in an easily conceivable form. Moreover, the DOM structure embedded in the XML (cf. Fig. 9, also enables the user to navigate through the PLC programs in an easy way.For the example the visualization is done in HTML.This visualization is done for t

58、he transformed XML afterthe validation of its syntax asa table where the child elementsof the ILRow are the columns of this table.9/20The XML after the instruction identification istransformedusing the XSL, where the instruction and the instructionId, obtained after extracting the XML accordingto th

59、e type of operations are visualized in a table containingtwo columns (Instruction, Instruction Id in HTML.The HTML structures suggested here are not the onlypossibilities, with which the XML can be visualized, butthey give a very easy practical option for the users grasp ofthe PLC code.Fig. IO shows

60、 the same PLC code asshown in Fig. 4 asa HTML document converted &om the XML documentshown in Fig. 7 using XSL. This visualization10/20enables abetter understanding of the PLC program. Fig. 11showsthe special visualization of instruction ids given in theXML ofFig.6 .VI. CONCLUSIONS AND OUTLOOKRe-eng

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论