Web-Based System Monitoring and Control Z. G. Altun, U. M. Topaloglu, and A. V. Saygin Department of Physics University of Çukurova, Adana, Turkey E-mail: zaltun, topaloglu,
[email protected]
C. Bayrak Computer Science Department University of Arkansas at Little Rock Little Rock, AR E-mail:
[email protected]
Abstract In general, monitoring is an essential process to observe and improve the reliability and performance of a system. The same hypothesis is also true for a specific distributed system introduced in this study in the form of monitoring and control. The web-based monitoring and control in a distributed environment generates a large number of events during the execution or interaction among the internal and external objects. Monitoring and controlling such events are necessary for observing run-time behavior and providing status information required for analysis. However, this becomes rather a complicated and intricate task, if we consider the correlated nature, in which task are generated concurrently, of the process. In this study we are presenting an interactive event filtering mechanism to detect and classify interesting local and global event by monitoring over the internet. In our implementation we have used a Programmable Logic Controller (PLC) to transmit the equipment’s data to the server computer and control the equipment by executing the commands received. In our approach, the server will process the incoming equipment related data and will send them, along with the associated screen snapshots, to the client. Server will also transmit the user and/or client-originated commands to the PLC. The fundamental idea of getting data and screen snapshots from the server and responding by sending the required commands will allow user/client to obtain the control authorization for monitoring the process remotely. Although the scope of this experiment contains a small infrastructure composed of one process, one server, and one client, the proposed method can easily be adapted to systems in different domains such as monitoring for security, care, and maintenance.
1. Introduction The rising usage of Internet has been complemented with developments in communication technology. Moreover, Networking technologies start to invade the home to carry phone signals and TV programs, link computers and peripherals, and tap into the Internet [1,2]. These rapid developments show that Internet based
systems have had a huge role in home and business solutions nowadays and will have more in future. Therefore, many software developers have been forced to find ways of developing systems more quickly than ever before. Internet technology allows companies to overcome many of the physical constraints that often prevent them from doing business in distant markets, which means that an e-commerce market is fundamentally global [3]. A WebBased Financial Trading System [4], Education on the Internet [5,6] and Interactive Multimedia Communication Systems for Next -Generation Remote Education Using Asymmetrical Satellite and Terrestrial Networks [7] are a few examples of applications on Internet. Besides, in a recent study, a number of researchers [8] explained that Internet technology provides a way to power engineering educators globally to combine their efforts in increasing course development resources. For years research has focused on ways to allow remote access via standard communication. With the growth of Internet, one finds more and more devices such as coffee machines, telescopes, manipulators, and mobile robots connected to it [9-12]. An Internet-Based Real-Time Control Engineering Laboratory [13], and even, music exchange community “Napster” [14] show that remote controlling over Internet is becoming widespread. The issue of process control has been effectively instrumental in raising the productivity in industrial automation for years. Remote control of processes is new era and only supported by a few companies, which are the giants of automation industry. Our proposal is also related to the control of industrial process with the exception of Internet. The idea proposed here comes with industrial automation for accessibility and controllability from anywhere. The goal of this study is to discuss the details of the system that can control an industrial process over the Internet or intranet. The remote processing has a bright future, especially in the companies with many branches
For simulation purposes, SIMATIC1 S7-200 PLC was used as process controller. However, it is possible to use any other process controller such as DCS (Distributed Control System), single loop controller, and RTU (Remote Terminal Unit). It is used to control the processes of the equipments, and to bi-directionally communicate with the server. Additional tools are also developed to maintain the process control dialog between the server and the client. In our web-based monitoring model, the monitored process can be viewed as event producer, which continuously generates events to reflect the execution status. On the other hand, the monitoring process is called event consumer, since it receives and processes the status reflecting events generated by the monitored process. With respect to the intensities and dependencies, events can be classified as simple or complex events. An event is simple if it produces a single notification. Otherwise, it is called complex event. Event monitoring is initiated by the client through the use of filtering.
3.1. Process The program needed for the PLC controller is written in the STEP-7 MicroWin PLC Program Editor and defines the first network node2, which is the first operative part of the PLC program code, and arranges the required communication protocols (baud rate, parity, data bits, and stop bits) as shown in Figure-2.
Server side Tank
Mixer
On/off commands Actual values PLC
Process and Alarm databases
A computer connected to the automation devices can control and get data from processes at a production unit. In the remote process control environment (REPCO) environment introduced this process is done using PLC connection to a server, which can be controlled via Internet by a user who is far away from unit, as shown in Figure-1. The architecture used can technically be decomposed into three parts: 1) Process, 2) Server Program, and 3) Client Program. The high level functional flow of the system is shown in Figure-2. The server software part is designed to handle three jobs. First it establishes a communication path with PLC. Second, the server maintains a smooth operation and records process related data. Lastly, it commu nicates with the client to obtain the process data and the server screen, according to which user commands are fed to the server. The communication between server and Client is
SIMATIC and Microwin is the Trademark of Siemens Corporation.
Motor2
Level
3. The Architecture
1
Motor1
Record new alarm and process values
2. Technical Approach
handled through the use of Windows Socket, which supports TCP/IP.
On/Off Commands for motors Level and motor values
ServerPC
All records for Client/Server User
where electronically controlled machines are deployed as a part of the workforce. While a computer connected to the automation devices can control and take data from processes at a production unit, the operator can process the data according to the rules and regulations and then issues commands necessary to control the system.
Commands, chat data, capture request, database transfer request, alarm request Captured screen, process and alarm values, chat, databases
INTERNET Client Side
Commands, chat data, capture request, database transfer request, alarm request Captured screen, process and alarm values, chat, databases
Client PC
Figure 1. The architecture of the web based system
2
The software environment developed for PLC contains components called networks.
// communication protocols NETWORK 1
For example, when any data comes from computer to PLC, this data is being evaluated in interrupt section of the program. Data coming from a computer can be captured and evaluated with respect to a set of conditions. For each condition check, a device start command will be generated and sent to the process. For simulation purposes, a simple chemical process was utilized, which has a storage tank and three motors for filling, mixing, unloading.
LD SM0.1 MOVB 9, SMB30 MOVB 2, VB100 ATCH 0, 8 ENI R M5.5, 1 //send process data NETWORK 2 LD SM4.5 LD M5.5 A M0.6 LPS XMT VB100, 0 A M0.6 R M0.6, 1 MEND
3.2. Server Environment
START
Arrange Communication Protokol
Read input Values
Any Changes
YES
Send New Values to PC
Server environment, which runs on the server computer, is an interface between clients and processes. Its purpose is to retrieve data from the process, record the data into the database, control the process through the use of proper commands, and get and send data to the client. Therefore, the server environment composed of two parts: communication and monitoring. The communication is the means to interact with the client. Therefore, it is the most important part of the proposed work. The aim of communication is to give permission to the authorized personnel for viewing/controlling the process online. In the implementation of this project three types of communications are used: the communication with PLC, the communication with clients and the communication with database. The communication with PLC is supplied in ASCII format via serial port, so all data, which are being fetched or sent, are converted into the ASCII equivalent in each side. For the serial communication to take place, Microsoft? MSComm.ocx is used.
NO
3.3. Communication and Client Environment
NO
Any Data From PC
YES
Process Comming Data
NO
Alarm Wanted
YES
Alarm Occured
Wait for Process Response to Commands
YES
Send Alarm to PC
NO
Figure 2. PLC program Flowchart and Start Code Part
The client environment is also implemented as an interface that not only connects the authorized person to server via internet/intranet but also allows user to control/view online the process remotely through server, with respect to the given permission. A user (client) can also view/control more than one server. Actually, in any system there is one server and one or more client(s). However, an authorized engineer may wish to view processes going on at two or more different places, as shown in Figure-3, where there are two different processes with two servers, and one client in the system. A client may view/control these two or more processes at the same time or also one or more client(s) can process on one server. On the other hand, Figure-4 shows another type of control where one or more clients can process on one server.
changes) and the most recent state changes (along with the record number, date and exact time, and the alarm value of the equipment) two different types of databases are used: process value and alarm databases. The initial status recording is done via PLC using serial port and compared with the new value. If they are different then the new value will be recorded. Otherwise nothing is done. The communication status validation is done through the use of commands for determining the handshaking. Figure 3. Client can view more than one process
START
Read Process values
PLC
Server
Record values to database
Internet
Client-1 System is auto
Yes
Code gives commands
No
Client-2
Wait user commands
Process Client-3
Send commands to PLC
Figure 4. Multiple clients can view a process. Server side algorithm of communication with client and process can be viewed in Figure 5. The communication between client and server can be established in five different ways. These are: connection for chat, sending process and alarm values, receiving commands, database transfer, and sending screen snapshots.
Record changed values to database
Remote connectio n active
NO Yes
Draw Trends
3.3.1 Connection for Chat A client can interact with the server by using the chat connection, if and only if there is a server connection established. Chat enables sending messages from the server to the client or vice versa for corresponding online. The communication is defined to be indirect, since a temporary message box is used between two nodes. In other words, when any character is entered to chat box, the function is activated and immediately checks for remote connection, then sends the characters to other side. 3.3.2 Process and Alarm Two different ports were used in order to send the values of process and alarm. The interaction to send the process related values and accept the incoming commands takes place as soon as the connection between server and the client is established. The preset values and the warning to update the values, if there is any change, are sent from the server to the client. Therefore, in order to store and maintain the process values (namely state and value
Send values and screen
Chat wanted Send Commands to PLC
yes
Open chat session
no
Database wanted
yes
Send in binary format
no wait client user commands
Figure 5. The Server Environment Algorithm 3.3.3 Connection for Database Transfer This connection type using sockets is implemented to allow user to view the values/data at any time period, instead of monitoring the whole system. This process gets initiated when the client extends a request to server to view a database and ends when the transmission is completed.
In this implementation the indexing method proposed by Microsoft is used. 3.3.4 Connection for Screen snapshot Screen snapshot enables the client to view the server screen for process activity. The aim is to visualize the process, thus, the client can control the process as if it is using server. Screen is captured as .bmp using related .dll’s and then converted to JPEG. Since Graphics data well exceeds the volume of textual data, compressing into JPEG format reduces the file size range that is tolerable for Internet delivery. In terms of format a screen approximately has a file size of >1.40 MB, while in .jpg format, the same image has a file size of