Materials Science Forum Vols. 505-507 (2006) pp. 535-540 online at http://www.scientific.net © (2006) Trans Tech Publications, Switzerland
A Web-based Embedded Sequential Controller with USB 1-N Wireless I/O Modules Y.H. Sheu1, a, W.J. Li2,b, Y.C. Chen3 and J. Y. Yang 3 1
Department of Computer Science and Information Engineering, National Formosa University, Yunlin 632, Taiwa
2
Department of Mechanical Design Engineering, National Formosa University, Yunlin 632, Taiwan
3
Department of Electronic Engineering, Kung Shan University of Technology Tainan 710, Taiwan a
[email protected] ,
[email protected]
Keywords: Process Control, PLC, Embedded Controller, USB.
Abstract. This paper designs web-based USB 1-N wireless I/O modules embedded sequential controller. The controller consists of ARM-based core system, a set of USB 1-N wireless I/O data acquisition modules, and sequential control software. The ARM-based core system running Linux operation system forms the basic hardware/software foundation of the controller. The set of USB devices used as I/O interface (sensor and actuator) of the controller. With the use of RF chip, the USB I/O is cascaded by wireless 1-N channel such that multiple data acquisition modules can communicate with the controller by a USB port. The device driver of the USB set for the ARM-base Linux system is developed. The sequential control software is designed as client/server structure. The server-side program and client-side program communicate through the Internet. The server-side control program, mainly a PLC interpreter, is an application developed in C++ in the Linux system. The client-side control program is developed in Java and put under a web server of the controller such that the program can be easily deployed by network and run in remote computer. The client program is also used as GUI of the controller. Introduction For many years PLC (programmable logic control) dominates the process control market since the emergence of mechatronics age for its reliability and low price. Recently, PC-based controller is used. PC is an open architecture system and evolves quickly, soon becomes a competition of PLC. Especially, the population of Internet enhances the power of PC. But, PC based controller also has its weak points: slow start up, unreliable, lack of watch dog timer, and can not stand the severe environmental hazard. These reasons make the PLC still holding the major ground till recently the embedded controller start to grow in the market. PLC is also an embedded system but it is a close system. The development trend of controller is that hardware/software separation and open (standard) system structure are two important design factors. With these factors in mind the product can be easy to maintain and upgrade. Threatened by this trend, the PLC also develops its own embedded PC system covered with the standard PLC interfacing and instruction set [1]. For an open structure controller to maintain its competition in the market, it must upgrade its subsystem, including CPU, operation system, hardware interface, once a while. The hardware interface for a controller rarely changes. But, sometime it was forced to upgrade just because the system standard is upgraded such as ISA interface I/O card is forced to change into PCI interface I/O card. The emergence of USB interface separates the design of hardware interface and core system. Due to its properties of hot-plug and plug-and-play, USB interface soon becomes a standard of many hardware devices. It is not only used in electronic devices but also in biomedical and All rights reserved. No part of contents of this paper may be reproduced or transmitted in any form or by any means without the written permission of the publisher: Trans Tech Publications Ltd, Switzerland,www.ttp.net. (ID: 203.79.252.194-06/04/07,14:23:03)
536
Progress on Advanced Manufacture for Micro/Nano Technology 2005
measurement devices [2-4]. In this research USB interface is used to design input/output modules of a sequential controller. As to sequential control we have done research on it for many years [5], the previous results were also adapted to this research. In this research we design and implement a cost-effective and user-friendly web-based embedded sequential controller. Material and methods
Figure 1
The general description of the Linux embedded control system
Figure 1 shows the general description of the web-based Linux embedded USB sequential control ler. The controller consists of three parts: 1. ARM-based embedded core system:
Figure 2 ARM-based core system. The ARM-based core system (FS-PXA255U, see Figure 2) [6] is an embedded computer running Linux operation system. The system provides designers and software developers with a simple, flexible, and cost effective means. It is designed as a wide variety of hardware devices empowered with network communication and device-level I/O capabilities. The ARM-based embedded system consists of Intel Xscale PXA255 (400MHz), 64MB SDRAM, 32MB NOR FlashROM , two RS-232C communication ports (FFUART and BUART)and RJ-45 10/100 Base-T Ethernet interface. In this system, the 10/100Mbps Ethernet chip (SMSC® LAN91C111 )is adopted and integrated with the PXA255 microprocessor to implement Ethernet interface. The LAN91C111 is defined to facilitate the implementation of a third generation of Fast Ethernet connectivity solutions for embedded applications. In Linux operation system, a TCP/IP stack is implemented to allow data exchange between users on LAN. An USB host chip is required to provide USB connection for peripheral device. The ARM-based core system equipped with a SL811HS USB host controller chip to implement USB connection. In Linux system, an USB device driver is required to let application program communicate with USB peripheral device.
Materials Science Forum Vols. 505-507
537
2. USB input/output devices: The USB input/output devices are used as sensor/actuator interfaces of the sequential controller. They includes one USB-RF device and multiple RF data requisition modules. The USB-RF device could be connected to the SL811HS USB host controller chip of the core system to construct a USB channel.
Figure 3 USB input/output devices. Figure3 shows the simple hardware block diagram of USB-RF device and RF data acquisition modules. The microprocessor (P89C61x2, Philips), PDIUSBD11 (Philips) and the wireless chip (CYWUSB6932, Cypress) are adopted to integrated an USB-RF. The PDIUSBD11 is a cost and feature-optimized USB interface device. It is used in microcontroller-based systems and communicates with the system microcontroller over the high speed I2C serial bus. This modular approach to implement USB functions allows the designer to choose the optimum system microcontroller from the available wide variety. The PDIUSBD11 conforms to the USB specification Rev. 1.1, I2C serial interface. It is fully compliant with the Human Interface Device Class (HID) specifications. The interrupt transfer adopted in the USB-RF device is designed to support those devices that send or receive small amounts of data infrequently, but with bounded service periods. In writing Linux USB device driver, the USB-RF device is simulated to be a standard USB HID class device. The HID class consist primarily devices that are used by human to control the operation of computer systems. The firmware contained in microprocessor was written to fit it with the standard USB HID class. The interrupt transfer speed is 64 KByte (64 Byte/ frame) in USB full speed specification. Wireless technology is applied in the USB-RF device for easy setup of the sequential controller. A wireless chip (CYWUSB6932, Cypress) is adopted and designed for multipoint-to-point short-range wireless connectivity. The wireless chip enables remote RF extended module ability to replace the wire with a low-cost 2.4-GHz wireless solution. The CYWUSB6934 IC is highly integrated 2.4 GHz Direct Sequence Spread Spectrum (DSSS) Radio System-on-Chip (SoC) IC. From the Serial Peripheral Interface (SPI) to the antenna, the IC is single-chip 2.4 GHz DSSS Gaussian Frequency Shift Keying (GFSK) baseband modem that connects directly to a standard microcontroller (P89C61X2 or AT89C2051) as shown in Figure 3. Additionally, the wireless chip can split the band into 78 distinct frequency channels and it is easy to implement multiple RF data acquisition modules. 3. Sequential control software:
538
Progress on Advanced Manufacture for Micro/Nano Technology 2005
We have done researches on sequential control for many years. In this research the previous results were redesigned to adapt to the hardware environment described above.
Figure 4 control software design. The previous research was aimed at tutorial application where program was run in a PC which has more than enough resource for sequential control. The software was designed for vivid animation to show circuit design principle to student audience. In this research the control program is used for real controller which has much limited resource. Furthermore, in the previous design the communication between server and client programs was through TCP/IP raw socket. This would cause problems because security on the web becomes more and more important and most servers have firewalls to block the connecting. Figure 4 shows the program structure of the sequential controller in this research. The control program is separated into server-side program and client-side program. The communication between them is through http protocol. The server-side program is run in the controller in text mode, while the client-side program is put under a web server of the controller. The web server help deliver client-side program. Client-side program is run in remote computer in graphic mode. The text display in server-side program merely indicates information. A client-side program run in other computer could be used as the GUI of the controller. The server-side program is mainly a PLC interpreter. Once run it is resident in the controller keep scanning PLC codes; that is, read the statuses of input modules, execute the PLC codes once, and set the statuses of output modules according to the execution. The only way for the resident program to communicate with outside world is by http protocol with the help of web server and CGI program as shown in Figure 4. CGI processes communicate with the resident process by raw socket. The sequential controller in this research is designed for public user. Ease usage is the key issue. The hardware setup is easy by the help of USB interface and wireless technology. And the client-side program help user set up the process sequence he want. That is it. The client-side program will create PLC codes to fulfill the required process sequence. User can upload the PLC codes to the sequential controller and activate the control action.
Materials Science Forum Vols. 505-507
539
Results and discussion This research designs a web-based USB 1-N wireless I/O modules embedded sequential controller. The main contribution is the USB wireless I/O modules design and sequential control software design for an ARM-based embedded system.
Figure 5 USB wireless I/O embedded sequential controller. Figure 5 show the implement of the USB wireless I/O embedded sequential controller in this research. With the USB device driver we developed in this research, the controller can read/write data to the wireless input/output modules correctly.
Figure 6 Server-side program running in text mode.
540
Progress on Advanced Manufacture for Micro/Nano Technology 2005
Figure 7 GUI of the client-side program running in another computer. The controller is successfully tested in a sequential control lab to control the motion sequence of a two-cylinder pneumatic system. Figure 6 shows the text message in the controller, while the client-side program is run in another computer. The graphic user interface of the client-side program is shown in Figure 7. Conclusions USB has been widely accepted as a serial bus for the consumer electronics application. In this research, a set of USB 1-N wireless I/O modules and a set of sequential control software are integrated into a ARM-based embedded system to form a web-based USB 1-N wireless I/O modules embedded sequential controller. The design and the implement are illustrated in this paper. The embedded sequential controller in this research is not only cost effective but also simple to use. User can easily set up the hardware and configure the sequential control. That makes it feasible for home security market. Acknowledgments This work was supported by the National Science Council under Contract No.NSC 93-2213-E-150-030 and NSC92-2622-E- 150-040-CC3. The patent application is under going. References [1] OpenPLC, http://www.viewmove.com/project.htm. [2] Y.H. Sheu, C.Y. Huang, M.H. Yang, H.Y. Lin,” Combined electrochemical and electrophysiological Data Acquisition Device with flexible extending channel, ”in Int. Conf. on Biological and Medical Engineering, December, 2002, Singapore. [3] C.P. Young and M.J. Devaney , ”Universal Serial Bus Enhances Virtual Instrument-Based Distributes Power Monitoring,” IEEE Transaction on Instrumentation And Measurement, vol. 50, NO.6, pp. 1692-1697, December 2001. [4] Yung-Hoh Sheu, Yen-Chao Chen, Jheng Yi Yang, “Embedded USB Homecare Internet System, “ IFMBE, Japan, 2005. [5] Chiaming Yen and Wu-Jeng Li ,"A Web-based Collaborative Computer-aided Sequential Control Design Tool", IEEE Control Systems Magazine,Vol.23,Number 2,pp.14-19 , April 2003.
[6] FS-PXA255U, cdragon Technology Corp., http://www.ucdragon.com/.