GEMMA based approach for generating PLCopen ... - Science Direct

21 downloads 104010 Views 1MB Size Report
methodology to develop automation systems, from specification to code generation conforming to ... promoting the use of standards for the application field of.
Proceedings of the 1st IFAC Conference on Embedded Systems, Computational Intelligence and Telematics in Control - CESCIT 2012 3-5 April 2012. Würzburg, Germany

GEMMA based approach for generating PLCopen Automation projects M.L. Alvarez*, A. Burgos*, I. Sarachaga*, E. Estévez**, M. Marcos* * Dpto. Ingeniería de Sistemas y Automática, UPV/EHU - Bilbao, Spain e-mail: {marialuz.alvare,arantzazu.burgos,isabel.sarachaga, marga.marcos}@ ehu.es. ** Dpt. of Electronic and Automatic Engineering, EPS of Jaen, Spain e-mail: [email protected] Abstract: Nowadays, the collaboration among applications is imperative to improve automation engineering design process. There is a lack of methodologies that helps the designer to identify control system’s main sequence, initial conditions, system start-up and shutdown. This paper addresses a methodology to develop automation systems, from specification to code generation conforming to PLCopen. In this work, the generic methodology is applied using GEMMA (Guide d'Étude des Modes de Marches et d'Arrêts), use cases and GRAFCET (GRAphe Fonctionnel de Commande, Etapes, Transitions). GEMMA is a guide to address the systematically search for all states in which an automated process can evolve; hence, it is used to identify the operation modes. Use cases are used to discover the actors that take part in each operation mode and a set of GRAFCET templates are employed to assist in the design of the use cases. Next, the paper presents a methodology for automatically generate the Automation project in PLCopen format. Finally, as case study, a drill station is presented as well as the generation of the automation project for this mechatronical unit. Keywords: Industrial automation systems, GEMMA, PLCopen

1. INTRODUCTION Nowadays, the collaboration among applications is imperative to improve automation engineering. Industrial automation systems are specific computer systems not only because of the special characteristics of the environment they control (industrial processes), but also because they use specific equipment. Thus, the primary control equipment is the Programmable Logic Controller (PLC), industrial communication systems (fieldbus), and dedicated I/O devices. Traditionally, each control equipment vendor offered a development system based on proprietary software architecture and programming languages. In the last years, a great effort is being done by international organizations for promoting the use of standards for the application field of industrial automation. The international organization PLCopen was founded in 1992 and it is a vendor- and product-independent worldwide association whose mission is to be the leading association resolving topics related to control programming in order to support the use of international standards in this field. The International Electrotechnical Commission (IEC) promotes open systems to be used in the industrial control field. The IEC 61131-3 standard (IEC, 2003), (John et al., 2001) proposes a software model and programming languages for industrial process measurement and control systems. Most of the PLC manufacturers are aiming at becoming IEC 61131-3 standard compliant.

978-3-902661-97-5/12/$20.00 © 2012 IFAC

But, although the IEC 61131-3 programming standard is widely used in the automation industry, as it is focused on the software development environment, the traditional problem to transfer a project from one development environment to another persists. Taking into mind this problem, the workgroup named TC6 for XML (eXtended Markup Language) is constituted by PLCopen to define an open interface (PLCopen, 2008) among PLC software tools. On the other hand, AutomationML (Drath et al., 2008), (Lüder et al., 2010) allows engineers to describe the components of a real plant as objects in which different aspects are encapsulated. An object can consist of other subobjects, and it can itself be part of a bigger composition. This standard combines existing data formats that are already available and designed to store and exchange data of different aspects of engineering information. In fact, AutomationML uses CAEX (Computer Aided Engineering eXchange) (IEC, 2008) as a technical basement for the top level format (topology), COLLADA (Barnes, 2008) as a file format to store geometry and kinematics information, and PLCopen XML to store logic information. However, not only open interfaces are necessary, but also approaches to develop automation systems, from specification to code generation conform to open interfaces. So, the first step consists of specifying the functional and non-functional requirements to represent the desired behavior by means of operation modes. In (Panjaitan, 2007), several guidelines and related works are referenced: GEMMA (Guide d'Étude des Modes de Marches et d'Arrêts), S88 standard

230

10.3182/20120403-3-DE-3010.00067

from ISA, PackML proposed by OMAC (Open Modular Architecture Controls) users group, IEC 61804 or IEC 61499-1. Based on the ideas from the three first ones, the authors propose operation mode guidance compatible with distributed control systems, using UML state machine to model the behavior of modes and their internal states. This paper presents an approach to develop automation systems, from specification to code generation that conform to PLCopen. GEMMA is used to identify the operation modes, use cases are used to discover the actors that take part in each operation mode, and a set of GRAFCET templates assists in the design of the use cases and in the code generation (once they have been enriched with implementation details). Moreover, if the GRAFCET tool provides a XMI interface, then the XML file conforming to PLCOpen schema can be obtained using XML technologies. Several authors have developed different methodologies (González, 2002), (Ponsa et al., 2005), (Machado et al., 2010) combining GEMMA and GRAFCET. Other authors have developed integrated development environments (IDEs) to guide the distributed control system construction based on model-driven development and UML domain-specific modeling as FLEXICON (Estevez et al., 2005), CORFU (CORFU ESS, 2005), Archimedes (Thramboulidis et al., 2007), Beremiz (Beremiz, 2007) or AUKOTON (Hästbacka et al., 2011). All these projects pursue the automatic generation of automation projects, however these IDEs are not so user friendly as desired by the final users. In contrast, the present work assumes that final users utilize only the habitual technologies and tools for generating the automation projects, but with guidelines and templates to define correctly and methodologically the industrial control system, applying GEMMA, use cases and GRAFCET. The layout of the paper is as follows: Section 2 presents the basic concepts of GEMMA and GRAFCET. In section 3, an approach to develop automation systems is described, while section 4 is dedicated to the automatic generation of the automation project, and its application is presented in section 5. Finally, conclusions and future work are summarized in section 6.

1981). GEMMA is a guide to address the systematically search for all states in which an automated process can evolve. GEMMA’s practical application is supported by a graphical tool that consists of rectangles to define typified states that can occur in automation systems, oriented lines to mark the transitions from one state to another and conditions for the evolution between states. Relating to its application, the guide recommends the following steps: determine possible process states, identify system evolution from one state to another and search for evolution conditions. This analysis provides valuable information about the behavior of the process, the control system boundaries and the interfaces with the actors. 2.2 GRAFCET GRAFCET (GRAphe Fonctionnel de Commande, Etapes, Transitions) was developed by AFCET (Association Française pour la Cybernétique Economique et Technique) (AFCET, 1977). In 1982, it became the French NF C 03-190 UTE standard proposed by ADEPA and, later, the international IEC-848 standard (IEC, 1988). Furthermore, it has been the basis for developing a new language called SFC (Sequential Function Chart) to describe sequential automatic programming, which is part of the IEC 61131-3 standard. GRAFCET is a graphical method that describes the behavior of sequential systems by means of steps with associated actions and transitions with associated conditions. It can be used to specify an automation system at three levels: functional description, technological description and operational description. Nowadays, GRAFCET has a dominant position as automated control systems modeling language because its intuitive graphical representation, simplicity and clarity in the representation of structural characteristics such as parallelism, among other advantages, without forgetting that it is an international standard. 3. DEVELOPMENT OF INDUSTRIAL CONTROL SYSTEMS.

2.1 GEMMA

The system requirements provide the information about the process operation and the identified sub-systems, as well as the relationships among these sub-systems. Once they are available, the development process for automation projects starts applying GEMMA and use cases in analysis, and GRAFCET in design. The operation modes are identified by means of GEMMA, while use cases are used to discover the actors that take part in each operation mode which lets setting the evolution conditions between GEMMA states. Next, a set of GRAFCET templates assists in the design of the use cases.

Specifications are the "raw material" from which to build a project; incorrect or incomplete specifications lead to an incorrect result. So, a tool to generate correct specifications is necessary, ensuring that inconsistencies and unforeseen circumstances are avoided. In this sense, a researcher team led by ADEPA (Agence pour le Developpement of Appliquée Productique) developed GEMMA (ADEPA,

Six phases composed methodology has been defined to identify not only the operation modes and transition between states, but also the control and monitoring needs, as well as the configuration of the operator panel and other required auxiliary panels. The first phase consists of establishing the main sequence. In the second and third phases, the system requirements to operate in manual and/or semi-automatic

2. BASIC CONCEPTS OF GEMMA AND GRAFCET Basic concepts of GEMMA and GRAFCET are presented in the following sub-sections in order to provide better understanding of the proposed development process.

CESCIT 2012 3-5 April 2012. Würzburg, Germany

231

mode are evaluated, and if any of them is necessary, the required sequence will be generated. In the fourth phase, the production cycle is defined taking into account the all operation modes identified in the previous phases. In the fifth phase, the process failures are analysed in order to classify them as failures that run a reconfiguration or failures that force a controlled stop. Finally, in the sixth phase the emergencies are evaluated determining the actions to reach a safe situation. As an example, Fig. 1 illustrates the graphical tools needed to establish the main sequence (first phase). GEMMA, use cases and the operator panel contain the information required to adapt the GRAFCET template of the main sequence to the control system particularities under development. When the system does not need to verify initial conditions, or to run a start-up process and/or a shutdown process, then the associated steps can be eliminated from the GRAFCET. If some of them are necessaries, additional GRAFCET can be required. The decomposition into coordinated tasks leads to identify two types of GRAFCET diagrams: Decision Grafcets that organize and coordinate the possible system states such as startup, manual operation, automatic or semi-automatic operation, emergency…, and Production Grafcets that implement the actions related to the production cycle. So, coordination requires special attention. In this sense, a

guideline has been established, combining vertical or hierarchical coordination for Decision Grafcets, as well as horizontal and vertical coordination for Production Grafcets. 4. AUTOMATIC GENERATION OF THE AUTOMATION PROJECT FROM GEMMA Following the methodology’s steps commented in the previous section, the complete GRAFCET design can be obtained. In order to transform the design into code, two different aspects must be considered: the sequential part that comprises the activation and deactivation sequence of the GRAFCET steps, and the combinational part that generates the system outputs based on the current active steps. Note that each output is generated once in the automation project, according to the design premises for the industrial automation systems. There are several GRAFCET editors, but the most spread one is SFCEdit© (SFCEdit, 2009). SFCEdit provides a graphical set to produce GRAFCET diagrams 100% compliant with the IEC 60848 standard. Hence, designers need only focus on the content; they do not need concentrate on the GRAFCET lexicon and syntax because SFCEdit offers the necessary guidelines.

InitialConditionSafety [A6] ReqInitCond

Initial MainSequence

RunningPreparation [F2]

EndInitCond ReqRunPrep EndRunPrep Enabling Normal Production Operation [NormalProd] Request of stop at end of cycle [StopEC]

RunningEnd [F3] ReqRunEnd End EndRunEnd

Fig. 1: Analysis and design tools for establishing the main sequence CESCIT 2012 3-5 April 2012. Würzburg, Germany

232

Fig. 2: Lexicon and syntax of SFCedit GRAFCET editor SFCedit allows exporting defined GRAFCETs to XML format, and WMF and EMF graphical formats. As it is necessary to manipulate the information, the exported XML file is the starting point for the generation of the corresponding control code following SFC (Sequential Function Chart) programming language. Fig. 2 shows the lexicon used by SFCEdit for modeling different project in a XML schema format. Every project is composed at least by one grafect defined with one or more branch(s). When there are divergences and convergences, it is composed by two or more branches. In this situation, it is stored in hlink concept which is characterized by two properties: its identifier (seqid) and the nature of the branch (type), i.e. simultaneous divergence and convergence and selector divergence and convergence. Every sequence is defined by a set of steps and transitions. The characterization of these elements has been done following the IEC 60848 standard. (Lüder, et. al., 2010) defines a pipeline based framework which is plug-in-based. It allows the user to transform different source models (Gantt Chart, PERT Chart, Impulse Diagram…) defined during the firsts phases of the application development cycle to an IML (Intermediate Model Layer) model expressed in SFC language proposed by IEC 61131-3 standard. In particular, the resulting file of this transformation follows the PLCopen XML. Hence, this framework can be extended to be used for generating the corresponding PLCopen XML from SFCedit. If target tool does not support PLCopen XML format (E. Estévez, et al., 2007) defines the steps to follow to transform the information from PLCopen to target tool.

Loader

SFCedit File

Conditioner

IML data format

Writer

PLCopen File

Fig. 3: General scenario of PLCopen converter framework Fig. 3 illustrates the three types of plug-in of the PLCopen converter framework. The loader plug-in is the file which is tool format dependant. It is the responsible for transforming the tool format to IML data format. The conditioner plug-in CESCIT 2012 3-5 April 2012. Würzburg, Germany

transforms it to the PLCopen syntax without taking into account graphical information. The writer plug-in implements the printing algorithm defined in PLCopen, such as size of steps, positions… Accordingly, the extension of this framework for being able to transform SFCedit files to PLCopen consists on developing its corresponding loader. It implements the mapping rules identified in order to transform SFCedit files (see Fig. 2) to IML data format (Arndt Lüder, et. al., 2010). Table 1 summarizes identified mapping rules: Table 1: SFCEdit Tool to IML mapping rules SFCEdit tool Step Transition Link div and conv and div or conv or

IML Data Format State State transition

Jump Action

Jump Activity

Simultaneous divergence Simultaneous convergence Selection divergence Selection convergence

5. CASE STUDY: DRILLING STATION This section illustrates the applicability of the proposed methodology for generating the automation project of a simple mechatronical unit which is the drill station illustrated in Fig. 4. The mechatronical unit consists of two transport units, two cylinders, and a drill. The first transport unit is responsible for positioning the workpiece to be accessible by the cylinder 1. This cylinder moves the workpiece to the second transport unit. Cylinder 2 moves the rotating drill to the workpiece, and the workpiece is, thereby, drilled. The second transport unit moves the workpiece to another mechatronical unit. According to the proposed development process, the first phase consists of establishing the main sequence. Four GEMMA states have been identified (see Fig.5): A6 Production reset in the initial state, A1 Initial state stop, F1 Normal Production and A2 Requested stop at the end of cycle. This figure illustrates the particularization of the Fig.1 to Drill Station case study. As manual and semi-automatic

233

operation modes are not required, and failure analysis and emergency are not addressed to simplify, other states are not considered for this study case.

Cylinder 2 + Drill

related to the workpiece drill action and its location in a warehouse. Part a) of Fig. 6 illustrates the sequence for initial conditions. This sequence considers that there are no workpieces on the transport units, the cylinder 1 is back and the cylinder 2 is up. The lower part of Fig. 6 highlights the corresponding XML part of the exported project.

C1U

C1L

Transport Unit 1

Cylinder 1

Piece Transport Unit 2 C1R

P

Piece

Fig. 4: Drill station’s general scenario Only one actor interacts with the system: the operator; so, the evolution conditions between GEMMA states depend on operator requests. The operator panel requires two pushbutton: the start push-button to start up the system and the stop push-button to request stop at the end of the production cycle which means that new workpieces will not get into the system but the workpieces inside will be completed. A

STOP PROCEDURES

F [EndCondInit]

A6 Request for Automatic Operation

A1

a)

PRODUCTION PROCEDURES

Initial and security conditions completed

b)

[ReqAutoOpe] [ProcessEnd]

End of Cycle

A2

D

Fig. 6: Initial Conditions of Drill system [ReqStopEC] Request to end cycle stop

F1

After, with the PLCopen generator tool presented in previous section, the automation project for controlling the drill system is generated (See Fig. 7)

FAILURE PROCEDURES

Fig. 5: GEMMA for the drilling Station When establishing the main sequence, two Decision Grafcets have been obtained by adapting the Main Sequence template and Initial Conditions template, respectively. Related to Production Grafcets that are identified in the fourth phase when defining the production cycle, two coordinated tasks have been identified: the first one consists of taking the workpiece from the first transport unit to the drilling position, and the second one realizes the drilling operation and moves the workpiece to the second transport unit. Each task has its associated Production Grafcet. Once followed all methodology’s steps, the designer could model the resulting grafcet in SFCedit tool. Hence, four grafects defines the behavior of the system: the main sequence, initial conditions, the grafect that defines the sequence when one workpiece is already, the sequence CESCIT 2012 3-5 April 2012. Würzburg, Germany

Fig. 7: Drill control system’s automation project

234

6. CONCLUSIONS AND FUTURE WORKS This paper has presented a GEMMA based approach to develop automation systems, from specification to code generation. This latter conforms to PLCopen format. The proposed method offers a mechanism that helps the designer to identify control system’s main sequence, initial conditions, system start-up and shutdown. Furthermore SFC IEC 61131-3 code generator from GRAFCET has been developed. It is a new plug-in of a pipeline based framework defined in (Lüder, et. al., 2010). This latter allows the engineers to generate automatically the automation project from previously modeled GRAFCETs. Hence SFCedit tool (grafect editor) has been added as a new tool from which PLCopen files could be generated. When generating a PLCopen XML file, the main advantage consists of interchanging automation projects (or partial projects) between PLC programming environment without losing information and extra effort, which can be translated directly as software reuse at different levels (from POUs to the whole automation project). Additionally, it provides a powerful interface to other software tools, such us project design tools, simulation tools, documentation tools... Ongoing work consists of affording the conversion between PLCopen and Automation Alliance, as they are the most representative approach storage format of automation projects. ACKNOWLEDGEMENTS This work was financed by the MCYT&FEDER under DPI2009-08102, by UPV/EHU GIU 10/20 and by UPV/EHU UFI 11/28. REFERENCES ADEPA (1981). GEMMA (Guide d'Étude des Modes de Marches et d'Arrêts). Agence nationale pour le DEveloppment de la Production Automatisée. AFCET (1977). Normalisation de la Représentation du Cahier des Charges d'un Automatisme Logique. Technical report, AFCET commission. Barnes, M. and Finch, E.L. (2008). COLLADA – Digital Asset Schema Release 1.5.0 Specification. Khronos Group Inc. Beremiz (2007). Website: http://www.beremiz.org/ Last access on october 2011. CORFU ESS (2005). IEC-compliant engineering support system. http://seg.ee.upatras.gr/CORFU. Drath, R., Luder, A., Peschke, J. and Hundt, L. (2008) AutomationML - the glue for seamless automation engineering. IEEE International Conference on Emerging Technologies and Factory Automation (ETFA). Estévez, E., Marcos, M. and Gangoiti, U. (2005). A Tool Integration Framework for Industrial Distributed Control Systems. Proc. of the 44th IEEE Conference on Decision and Control. pp: 8373-8378.

CESCIT 2012 3-5 April 2012. Würzburg, Germany

Estévez, E., Marcos, M. and Orive, D. (2007), Automatic generation of PLC automation projects from componentbased models, Int. Journal of Advanced Manufacturing Technology, Vol: 35, Issue 6/7, pp: 527-540. Elsevier. González, V.M. (2002). Metodología de Análisis y Modelado de Sistemas de Eventos Discretos Mediante Técnicas Orientadas a Objetos. Aplicación a la Generación de la Lógica de Control Basada en IEC 61131-3. PhD thesis. Universidad de Oviedo. Hästbacka, D, Vepsäläinena, T. and Kuikka, S. (2011). Model-driven development of industrial process control applications. Journal of Systems and Software.Volume 84, Issue 7. Pages 1100-1113. IEC (1988). Preparation of Function Charts for Control Systems. No 848. Technical report. International Electrotechnical Commission. IEC (2003). IEC International Standard IEC 61131-3: Programmable Controllers, Part 3: Programming Languages. International Electrotechnical Commission. IEC (2008). IEC International Standard IEC 62424: Representation of process control engineering – Requests in P&I diagrams and data exchange between P&ID tools and PCE-CAE tools. International Electrotechnical Commission. John, K.H. and Tiegelkamp, M. (2001). IEC1131-3: Programming Industrial Automation Systems. Springer. Lüder, A., Estévez, E., Hundt, L. and Marcos, M. (2010). Automatic transformation of logic models within engineering of embedded mechatronical units. Int. Journal of Advanced Manufacturing Technology, Vol: 54 Issue: 9-12, pp:1077-1089. Elsevier. Machado, J. and Seabra, E. (2010). A systematized approach to obtain dependable controllers specifications. ABCM Symposium Series in Mechatronics. Vol. 4, pp.408-417. Panjaitan, S. and Frey, G. (2007). Operation Modes Handling In Distributed Automation Systems. 1st IFAC Workshop on Dependable Control of Discrete Systems (DCDS'07). Cachan (France), June 13-15. PLCopen (2008). XML Schemes and documentation. Website: http://www.plcopen.org. Last access on october 2011. Ponsa, P. and Vilanova, R. (2005). Automatización de procesos mediante la guía GEMMA. Edicions UPC. SFCedit (2009). Website: http://stephane.dimeglio.free.fr/sfcedit/en/index.html , Last access on October 2011. Thramboulidis, K., Perdikis, D. and Kantas, S. (2007). Model driven development of distributed control applications. The International Journal of Advanced Manufacturing Technology. Volume 33, Numbers 3-4, 233-242.

235

Suggest Documents