[IEEE 2011 9th World Congress on Intelligent Control and Automation (WCICA 2011) - Taipei (2011.06.21-2011.06.25)] 2011 9th World Congress on Intelligent Control and Automation - Networked monitoring system based on embedded dynamic web

May 29, 2018 | Author: Anonymous | Category: Documents
Report this link


Description

Networked Monitoring System Based on Embedded Dynamic Web Hui Huang Dept. of Automation Chongqing Industry Polytechnic College Chongqing 401120, China [email protected] Jianchao Bi College of Automation Chongqing University Chongqing 400030, China [email protected] Xiaoyi Yang College of Education Science Chongqing Normal University Chongqing 400030, China [email protected] Abstractâ Aimed at the difference in communication protocol among dispensers, resulted in being difficult to realize the monitoring system integration, this paper presented a sort of integrated monitoring solution based on embedded Web. The core device of monitoring system chose a sort of embedded Web server based on Intel Xscale IXP-422 RISC CPU. The servers distributed in the industrial field of gas stations were interconnected through industrial Ethernet, and composed a wide area network system based on Web service. The field bus of field device connected to Web server in the field local area of gas stations to complete the integrated monitoring of field device. The system adopted the architecture of distributed browser / server. By means of the approach of Apache + HTML + PHP, the monitoring and management of the gas stations could be realized based on embedded Web, and the realization of dynamic Web browse could be completed by control unit. The results of the practical test show that it is available in reality, and provide a better solution to realize the networked monitoring. Index Termsâ Web service, embedded system, networked monitoring I. INTRODUCTION Nowadays, The Web has been widely used into the exten- sive industrial applications [1][2][3]. It has been become a hot topic to apply Web technology for industrial monitoring field. By means of running the embedded Web server of field control device in the bottom layer of industrial control sys- tem, it can be accessed and monitored to all control devices in industrial field through Internet in anywhere for using general Web browser [4][5][6], and get the aim of monitoring field device expediently. Through the page layout of Web stored in the field control device, it can dynamically reflect the running state of field device and feedback information after executing the monitoring operation, and also it can collect field running real time data more accurately, make various checking analysis, control the field devices, and carry through system maintenance easily and so on. This paper takes the monitoring system of gas stations in oil product retail network as an example to explore a sort of realization of monitoring system based on embedded dynamic Web. II. ARCHITCTURE OF NETWORKED MONITORING SYSTEM A. System architecture The Fig.1 shows the architecture of networked monitoring system in gas stations. The field devices in forecourt of gas stations, such as dispensers, tank level gauges and so on, are connected directly to the Intranet / Internet through embedded Web server, then by means of Ethernet port or wireless port, and it can be connected to the browsing monitoring station or moving browsing monitoring station based on Web. It is propitious to realize the data communication and monitoring in real time, network security and encrypt system for this sort of architecture, and to adopt Web embedded technology for realizing dynamic monitoring and integrated management. The advantages mainly are incarnated as the following, such as that it is more convenient in realizing intelligent communication, configurable and controllable in device on line, realizable in store-forward of real time data, and ensures the integrality and security of data transfer. Fig. 1. Architecture of networked monitoring system Proceedings of the 8th World Congress on Intelligent Control and Automation June 21-25 2011, Taipei, Taiwan 978-1-61284-700-9/11/$26.00 ©2011 IEEE 208 B. Structure of software system The implementation of software system is applied by embedded dynamic Web. The software system based on embedded dynamic Web consists of three parts which are operating system, Web server and application software, the structure block diagram is shown as in Fig.2. Fig. 2. Structure of embedded dynamic Web The following are the rough explaining. 1) Implementation of intelligent communication: The front-end devices) can carry through processing various data of heterogeneous oil device so as to be convenient for system monitoring and extension. It can adopt the embedded intel- ligent computer of industrial grade being suitable for field scurvy environment, and carry through structured program development of collectivity design and object oriented for communication software from systematic hierarchy. And it can design different module in terms of data communication protocol of different devices to realize the intelligent com- munication so as to carry through unification control and management for different oil devices. 2) Configuration and control of device online: The mode of system development is used by dynamic Web based on Apache + PHP + data file for Linux. Through the page layout of Web it can neatly realize the device configuration and status setting for various forecourt devices, and reflect dynamically the real time state of each device such as oil gun state of dispensers, and look over the log file of forecourt controller running and analyze the statistic log file to acquire the running statistic data that offers the base of the first hand data for erratum and correcting fault. According to the access content of purview enactment, each user owns different man- agement purview. Only the supervisor has double purview of both read and writing. It can ensure the data security transfer over network and offer the accessing function of encrypt securityrenew and load the price list of oil plants and oil grade in real time, realize the control for all forecourt devices such as dispensers and oil gun being on or off, it can monitor manifold oil devices that will be more complex in instance and higher in control difficulty. 3) Store-Forward of real time data: The inner ROM of front end control device is easily divided as four areas that are Boot Loader, Linux Kernel, Mini Root File System and User Root File System. When system results in breakdown rooted in user program reason, the Mini Root File System can be used as emergency root file system. When User Root File System in the Boot Loader is loaded to be failed, it can activate the Mini Root File System and introduce a sort of inner embedded mechanism to prevent system breakdown and ensure the steady reliability of system running. Once the system fault occurs in background network, the data communication of Store-Forward can be used. The data is stored into the file of JFFS2. After the fault is eliminated, the collected data will be automatically transmitted into the corresponding main computer. And it does not influence the normal work of dispensers and related devices. Therefore it ensured the integrality and security of system. C. The hardware structure of Web server The Web server is an embedded computer of high perfor- mance in which a 32MB NOR Flash ROM and a 128MB SDRAM is configured, shown as in Fig.3. It has rich re- source such as eight serial ports, double 10/100 Mbps Ether port, wireless communication of PCMCIA, 8-channel data input and 8-channel data output, and extended interface of CompactFlash. Fig. 3. The inner structure of Web server III. THE FUNCTION OF SOFTWARE The core part [7][8][9] of system is an embedded com- puter configured by embedded system of Montavista Em- bedded Linux, shown as in Fig.4. By means of scheme of ApacheHTMLPHP, it can realize dynamic browse and modify the system configure of Web server dynamically. 209 Fig. 4. The system structure of Linux Also it adopts development tool, such as GCC [10] and so on, to develop user application program so as to realize the monitoring for field device of gas stations. The Web server can implement the following function. 1© Look over the state for various dispensers in real time, configure the devices of gas stations, and set the work status of dispensers. 2© Look over the log file of Web server running and make statistic and analysis for running statistic data so as to offer the base for eliminating erratum. 3© Set accessing purview so as to ensure the data being security transfers in network, and to offer the accessing function of secret security. 4© Control the parameters such as dispensers work status, setting oilcan and price brand under the condition of certain control of security level. IV. IMPLEMENTATION OF PROTOCOL CONVERSION The function of protocol conversion is to realize infor- mation conversion from forecourt device interface protocol to IFSF protocol [11] based on TCP/IP, and to implement the real time information processing of forecourt device in the embedded Web server. The protocol conversion consists of two modules that are respectively the IFSF interface module based on TCP/IP and the conversion module between forecourt device interface protocol and IFSF protocol. A. IFSF protocol interface based TCP/IP Shown as in Fig.5, it consists of four modules. 1© Appli- cation module of IFSF is used to control the implement of application program of forecourt device. 2© IP protocol stack module is used to implement the IP protocol connected by network, it provides the function such as network connection management and IP address parsing and so on. 3© DHCP server is used to connect the device assigning address of Ethernet. 4©Conversion module between IFSF and IP is used to implement the three functions that are to receive and send the Heartbeat by use of Heartbeat Proxy, to manage all the link list connected, to send and receive all the data through TCP connection. Fig. 5. The structure of IFSF based TCP/IP B. Protocol conversion between forecourt device interface and IFSF It consists of two function modules, shown as in Fig.6. One is the protocol interface module of forecourt device and another is proxy module of IFSF. The former realizes the interface for idiographic forecourt device. Its main function is to parse communication frame of device, to monitor the oil process, and to make the response for special case of dispenser. And the latter is used to respond the âwrite/readâ for each node request of IFSF. According to the protocol and frame format of IFSF, it realizes the accessing among IFSF nodes. Fig. 6. Protocol conversion The communication is carried through the database among the above modules. The proxy module accesses the database that it represents to access the forecourt device. The database stored all the information of dispenser and forecourt device, including oil gun state, protocol version of dispenser, oil price version, trade record list and accumulative total of trade statistic data and so on. In all the information, the data that has higher demand of time effect is all with the time 210 stamp. If the sent write/read information from other IFSF node wants to access the data that is time sensitive, then it can directly access the data through database. Otherwise it can send the data request order forward to forecourt device protocol interface module through another information transfer channel between device protocol interface module and IFSF proxy module, and the device protocol interface module must make response in a certain time. It can implement the monitoring and management for the function in some data file such as oil quality file and general information of gas stations of data base through integrated monitoring module. Once the module of device protocol interface apperceives that the file variety is happened, it will be automatically start up to general information query in- struction in the program and go into the information renewing stage. The function of control and management is to transfer the trade record of all dispensers into the main computer. If it is off line (for example, the signal interrupting rooted in line fault) then the trade record can be directly stored in local area. When the fault is eliminated, the data will be automatically transferred into the main computer so as to ensure the data integrality of management system. C. Software design For saving system resource and realizing share data, the conversion function is implemented by means of creating thread mode. Each serial port creates a thread to implement the communication between device and conversion so as to ensure communication independent one another between device and conversion. In addition, the sub-thread of Ethernet should be created. The forecourt controller end is considered as server end, through creating connection with POS, it can realize the communication between protocol conversion and POS. The data interaction of thread is implemented by means of sharing data storage. Fig. 7. The system flowchart The system flowchart is shown as in Fig.7. The POS carries through control and data transfer for field device of gas stations by forecourt controller. And vice versa, the process is that the data in each forecourt device is packed in format of IFSF frame to be transferred after data being parsed through forecourt controller, finally the POS transfers data to background server. D. The module of serial communication In terms of configure file, it carries through parameter needed setting for each serial port. In the program, through read in configure file it makes the serial port complete initialization. For avoiding long time waiting, each serial port assigns a thread so as to complete time-sharing operation. The main code of monitoring in thread is as the following. int fd=SerialOpen( Port); fd set readfs; while(1){ FD ZERO(&readfs); FD SET(fd,&readfs); int ret =0; ret=select(fd1+1,& readfs,NULL,NULL,NULL);} switchret{ case -1 default if (FD ISSET(fd, & rfds)) {/*data processing function*/} } Each thread assigns a private data buffer. When the data sets in, it is accepted into data buffer by use of function of recv ( ), after right checkout of CRC16, parsing packet and pick-up effective data, finally packed and transfered into the POS. When the net is off line, the oil data will be stored temporarily. In main program, the oil data stores by means of static structure array. For example, the frame format after packing oil data is the following. typedef struct { short int lnar; short int lnao; unsigned char ifsf mc; unsigned char bl; unsigned char m st; unsigned char m lg; short int data add; unsigned char data id; unsigned char data lg; struct oil trade; } trade frame; static trade frame temp oil[1000]; It adopts the mutex storage of share memory to prevent the producing conflict that different thread stores data at the same time and after arriving delay time, it creates new thread to transfer data. 211 V. REALIZATION OF DYNAMIC WEB SERVER All the user interfaces of dynamic Web server can be implemented by the WWW browser. In which the part of affair logic can be realized in the front end. But the main affair logic is still implemented in the server end, and forms so called 3-tier structure, shown as in Fig.8. This mode is the direct access between Web server and browser. The application program is put in the server, and it is unnec- essary to develop client end program. There are two sorts of development methods, CGI (Common Gateway Interface) technology and embedded technology. In this paper, the latter will be used. Fig. 8. The structure mode of PHP service It makes special script, such as Javascript, VBscript and PHP, embed into HTML by specified mark. When the client browser sues, the Web server is able to explain engine execution to script by using of corresponding script, and completes the operations of query and modification for background database in terms of idiographic condition, and finally the results will be returned back to browser end. In the development mode of dynamic Web of Apache + PHP +database based on Linux, Apache is a sort of HTTP server of open source code, through simple extension of API, the decipher, such as Perl/Python etc, can be translated and edited into the server. The PHP is a sort of script language of typical server end used by creating and executing dynamic Web page layout in the server. Combining PHP with Apache server and making it as a module, and it is embedded into the Apache not only to realize code simplification, but also to execute higher efficient and more shortcut. The work flowchart of Web server in detail is shown as in Fig.9. The key code is as the following. $ variable N = $ POST[âvariable Nâ]; $md5password=(md5($password)); fseek(handle,offset) fwrite($handle,$myFile[$i]) VI. FUNCTION TEST The system function test carries through the environment under the condition of network. Using test signal resource Fig. 9. Work flowchart of Web server being in place of analogue signal, the method is to simulate the receiving & sending data and order of POS and dispenser respectively by using two computers, by means of software server platform of Apache + PHP, after completing compiling of protocol conversion of main program and related program, it will be loaded into the development device. And at the same time, the compiling of the Web page layout will also be entered into it. By running the development device, we can directly view the testing results from display menu at client end. The interface of parameter setting is shown as in Fig.10. Fig. 10. The interface of parameter setting 212 From the Fig.10, we can modify and look over port configuring file, and the POS can simulate to control the dispenser to oil, to set oil parameters, and to control the oil card inserting and exiting. Also it can simulate the operations of dispenser such as lifting the oil gun, hanging the oil gun and making balance etc. The testing result shows that it can complete protocol conversion of dispenser and POS, realize all the functions controlled by POS. CONCLUSIONS It is a necessary trend to integrate and communicate among different protocols for industrial automation control devel- opment in future. Through the application example above, it shows that it can better realize the monitoring in system and sharing in data information, and make the maintaining easier for networked monitoring system based on embedded dynamic Web. REFERENCES [1] Cercone N, Lijun Hou, Keselj, V et al, From computational intelligence to Web intelligence. Computer, vol. 35, issue 11, pp. 72 - 76, November 2002. [2] Smimov A, Pashkin M, Chilov N et al, Agent based Web intelligence for logistics support in networked organizations. Intelligent Transportation System, 2004 [The 7th International IEEE Conference on, pp. 922 - 927, October 2004]. [3] Butz C J, Hua S, Maguire R B, A Web Based Intelligent Tutoring Sys- tem for Computer Programming, Web Intelligence, 2004 [Proceedings IEEE /WIC/AMC International Conference on, pp. 159 - 165, September 2004]. [4] XU Wei, TAN De-rong, Development of control and management system based on network for gas station. Journal of Shandong University of Technology (Sci & Tech), vol. 18, pp. 59-63, July 2004. [5] SONG Hong-wei, Zhen Ran, Design and realization of gas station central control system, Microcomputer information. Volume 22, pp. 106- 108, 2006. [6] WU Qiu-qin, Development of remote monitoring system based on embedded web sever. Journal of Xihua University (Natural Science), vol.25, No.6, pp. 39-41, 2006. [7] Li Zhuo-heng, Linux network programming, Beijing: China machine press, 2000. [8] Klaus Wehrle, Frank Pahlke, The Linux Networking Architecture, America, Prentice Hall, 2004. [9] Neil Matthew, Richard Stones, Beginning Linux Programming The 3rd Edition. Canada, Wiley Publishing, Inc. 2004, pp. 187-189. [10] Comparison between PHP and other CGI, http://www.51iter.com/wang zhan/php/200508/wangzhan 708.html. [11] International Forecourt Standard Forum, Communication on specifica- tion over TCP / IP, 2002. 213


Comments

Copyright © 2025 UPDOCS Inc.