机械专业毕业设计外文翻译及原文_第1页
机械专业毕业设计外文翻译及原文_第2页
机械专业毕业设计外文翻译及原文_第3页
机械专业毕业设计外文翻译及原文_第4页
机械专业毕业设计外文翻译及原文_第5页
已阅读5页,还剩18页未读 继续免费阅读

下载本文档

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

文档简介

1、Visualization of PLC Programs using XMLM. Bani Younis and G. Frey Juniorprofessorship Agentenbased Automation University of KaiserslautemP. 0. Box 3049, D-67653 Kaiserslautem, GermanyAbstract - Due to the growing complexity of PLC programs there is an increasing interest in the application of formal

2、 methods in this area. Formal methods allow rigid proving of system properties in verification and validation. One way to apply formal methods is to utilize a formal design approach in PLC programming. However, for existing software that has to be optimized, changed, or ported to new systems .There

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

4、ion of the structure of PLC programs is identified as an important intermediate step in this process. It is shown how XML and corresponding technologies can be used for the formalization and visualization of an existing PLC program.I. INTRODUCTIONProgrammable Logic Controllers (PLCs) are a special t

5、ype of computers that are used in industrial and safety critical applications. The purpose of a PLC is to control a particular process, or a collection of processes, by producing electrical control signals in responseto electrical process- related inputs signals. The systems controlled by PLCs vary

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

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

8、ell as the reusability of existing software or PLC modules requires a formal approach to be developed I. Ensuring the high quality 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 fo

9、rmalization of PLC programs 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 comple

10、xity of PLC programs, Reverse 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 Engin

11、eering. The paper provides an approach towards the visualization ofPLC Programs using XML which is an important approach for the orientation and better un dersta nding for engin eers work ing with PLC p rograms.The pap er is structured as follows. First, a short in troducti on to P LCs and the corre

12、s ponding p rogram ming tech niq ues accord ing to the IEC 61131-3 sta ndard is given. In Section 川 an approach for Re-engineering based on formalization of PLC p rograms is in troduced. The tran sformatio n of the PLC code in to a ven dor independent format is ide ntified as an imp orta nt first st

13、e p in this p rocess. XML and corres ponding tech no logies such as XSL and XSLT that can be used in this transformation are presented in Section IV. Section V presents the application of XML for the visualization of PLC programs and illustrates the approach with an example. The final Section summar

14、izes the results and gives an outlook on future work in this ongoing p roject.n PLC AND IEC 61131精选文库2Si nee its incep ti on in the early 70s the PLC received in creas ing atte ntio n due toits successin fulfilling the objective of replacing hard-wired control equipments at machines. Eventually it g

15、rew up as a distinet field of application, research and devel opment, mainly for Con trol Engin eeri ng.IEC 61 131 is the first real endeavour to standardize PLC programming Ian guages for in dustrial automati on. In 1993 the Intern ati onal Electrotech nical Commissi on 4 p ublished the IEC 61131 I

16、n temati onal Stan dard for P rogrammable Controllers. Before the standardization PLC programming Ianguages were being devel oped as prop rietary p rogram ming Ian guages usable to P LCs of a sp ecial ven dor. But in order to enhance comp atibility, openn ess and interop erability among differe nt p

17、roducts as well as to promote the development of tools and methodologies with respect to a fixed set of no tatio ns the IEC 61131 sta ndard evolved. The third part of this sta ndard defi nes a suit of five p rogram ming Ian guages:In structio n List (IL) is a low-level textual la nguage with a struc

18、ture similar to assembler. Origin ated in Europe IL is con sidered to be the PLC Ian guage in which all other IEC61 131-3 Ian guages can be tran slated.Ladder Diagram (LO) is a graphical language that has its roots in the USA. LDs conform to a p rogram ming style borrowed from electro nic and electr

19、ical circuits for impi eme nti ng con trol logics.Structured Text (STJ is a very powerful high-level language. ST borrows its syn tax from Pascal, augme nting it with some features from Ada. ST contains all the esse ntial eleme nts of a modem p rogram ming Ian guage.Function Block Diagram (FBD) is a

20、 grap hical la nguage and it is very com mon to the process industry.In this Ianguage controllers are modelled as signal and data flows through fun cti on blocks. FBD tran sforms textual p rogram ming into conn ect ing fun cti on blocks and thus impro ves modularity and software reuse.Sequential Fun

21、ction Chart (SFC) is a graphical Ianguage. SFC elements are defi ned for structuri ng the orga ni zati on of p rogrammable con troller p rograms.One problem with IEC 61 131-3 is that there is no standardized format for the p roject in formatio n in a PLC p rogram ming tool. At the mome nt there are

22、only ven dor specific formats. This is also one reason for the restriction of formalizationapproaches to single programs or algorithms. However, recently the PLC users orga ni zati on PLCopen (see htt p:/www. pIcopen. org) started a Tech ni cal Committee to defi ne an XML based format for p rojects

23、accord ing to IEC 61131-3. This new format will ease the access of formalizati on tools to all releva nt in formatio n of a PLC p roject. m . RE-ENGINEERING APPROACHThe p rese nted app roach towards re-e ngin eeri ng (cf. Fig.1) is based upon the conception that XML can be used as a medium in which

24、PLC codes will be tran sformed.This transformation offers the advantage of obtaining avendor independent sp ecificati on code. (Eve n if the PLCopen succeeds in defi ning a sta ndardized format for PLC app licati ons, there will rema in a lot of exist ing p rograms that do not conform to this sta nd

25、ard.)Based on this code a ste p-wise tran sformati on to a formal model (automata) is plann ed. This model can the n be used for an alysis, simulatio n, formal verificati on and validati on, and fin ally for the re-i mp leme ntati on of the op timized algorithm on the same or ano ther P LC.Si nee re

26、-e ngin eeri ng of comp lete p rograms will, in most cases, be only a semi-automatic p rocess, in termediate visualizati on of the code is an imp orta nt point. At differe nt stages of the p rocess differe nt asp ects of the code an d/or formal model have to be visualized in a way that a desig ner c

27、an guide the further work. XML with its powerful visualization and transformation tools is an ideal tool for solving this task.IV. XML AS A TOOL FOR VISUALIZATIONXML (exte nsible Markup Lan guage) is a simple and flexible meta-la nguage, i.e a Ianguage for describing 精选文库3other Ianguages. Tailored b

28、y the World Wide Web Consortium (W3C) as a dialect of SGML S , XML removes two constraints which were hold ing back Web devel opments 6. The dependen ceo n a sin gle, in flexible document type (HTML) which was being much abused for tasks it was never designed for on one side; and the complexity of f

29、ull SGML, whose syntax allows many po werful but hard-to-p rogram op ti ons on the other side.While HTML describes how data should be p rese nted, XML describes the data itself. A nu mber of in dustries and scie ntific disc ip li nes-medical records and n ews paper p ublish ing among them-are alread

30、y using XML to excha nge in formati on across p latforms and app licati ons. XML can be tailored to describe virtually any kind of in formatio n in a form that the reci pient of the in formatio n can use in a variety of ways. It is specifically designed to support information exchange between system

31、s that use fun dame ntally differe nt forms of data rep rese ntati on, as for exa mple betwee n CAD and scheduli ng app licatio ns.精选文库4Using XML with its po werful p arsers and in here nt robust ness in terms of syn tactic and sema ntic grammar is more adva ntageous tha n the conven ti onal methodo

32、f using a lexical an alyzer and a validat ing p arser (cf. Fig. 27).The conven ti onal method of an alysis of p rogram code requires a sca nner (lexical an alyser) which gen erates a set of termi nal symbols (toke ns) followed by a p arser that checks the grammatical structure of the code and gen er

33、ates an object n et. In the object net the internal structure of the p rogram is rep rese nted by ide ntified objects and the relatio ns betwee n them. couvencouven tiontionOwnnM*OwnnM* * *仙Obf4Obf4 IWlIWl CranwradanCranwradanMunarMunarXMLXMLNdNd oeuoiQnfoeuoiQnfpwncpwnc Ofat*ctOfat*ct rwlrwlB-4iDOM

34、DOM. _精选文库5Both the sca nner and the p arser to be used in this method are docume nt orie nted which imp lies that an alysis of differe nt types of docume nts requires rewrit ing the gen erated code for the sca nner and the p arser. Aaxa mple of an app licati on of this method can be found in 8.The

35、most pro mis ing aspect of using XML in stead is that XML and its complementary applications for transformations are standardized so as to provide maximum flexibility to its user.The XML based method is advantageous,since the lexical specification is an in varia nt component of XML; therefore the we

36、ll-formed ness is independent from the resp ective in dividual app licati on.Hence, an XML-Parser also can transfer well-shaped XML documents in an abstract representation called Document Object Model (DOM) without using a grammar. DOM is an app licati on p rogram ming in terface (APII) for valid HT

37、ML and well-formed XML docume nts. It defi nes the logical structure of docume nts and the way a document is accessedand manipulated. In the DOM specification, the term document is used in a broad sense increasingly. XML is used as a way of rep rese nting many differe nt kind of in formati on that m

38、ay be stored in diverse systems, and much of this would traditi on ally be see n as data rather tha n as docume nts. Nevertheless, XML presents this data as documents, and the DOM can be used to man age this data 5.XSLT, the tran sformati on Ian guage for XML is cap able of tran sformi ng XML not on

39、ly to ano ther XML or HTML but to many other user-frie ndly formats. Before the advent of XSLT, the transformation of XML to any other format was only po ssible through custom app licatio ns devel oped in a p rocedural la nguage such 鉗+, Visual Basic or, Java. This procedure lacked the generality wi

40、th respect to the structural variati on of XML docume nts. Cap italiz ing on the concept that the custom app licati ons for the tran sformatio ns are all very similar, XSLT evolved as a high-level declarative Ian guage9.XSLT functions in two steps. In the first step, it performs a structural transfo

41、rmation so as to convert the XML into a structure that reflects the desiredFig,*Fig,* 3 3 VisualisationVisualisation ofof XMLXML douRieiitsdouRieiits uinguing XSLXSLout put. The sec ond stage is formatt ing the new structure into the required format, such as HTML or PDF (cf. Fig. 3 ). The most imp o

42、rta nt adva ntage of this tran sformati on is that it allows a simple and easily-c on ceivable rep rese ntati on of the docume nt or data structure embedded in side the well-structured but hard-to-un dersta nd XML to be produced. When HTML is chosen as the 精选文库6format of the transformed produce it i

43、s po ssible to use the exte nsive ability of HTML to p roduce an easily-c on ceivable and attractive visualizati on of a p rogram.Every XML docume nt has its own syn tax and vocabulary. Therefore, in additi on to being well-formed, the XML document needs to conform to a set of rules. Accord ing to W

44、3C recomme ndati ons this set of rules has to be defi ned either through a Docume nt Type Defin iti on (DTD) or an XML Schema. The rules defi ned in a DTD or an XML Schema state the hierarchical and structural constraints of the XML docume nt.The DTD is for defining the document grammars; more recen

45、tly a number of精选文库7X&LX&Lr r-DTO/XMLDTO/XMLOvOriesOvOries 2亠”丿X5l_-P/oceuorX5l_-P/oceuor7777XML-XML-EocunentEocunentFig.Fig.却 IKdarinniIKdarinni -of-of XMLXML ibeibe心STE P 5 and the sta ndardized vers ion accord ing to IEC 61131-3 are con sidered.The gen eratio n of XML docume nts show ing differe

46、nt asp ects of a PLC p rogram is realized in the followi ng three ste ps (cf. Fig. 5):1. Tra nsformatio n of the PLC p rogram to an XML docume nt2. Validation of the XML against the XML Schema which sets the syntax of the XML3.Identification of the Instruction elements of the transformed XML accordi

47、ng to the in structi on set of the source PLCThese three ste ps are discussed in sub-sect ions B to D res pectively. Sub-sect ion E explains the visualizati on of the differe nt XMLs obta ined duri ng the p reced ing ste ps.1 1精选文库8TexlZXMTexlZXM7 7XMLXMLZJZJXMLXML - - VlidathonVlidathonMLML aherahe

48、rValbValbdattondatton厂1 risiruct#artrisiruct#art I4snftik:atjoiI4snftik:atjoiFIB 5 5 Q Q wtraionwtraion cfcf ITC-ppoftrainITC-ppoftrain ttfxtttfxt KrKr XMLXML dn(fdn(f VKlidaiiunVKlidaiiunThroughout this Sectio n an exa mple is used to illustrate the p rese nted concep ts. Fig. 6 shows a PLC code wr

49、itten in Instruction List Siemens S5. The PLC code is writte n in atabular form where each row eleme nt is either a delimited list con sist ing of address, label, i nstruct ion, operand and descri ptioor a comme nt.Komme ntarAutorErstellt :15.07.2003 Geae ndert am: B1B:ONETZWERK 1 EMPF ANGEN SLAVE 3

50、 VON MASTERNAME :EMP EMAST0005 :U M98.7 ABFRAGE OB EMPF ANG MOEGLICH00060007 :SPB= MOOl 00080009 :A DB140 EMPF ANGSFACH 1ST DB 140 OOOA :L KF+20 LAENGE DES DATE NP AKETS oooc :T DLOOOOD :L KF+O ZIELNUMMER O=MASTEROOOF :T DRO00100011 :UNM98.7 FANGEN WIEDER ERLAUBEN 0012 :S M98.70013 MOOl :NOP 0001400

51、15 :BE BAUSTEIN ENDEFig. 6 A PLC p rogram writte n in Sieme ns S5 In structio n ListB. Con versi on of a PLC P rogram inio a well-formed XMLGive n a PLC p rogram in ASCII format and in a tabular structure with sep arate colu mns for addresses,labels, in struct ions, operands and descri pti ons delim

52、ited by whites paces, XSLT can convert it in to a well-formed XML docume nt. The XML document obtained through this transformation is a hierarchically structured docume nt.Fig. 7 shows the XML docume nt obta ined through the tran sformati on of the PLC code of Fig. PLOPLO PnogrwnPnogrwnXMLXML WTthWT

53、th nslrunionnslrunion IDID精选文库96. The XML document is structured in a hierarchy in which the root element is the IL Code Block representing the whole PLC code. Each of the rows of the PLC code is contained within a corresponding ILRow element which is M e r smtctured into child eleme nts.Note: The s

54、tructure chose n for the XML rep rese ntati on of IL-Code is orie nted at the work ing prop osal of the PLCopen.DescriDescriOBOB BMPFANBMPFANG GMOECLIcacMOECLIcac/Description/Description re3s0Q07re3s0Q07 InstructInstruct iociASPS-%iociASPS-% / / InstInst tyty GtGt icnicn OpetanaMOOiOpetanaMOOi 0009A

55、ddress0009 AA OpeDBrandDB 140140DescriDescriptptLOHLOHAEMPFANGSEACHAEMPFANGSEACH 1ST1ST DBDB14-0/14-0iorL Erg, 7 XML transform of the FLC program.C.XML Validation agai nst the XML SchemaThe XML obtained as a result of the previous processing can be validated using a validat ing p arser that con firm

56、s that the XML docume nt in additi on to being well-formed con forms to the set of syn tactic rules defi ned in con text of the PLC p rogram ming Ian guage.D.rde nhp cati on of in struct ionsThis step in the process of visualization of PLC programs using XML ensures that the XML document to be used

57、for visualization contains only valid instructions.XSLT can be used to transform the well-formed and valid Xh4L to another XML which as a result of identification on instructions has an additional attribute appen ded to the in struct ion tags. This attribute no tifies whether the in structi on is a

58、valid in structio n of the concerned in structio n set. This tran sformatio n p rocedure is also cap able of attach ing attributes to the in structi on tags that declares a classificatio n of the in structio ns into p redefi ned classes.The in structio n ide ntificati on of the tran sformed XML p ro

59、ofs the sema ntic of the XML in accorda nee with the op erati on types of the PLC p rogram ming Ian guage.In the example of this section, (cf. Fig. 8), the new XML contains additional attributes which classify the in structio ns accord ing to the type of op eratio n it represents. The STEPS instruct

60、ions are categorized into eleven different types of op erati ons e.g. logical, ju mp, I oad or tran sfer op erati on assig nment, etc.精选文库10?Op erati onv?xml versio n=I.O en cOdi ng=ISO-8859-1 vILCodeBlockvILRow(In struct ion in structi onl d=Logical Op eratio n) Uv/I nstructio nv/ILROW vln structio

温馨提示

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

评论

0/150

提交评论