Session F4C SOFTWARE TOOLS FOR HELPING WITH THE DESIGN AND IMPLEMENTATION OF AUTOMATION PROJECTS Antonio M. López 1, Víctor M. González2, José M. Enguita3, Felipe Mateos4 and Antonio Robles5 Abstract The practical teaching of process automation requires laboratories equipped with a great variety of tools. The ideal configuration of a laboratory desk could be one made up of real, hardware components. Although the students will have the highest motivation with such configuration, the cost and the lack of flexibility are fundamental drawbacks that must be solved. A balance must be achieved between real and virtual components, which will lead to a balanced cost and flexibility without decreasing the students motivation and the quality of education. This balanced solution is presented in this paper. Index Terms Automation teaching, Control, Laboratory equipment, Process simulation, Supervision.
INTRODUCTION The practical teaching of process automation requires laboratories equipped with a great variety of tools. The ideal configuration of a laboratory desk could be the following: 1. At least one controller such as a programmable logic controller (PLC), a personal computer (PC) or a micro controller. 2. A process, or a model of the process to be controlled. 3. A personal computer to run a SCADA (Supervisory, Control and Data Acquisition) software to supervise the process. The use of our own software tools specifically designed for helping with the implementation of automation projects, has shown to be of great utility for the teacher as much as for the students. Their great flexibility allows proving many different control strategies from the simplest ones to the most complex. At the same time, their low cost permits reducing the number of students assigned to a workstation, providing each student with more hands-on experience. Such tools, given in Figure 1, are presented in this paper: an industrial process simulator, Prosimax, a PLC programming tool based on SFC (Sequential Function Chart), Mediss, a PLC simulator, Winss5, and a SCADA software, Scalibur. These applications are part of a bigger research project called GENIA (Integrated Automation ENvironment Group, http://isa.uniovi.es/genia) which aim is the total integration of all them with the most common tools of an ordinary automation laboratory.
SUPER VISION
CONTROL
PROCESS
Operator Pannel PC + SCADA
Cabled Logic PLC’s PC + I/O Card Microcontroller
I/O Simulator Real process Models
Mediss Winss5
Prosimax
SCAlibur Visgraf
Integrated Automation ENvironment Group
FIGURE 1 AUTOMATION LABORATORY
A concrete example is used throughout the paper to show the educational enhancements that can be reached by using these applications.
AUTOMATION PROJECT EXAMPLE The goal is to design an automaton to fill a cart with some liquid made up of two different components ‘A’ and ‘B’, and transport it from one place to another. The system configuration is shown in Figure 2.
ACK
LALARM CMR
CML
CEMPTY
Control Pannel
LEVEL
HERE
MR ML EMPTY
THERE
FIGURE 2 MIXING PROCESS SCHEME
The following shows the behaviour of the process.
1
Antonio M. López, University of Oviedo, Ingeniería de Sistemas y Automática, Campus de Viesques, 2.1.15, 33204 - Gijón, Spain.
[email protected] Víctor M. González, University of Oviedo, Ingeniería de Sistemas y Automática, Campus de Viesques, 2.1.14, 33204 - Gijón, Spain.
[email protected] 3 José M. Enguita, University of Oviedo, Ingeniería de Sistemas y Automática, Campus de Viesques, 2.1.14, 33204 - Gijón, Spain.
[email protected] 4 Felipe Mateos, University of Oviedo, Ingeniería de Sistemas y Automática, Campus de Viesques, 2.2.04, 33204 - Gijón, Spain.
[email protected] 5 Antonio Robles, University of Oviedo, Ingeniería de Sistemas y Automática, Campus de Viesques, 2.2.10, 33204 - Gijón, Spain.
[email protected] 2
0-7803-6669-7/01/$10.00 © 2001 IEEE October 10 - 13, 2001 Reno, NV 31st ASEE/IEEE Frontiers in Education Conference F4C-12
Session F4C ‘A’ liquid preparation In automatic mode, the cycle begins filling ‘deposit 1’ with liquid ‘A’ that must be heated to a certain temperature. These are the steps: • First, ‘V1’ must be open when ‘deposit 1’ is empty, allowing liquid ‘A’ to fill it. • Close ‘V1’ when maximum level is reached. • Finally ‘V3’ must be open beginning the heating of liquid ‘A’ until the temperature reaches the level indicated in the thermostat ‘TMP’. Then ‘V3’ must be closed. ‘A’ and ‘B’ mixing While there is liquid ‘A’ in ‘deposit 1’, and ‘deposit 2’ is empty, the ‘A’ and ‘B’ liquids must be mixed following these steps: • Valve ‘V2’ must be open until ‘deposit 2’ is filled with 400 litres. If there is not enough liquid in ‘deposit 1’, the former process must be triggered. • The mixing motor ‘MTR’ is started. • Pump ‘BMB’, is then connected allowing liquid ‘B’ to fill ‘deposit 2’ until it contains 700 litres. • ‘MTR’ must be mixing during 5 more seconds. Final liquid transportation The resulting mixed liquid is emptied into a liquid cart through valve ‘V6’ when it is located in the ‘HERE’ position, until ‘MAXC’ sensor is activated. Once the maximum level is reached in the cart, ‘MR’ must be activated moving the cart to its right until it reaches the ‘THERE’ position. When the cart is there, ‘EMPTY’ must be activated during 2 seconds, allowing the cart emptying. Finally, when the cart is empty, ‘ML’ must be activated to move the cart to its left, until the ‘HERE’ position. This process must be repeated until the whole amount of mixed liquid is moved. Manual/Automatic modes A switch labelled ‘M/A’ allows the user to change between the manual and automatic modes. When it is pushed, the automatic mode is activated. When it is released, the manual mode is activated. If any alarm happens, the system is automatically turned onto manual mode. Alarms These are the situations when an alarm may occur: • Overheating. If in the heating phase it were detected that the thermostat didn’t trigger before 10s, the system should automatically enter manual mode, close ‘V3’ and start a blinking lamp with a frequency of 2Hz. • Overflowing. If while filling ‘deposit 2’ the level reaches 750 litres, the system should automatically enter manual mode close all valves and start a blinking lamp with a frequency of 1Hz.
After any alarm occurs, the user can push the ‘ACK’ button to reset the alarm and the lamps. Control Panel The control panel is made up of the following components: • A switch labelled ‘M/A’ • Two lamps: ‘LAUT’ and ‘LMAN’ to show the actual system operation mode. • A push button ‘ACK’ and a lamp, ‘LALARM’, to show that an alarm has occurred. • A set of push buttons to control different components of the process in manual mode, i.e., ‘AV2’, ‘AV6’, ‘CMR’, ‘CML’, ‘CEMPTY’ to command respectively ‘V2’, ‘V6’, ‘MR’, ‘ML’, ‘EMPTY’.
CONTROL PROGRAM Blocks scheme Due to the fact that STEP-5 supports structured programming, the control program could be organised as shown in Figure 3. OB1: Main Module
PB0: General
SPA PB 0 PB11: Alarms SPA PB 11 U -M/A ZV Z 1 LZ1 L MB 110 U M 100.0 S -AUT U M 110.1 0 -ALART 0 -ALARN R -AUT RZ1
PB1: Initialization PB123: Automatic mode PB2: Stage Act/Deact
U -AUT = -LAUT SPB PB 123 PB100: Manual Mode
PB3: Actions execution
UN -AUT =-LMAN SPB PB 100
BE
FIGURE 3 MODULE SCHEME
Usually, the development and debugging stages are performed using the manufacturer's programming environment. In this case, the Siemens STEP-5 programming software. However, Mediss and Winss5 provide the necessary tools for developing and testing the control program, even without the need of the physical control device. Mediss: designing the sequential part Mediss is used in this example to create the control program of the sequential part of the automatism (automatic working mode). The starting point is the SFC shown in Figure 4. SFC allows an overall description of the process and its associated control, independent of the hardware control equipment to be used [5]. Using Mediss allows to have a
0-7803-6669-7/01/$10.00 © 2001 IEEE October 10 - 13, 2001 Reno, NV 31st ASEE/IEEE Frontiers in Education Conference F4C-13
Session F4C more heterogeneous lab equipped with PLCs of many different makes.
Optionally, the steps and actions equations could be displayed, as well as the input/output mapping, which is completely configurable. The remaining code is not implemented using SFC, as it does not have a clear sequential character. In this case we have to complete the control program with the instructions needed to perform the manual working mode, alarmcondition handling and some other general functions (analogue variable reading and value comparison, timers to generate frequency signals, etc). To achieve this, we can use the Simatic S5 simulator program, called Winss5. Winss5: Control program simulation Winss5 is a Windows application that performs the edition and simulation of STEP-5 control programs in instruction list (IL) language, for the Siemens Simatic-S5 series of PLCs. In Figure 6 we can see the application's main window along with the workspace created for testing the control program developed for this example.
FIGURE 4 AUTOMATIC MODE SFC
We are thus, moving from a classic low-level programming to a visual high-level programming, which is easier to maintain, and implies lower development and debugging times. In Figure 5 the main screen of Mediss can be seen. It includes the former SFC and an auxiliary window with the Simatic-S5 control program, automatically generated from it.
FIGURE 6 WINSS5 MAIN WINDOW
It contains several different kinds of windows to edit the program code, visualise the PLC input and output modules, internal variables and PLC internal registers. The debugging tools are very powerful, allowing the execution of a complete program cycle, the insertion of breakpoints or step-by-step execution, thus students can face more complex automation problems. As it is a Windowsbased application, it is easy to insert code created with other applications and its user interface is more friendly and easier to use than Siemens-S5 one. Finally, the control program can be automatically uploaded from within Winss5, to the real PLC. FIGURE 5 MEDISS APPLICATION
PROCESS SIMULATION Bug detection in control programs is one of the most relevant tasks in process automation, quite expensive in
0-7803-6669-7/01/$10.00 © 2001 IEEE October 10 - 13, 2001 Reno, NV 31st ASEE/IEEE Frontiers in Education Conference F4C-14
Session F4C terms of resources involved and time of consumption. The main problem is the difficulty for testing the behaviour of the control program at all of the possible process states. Usually, it is the programmer at the laboratory who simulates the behaviour of the process by means of a set of switches to emulate inputs to the control device, and analysing its response by looking at a set of LEDs attached to its physical outputs. This way, the programmer tries to perform tests to cover as much states of the process as possible (or as much as his patience can bear). Nevertheless, this task is quite tedious and difficult, usually impossible to solve when the number of inputs/outputs is relatively high. To solve this problem, a software process simulation tool, Prosimax, has been developed. It allows a flexible design of a wide set of industrial processes and its simulation in straight real-time connection to the control device: a Programmable Logic Controller via its programming port, a Personal Computer through a serial connection, or any other physical control device by means of an AD/DA adapter card plugged into the computer. Practical work with Prosimax can be divided into three phases: the edition (construction) of the process, the parameterisation of the connections to the control device and the simulation of its behaviour. At the edition phase, the process is designed by the selection, parameterisation and interconnection of different dynamic objects (valves, pipes, tanks, cylinders, etc.). All the three tasks are made by means of a friendly interface without programming a single line of code. Appearance of the different objects can be modified and Prosimax also allows use of a background photograph in a standard format to give the process a real aspect. Figure 7 shows the mixing example constructed in Prosimax. Available objects can also be seen in the object panel.
the edition phase, generic tags are used to identify these signals. At the connection step, these generic tags must be attached to physical signals of the control device. This can be made by means of a dialog box, where each generic object tag is associated (mapped) with an specific physical signal. Figure 8 shows the connection dialog box to map the example’s objects to the Simatic S5 PLC variables used by the control program. At the simulation phase, after the connection of the PC (Personal Computer) running Prosimax with the PLC, the process will evolve “as if it were the real one”. User interactions with the process are also allowed. These user interactions can simulate operator parameterisations or can introduce malfunctions in order to test the response of the control program against anomalous situations.
FIGURE 8 COMMUNICATIONS CONFIGURATION IN PROSIMAX
• • • • •
Prosimax provides some immediate advantages: A higher realism is obtained, getting a better student motivation. Debugging of the control program is easier and friendlier than using switches and LEDs. It allows configuring a wide spectrum of near to reality processes reducing this way the high cost of buying different expensive models. It reduces debugging time of control programs. It increases the sophistication of processes to be controlled.
SUPERVISION Scalibur
FIGURE 7 MIXING PROCESS IN PROSIMAX
Many objects in this process receive output signals from the control device and some other send input signals to it. At
Finally, it is considered the necessity of supervisory monitoring of the process via PC using a SCADA software package. There are many suppliers who offer applications of this type with similar characteristics. Following our policy of development of our own software tools in order to save on both capital and maintenance costs, we have also generated a SCADA
0-7803-6669-7/01/$10.00 © 2001 IEEE October 10 - 13, 2001 Reno, NV 31st ASEE/IEEE Frontiers in Education Conference F4C-15
Session F4C application, denominated Scalibur. It runs on Windows NT and Windows 95/98 operating systems and tries to combine the ease of use with the effectiveness of results. This SCADA tool is comprised of two components: Scalibur (the supervisory part) and the Signals Server. In the first, all the HMI (Human Machine Intercface) aspects are performed: visualisation, data access, history, event handling, alarm logging, reporting and analysis tools. Variables and signals are defined (digital, analogue, etc.) at a logical level with their basic characteristics. The set of actions to be performed on the drawing objects when these signals modify their value (change of colour, size, animations, mouse clicks, change of window,...) is also specified. The Signal Server is a DDE (Dynamic Data Exchange) application that makes the exchange of signals and variables between controllers (PLC's) and the monitoring software, simplifying their addressing. Figure 9 shows a snapshot of Scalibur supervising the mixing example.
basic characteristics of best seller SCADA tools with a more intuitive and easier to use interface.
FIGURE 10 SIGNALS SERVER
Visgraf To help with the debugging process of the control program, it is very useful to be able to follow the activation of the SFC steps in real time, as the control program evolves into the PLC. This can be done with Visgraf, one of the modules of Mediss. Figure 11 shows the look of Visgraf supervising the evolution of the SFC for the mixing example. It is also possible to inspect the values of timers, counters, input variables, output variables, internal marks, etc.
FIGURE 9 PLANT SUPERVISION WITH SCALIBUR
For this example, the supervision has been organised into three windows. The main one shows a synoptic graph with an animation of the process according to the proposed scheme. The level trending of ‘deposit 2’ is plotted in the trends and alarms window. It includes also a historical listing of the alarms detected in the system. Lastly, the Control Panel window brings an interface between the operator and the process. The look of the Signals Server is displayed in Figure 10. A Simatic S5 PLC hangs from the serial ports branch. The addressing of each supervised signal of the PLC is displayed in the right window. Communication with the PLC is made by means of PLC data modules. It is necessary to transfer the values of the control program variables to the data modules used to communicate Scalibur with the PLC. The main advantage of using Scalibur is that students can gain hands-on experience, with a tool that combines the
FIGURE 11 VISGRAF, SFC SUPERVISION
CONCLUSIONS AND FUTURE DIRECTIONS The different software tools presented in this paper, have been used in the Systems Engineering and Automatic Control Area of the University of Oviedo and many other educational centres for several years. In all cases, this approach enhanced the quality of practical teaching in
0-7803-6669-7/01/$10.00 © 2001 IEEE October 10 - 13, 2001 Reno, NV 31st ASEE/IEEE Frontiers in Education Conference F4C-16
Session F4C process automation courses, as a wider variety of examples could be used. The complexity and attractive of those examples also increased. However, this approach must be combined with the use of process models and real hardware equipment [9]. In the last years, a big effort has been put in the further improvement of this set of tools, adapting them to the new technologies, and integrating them in a distributed environment. The final goal is to get what we call the Virtual Automation Laboratory (VAL). As an example, a more open and flexible industrial process simulator is being developed using the ActiveX component technology. Also, a PLC simulator based on the IEC-1131 (International Electrotechnical Commission) standard [6] and PLCopen guidelines [7], and its full development environment is being carried out. The integration of VAL tools is achieved over an open and transparent tool-interconnection architecture based on the client/server concept over TCP/IP communication protocols. OPC (OLE for Process Control) [8] will provide the VAL with a communication gateway to a wide variety of control devices in a standard way.
REFERENCES [1]
Mateos, F., González, V. M., López, A. M., Enguita, J. M., "Prosimax 3.1: Industrial Process Simulator", Users’ Manual, 1997
[2]
Mateos, F., Pérez, J. L., Marcos, M. A., “Mediss 2.0: Design of Sequential Automatisms”, Users’ Manual, 1998.
[3]
Mateos, F., Parra, J. A., “Winss5: Step-5 Simatic Simulator”, Users’ Manual, 1997.
[4]
Mateos, F., Muñiz, M. A., “Scalibur: Software para Supervisión de Procesos”, Users’ Manual, 1997.
[5]
International Standard IEC 848, “Preparation of Function Charts for Control Systems”, 1988.
[6]
International Standard IEC 1131, “Programmable Controllers”, 1992.
[7]
PLCopen Association: http://www.plcopen.org/
[8]
OPC Foundation: http://www.plcopen.org/
[9]
Ertugrul, N., “Towards Virtual Laboratories: a Survey of LabVIEWbased Teaching/Learning Tools and Future Trends”, The International Journal of Engineering Education, Vol. 16, No. 0, p. 1, Dublin 2000.
[10] Buckman, A., “VI-Based Introductory Electrical Engineering Laboratory Course”, The International Journal of Engineering Education, Vol. 16, No. 0, p. 42, Dublin 2000.
0-7803-6669-7/01/$10.00 © 2001 IEEE October 10 - 13, 2001 Reno, NV 31st ASEE/IEEE Frontiers in Education Conference F4C-17