AN INTERACTIVE COURSE ON “LOGIC CONTROLLERS DESIGN USING GRAFCET”

AN INTERACTIVE COURSE ON “LOGIC CONTROLLERS DESIGN USING GRAFCET”

AN INTERACTIVE COURSE ON "LOGIC CONTROLLERS DESIGN USING GRAFCET" J. L. Díez, A. Valera, J. L. Navarro, M. Vallés, A. Encinas Dpto. Ingeniería de Sist...

607KB Sizes 32 Downloads 99 Views

AN INTERACTIVE COURSE ON "LOGIC CONTROLLERS DESIGN USING GRAFCET" J. L. Díez, A. Valera, J. L. Navarro, M. Vallés, A. Encinas Dpto. Ingeniería de Sistemas y Automática Universidad Politécnica de Valencia, Spain [email protected]

Abstract: The use of Grafcet as a design methodology for logic controllers is increasing, and PLC's manufacturers are including Grafcet as a programming language at its software. However, learning the basics of Grafcet is not an easy task for those not used to Petri Nets but, provided it is a graphic language, multimedia can provide the appropriate framework for a fast and easy learning environment. In this paper, a webbased introductory course on Grafcet basics is presented, whose interactive simulation capabilities are used in automation examples and exercises, then giving to students a closer vision to real process to be automated. Copyright © 2006 IFAC. Keywords: Grafcet, logic controllers, automation, control education, interactive simulations.

1.

INTRODUCTION

Although automation of a process consists of ensuring its good behavior (Piedrafita, 1999; García, 1999), the success of automation is mainly due to the benefit (and profit) that provides: ensures quality, reduces manufacturing costs, and increases productivity, product availability and industrial flexibility. A PLC (Programmable Logic Controllers) is a device (Balcells, 1997) used for automation of real-world and industrial processes, such as chemical processes or control of machinery on factory assembly lines. PLC's work as a discrete logic controller by using (mainly) binary variables. If continuous control with real variables is needed look for other kind of controllers, like PID’s. PLC’s were created as less-expensive

replacements for older automated systems that would use hundreds or thousands of relays and timers. Often, a single PLC can be programmed to replace thousands of relays. Programmable Controllers were initially adopted by the automotive manufacturing industry and are really useful to control repetitive processes, such as soldering, cutting, drilling, etc. The earliest PLCs expressed all decision making logic in simple ladder logic inspired from the electrical connection diagrams. Nowadays, PLCs have evolved and can even be programmed using High Level Programming Languages such as C. Therefore, the line between a programmable computer and a PLC is thinning. Grafcet (UTE, 1995; Dumery, 1999; Bonfatti et al., 1997; Lewis, 2000) is a design technique for automatisms (the logic that performs the automation of a process), mainly implemented at PLC’s (David, 1992;

Bossy, 1995). In this paper, a web-based introductory course on Grafcet basics developed in the framework of "Autotech" Leonardo da Vinci European project is presented, including also the translation of Grafcet diagrams into Logic Controllers standard ladder diagrams. The interactive simulation capabilities (Johansson, et al., 1998; Wagner, 1999; Galceran, et al., 2001) of the course examples give to students a closer vision to real process to be automated. The paper, after a brief introduction to Grafcet, presents an overview of the training package that is being developed, then showing its contents and some examples. A final conclusions section is also included.

2.

THE GRAFCET

1.1. Basic concepts and elements. Grafcet is a graphic method for modeling and designing sequential automatisms, and it is derived from Petri Nets. Every Grafcet is built as a combination of basic elements (Fig. 1): link, step, transition, and action.

1.2. Evolution Rules. The mark evolves from step to step following some simple rules of evolution: • Initial steps are always activated at power-on (this is an unconditional rule). • Transitions are validated just when: previous step is active, and the associated condition is validated. • When a transition takes place all immediately previous steps are deactivated and all immediately next activated. • Parallel connected transitions take place at the same time if their conditions are validated. • If a step is activated and deactivated at the same time, it remains activated. 1.3. Basic structures. Although Grafcet flexibility makes impossible to show all possible structures, there are some basic structures that must be known because every Grafcet could be understood as a combination of these structures. The following figures show these structures.

Fig. 1. Grafcet basic elements. The step represents the system status at a moment of time. It is represented by a square with a number inside (each step must have a different number). A step has two possible states: activated, and deactivated); the step is activated when a mark (black point) is on it. There are some steps that must be activated on system power-on: these steps are called initial steps and are represented as doubled squares. Usually, we want our system to perform some actions when a step is activated. These actions are called associated actions, or just actions. The transition is the frontier between two steps. It makes possible system evolution by controlling when it must jump from a step to another (the next one). Transition will take place when: previous step is active, and the associated condition (that must be written near the transition) is fulfilled The link (or arc) joins always a step with a transition or a transition with a step, but never two equal elements.

Fig. 2. Linear Sequences. One step is activated after another when transitions are validated.

Fig. 3. Parallel Sequences. Two or more linear sequences are simultaneously activated by the same transition. In general, when two steps are related to the same transition a double line must be plotted.

language at its latest programming software versions, many of them have their own programming language but almost all accept programming the PLC using ladder diagrams. Fortunately, Grafcet can be easily converted into logic equations and then represented as automation standard ladder diagrams.

Fig. 4. OR divergence. It takes place when there are two possible ways for the same mark to continue. Some kind of priority must be established to avoid collisions.

Different approaches could be used, but the equation that describes more precisely the step behavior is:

En+1 = En R + S

(1)

where: E is the step state, S is the activation condition, and R is the deactivation condition. An equation must be written for each step, and additional equations for each action must be considered.

3.

Fig. 5. OR convergence. It appears when two transitions activate the same step.

TRAINING PACKAGE OVERVIEW

This section presents an overview of a Training Package that deals with logic controllers design methods. Additionally to classical web-based structures for theoretical material, the course has been developed as an interactive simulator in Macromedia Flash® for different key processes to be automated. The structure of the package is that after each theoretical part, the student can be auto-evaluated, and at the end of the training package an evaluation (developed as some kind of game) by a tutor would also be performed.

Fig. 6. AND Divergence. The mark is turned into two new marks when transition takes place.

All resources included in this training package will be created and presented within the PIDstop framework (http://www.pidstop.com), a common implementation platform provided by the Norwegian University of Science and Technology, shared by all partners at "Autotech" Leonardo da Vinci European project. 3.1. Learning objectives

Fig. 7. AND convergence. Two marks are joined trought the same transition. This structure is very useful to synchronize the process or its steps. 1.4. From GRAFCET to Ladder diagrams In real life, when working with PLC's, they have to be programmed in some way. Although PLC's manufacturers are including Grafcet as a programming

Provided that the main focus of the course is Automation technicians, the learning package assumes that the students have no knowledge on control theory at all. However, it must be emphasized that students familiar with single loop control and classical logic controllers design techniques (combinational circuits techniques, …) would perform better and faster through the training package contents. During the work with this training package, the students will get familiar with the following topics on logic controllers design methods:

• • •

Introduction to logic controllers design Logic controllers design using Grafcet Logic controllers implementation from Grafcet

The design method will be tested in some examples and exercises based on real processes: switch on/off a bulb, moving one cart, moving two carts, automation of a belt conveyor, and a line for two wagons. This training package covers the objective of “Programmable Logic Controllers” of the “Sequential control systems” module (Sistemas De Control Secuencial) in the Spanish curriculum for “Automation technicians” (Sistemas De Regulación Y Control Automáticos).

3.2. Training package use The training package must be used in a sequential way, and the student must follow the structure and the order proposed. The contents included in the training package will be presented ordered by increasing complexity. After an introductory text to the training package and the learning objectives (including written material about the course use for students and teachers and references to open sources on the topic), students must study, first of all, the theory on “Logic controllers design using Grafcet”, then moving to a quiz and to some example on this topic. After that, theory on “Logic controllers implementation from Grafcet” must be studied, then performing a quiz and some examples on implementation. Finally, students must go to the final part of the training package, where interactive simulations representing some real process to be automated are presented. These assignments on logic controllers design and implementation using Grafcet will be evaluated when a solution is sent to a tutor. Evaluation is developed as some kind of game, provided that best students would be allowed to enter at the “Automation Hall of Fame”. The duration of the course hardly depends on the student background, but average student should need from 3 to 5 days to go through the content of this training package. 3.3. Functionalities Theory. The theoretical part is very important in this training package. Two sections of the training package are devoted to a new technique (for students) of design

and implementation of programmable logic controllers. Theoretical parts of the training packages will consist of multimedia presentations developed with Macromedia Flash®, including text and animated graphics and/or diagrams. The theoretical parts are complemented with different examples solving simple logic controllers. Simulations. A major problem when learning the design of programmable logic controllers in an educational context, is that the student is far from the real process then being difficult to know the real operation of the process to be automated. Therefore, the examples presented in this training package will be interactive simulations, where students will be able to interact with the process in the same way as he/she would do in the real world (i.e., by using buttons, switches, etc.). Not only the examples offered for auto-evaluation purposes but also the exercises presented as assignments for examination will be developed in this way. The simulations will be developed with Macromedia Flash®. Quiz. A quiz is a collection of either multiple choice questions, regular text questions or both. The advantage of multiple choice questions is that the student has the opportunity to receive instant feedback, and the teacher does not have to manually evaluate the students’ answer. A set of quizzes are planned to be added after each theoretical part of the training package. Game. This training package will also feature some kind of game. At the end of the training package, some assignments on logic controllers design and implementation using Grafcet are presented to students as exercises to be solved. As far as it is the evaluation, a solution must be sent to a tutor, and the student will obtain marks depending on the provided solution: negative evaluations would range from 0 to 5, and positive evaluations from 5 to 10. Then, the more knowledge the user has on the current control topic, the higher score he/she will get. Those students obtaining the best marks, would be included at the “Automation Hall of Fame”, providing some additional motivating and fun not usual at a training package. The “Automation Hall of Fame” will present best students (no more than 10) in the following way: a picture, personal interests, their belonging to other Halls of Fame, and any other information student would like to provide about him/herself. Other important celebrities of the automation world (important references) will be always present there. Examination. The final part of the training package only presents interactive simulations representing some real process to be automated, but no solution is provided. These simulations are going to be assignments on logic controllers design and implementation using Grafcet, and a solution must be sent to a tutor. Students will

obtain marks depending on the provided solution: negative evaluations would range from 0 to 5, and positive evaluations from 5 to 10.

4.

TRAINING PACKAGE CONTENT AND EXAMPLES

This training package follows the general structure: presentation of theoretical contents, examples, and exercises (assignments). Different resources (text and simulations) will be used along the training package and, as explained in the previous section, will include different contents: theory, exercises, quizzes, games and exams. The structure of the training package, which the student must follow in a sequential way, is presented next.

equations from Grafcet structures, and the subsequent transformation of this logic equations into standard ladder diagrams. Again, the theoretical study includes quizzes, and some examples presented as interactive simulations. Logic controllers implementation from Grafcet – examples. As a starting point, the same examples used in the logic controllers design part are used for implementation. Then, some more complex examples on logic controllers design are presented, but implementation must also be performed. This part can be considered as an auto-evaluation, provided that a solution is presented after the interactive simulation representing the real process to be automated. The examples are shown in figures 10, 11 and 12.

Logic controllers design using Grafcet – theory. This theoretical part includes: an introduction to programmable logic controllers and the justification of Grafcet design methodology, the theoretical study of Grafcet basic concepts and its elements, the rules of evolution of the Grafcet state, and Grafcet structures. The theoretical study includes quizzes, and some examples presented as interactive simulations. Logic controllers design using Grafcet – examples. The two examples of design shown in figures 8 and 9 will be presented to students. Fig. 10. Moving two carts. As an enhancement of the previous exercise on moving the cart, the movement of two carts working in parallel will be presented.

Fig. 8. Switch on/off a bulb. The bulb must be on when A is pressed, and off when B is pressed.

Fig. 9. Moving the cart. The cart is initially in A. When P is pressed, a movement towards B must be started (using motor D). When the cart arrives in B, the cart must return to A (using motor I). The cart stops when arrives in A unless P is pressed again. Logic controllers implementation from Grafcet – theory. This second theoretical part deals with obtaining logic

Fig. 11. Automation of a belt conveyor. Two different kinds of products in a belt conveyor must be classified in two boxes, depending of its characteristics.

The course, which will be tested by group of different External Users, includes a final section for its evaluation, where some questions are included in order to have some feedback from the users.

ACKNOWLEDGMENT The authors gratefully acknowledge the support from the European Commission through the Leonardo da Vinci programme, contract N/04/B/PP 165.011 AutoTech.

Fig. 12. A line for two wagons. Two wagons must use a common rail line for doing some tasks. Assignments on logic controllers design and implementation using Grafcet – exercises. This final part only presents interactive simulations representing some real process to be automated, but no solution is provided. As far as it is the evaluation, a solution (a scanned peace of paper, a file generated by any drawing software, or a file saved with any “Grafcet editor” provided by PLC vendors) must be sent to a tutor, and the student will obtain marks depending on the provided solution: negative evaluations would range from 0 to 5, and positive evaluations from 5 to 10.

5. CONCLUSIONS Learning the basics of Grafcet is not an easy task for those not used to Petri Nets but, provided it is a graphic language, multimedia can provide the appropriate framework for a fast and easy learning environment. This paper presented a web-based introductory course on Grafcet basics, that includes also the translation of Grafcet diagrams into logic controllers standard ladder diagrams. Over other approaches, interactive simulation capabilities of the course are also used in the automation examples and exercises, then giving to students a closer vision to real process to be automated. The training package, developed in the framework of "Autotech" Leonardo da Vinci European project, must be considered a previous step for a practical part, provided by the University of Hagen, where students have to learn Siemens software/hardware and program some simple exercises in a Remote Laboratory on Programmable Logic Controllers. Access to the Remote Laboratory will be granted trough a link, but depending on the positive evaluation of the training package presented in this paper.

Authors thank Eva Mª Bou and Francisco Badía for their help in the development of part of this work.

REFERENCES Balcells J. (1997). Autómatas programables, Ed. Marcombo, Barcelona, Spain. Bonfatti, F., P. D. Monari, and U. Sampieri. (1997). IEC 1131-3 programming methodology. Ed. Seyssins France : CJ International. Bossy, J. C. (1995). Grafcet. Práctica y aplicaciones, Ed. UPC, Barcelona, Spain. David R., and H. Alla. (1992). Petri nets and Grafcet, Ed. Prentice-Hall, Cambridge, United Kingdom. Dumery, J.J. (1999). Un langage de specification pour la conception structuree de la commande des systemes a evenements discrets. Thèse de l'Ecole Centrale De Paris. Galceran, S, A. Sudria, J. Bergas, I. Benitez, L. Vazquez, G. Boye, and O. Obregon, (2001). Use of IEC1131 programming in virtual laboratory. Proceedings of the 8th IEEE International Conference on Emerging Technologies and Factory Automation., vol. 1, 645-649. García E. (1999). Automatización industrial, Ed. SPUPV, Valencia, Spain. Johansson M., M. Gäfvert, and K.J. Aström (1998). Interactive tools for education in automatic control, IEEE Contr. Syst. Mag., vol. 18, no. 3, pp. 33-40. Lewis, R. (2000). Programming Industrial Control Systems Using IEC 1131-3. Ed. IEE Books. Piedrafita R. (1999). Ingeniería de la automatización industrial, Ed. Ra-ma, Madrid, Spain. UTE: Union Technique de l'Electricité. (1995). Norme Française NF C 03-190 + R1 : Diagramme fonctionnel "GRAFCET" pour la description des systemes logiques de commande. Ed. UTE Editions Wagner B. (1999). From Computer-Based Teaching to Virtual Laboratories in Automatic Control. Proceedings of the 29th ASEE/IEEE Frontiers in Education Conference.