Design and Implementation Of Computer Network-Based Robotic System Using HTML Language and CGi Scripts

A design and implementation of computer network-based robotic system using HTML language and CGI (Common Gateway Interface) scripts is carried out. The system implemented networks may be either a simple wired LAN or wireless LAN or upgrade network to the Internet. The importance of such a system may arise in industrial applications controlled by remote sensing by many users who are distributed at different locations. The work deploys the development of a remote control of a robotic system through LAN, or wireless LAN or any other networks, and it is based on building an HTTP (Hyper Text Transport Protocol) server which has an ability of receiving orders from clients found on the same local area network, and translate these orders into low level machine functions which will be used to give the robotic system different orders. *Dr. Maan M. Shaker, Technical College/Mosul ** Mahmood Sh. Majeed, Technical Institute/Mosul *** Mahmood F. Abdullah, Computer Center, University of Mosul Assistant Prof maanms_56@yahoo.com Assistant Prof mshm56@yahoo.com Assistant Lecturer mahmoodfawzi@yahoo.com


Introduction:
Usually web based remote control of the robotic system depends on some software languages such as Java Applets, in which all clients who want to control the robotic system server should install and work with Java environment. In this work none of the clients should install any work environment. Instead of the Java machine on the server, the server here has the Personal Web Server (PWS), which receives orders from clients and executes them. Accessing an automated manufacturing environment, integrated by networks working at different levels, from a wide environment such as LANs, is an interesting and little developed issue that suggests many possibilities. The objective is to implement a client-server system that remotely accesses services provided by an industrial network. This means a local client can monitor and control diverse productive processes taking place in manufacturing plants by accessing industrial networks, and more specifically, the services provided by them. Efficiently planning and organizing flows of information by means of distributed information processing is an increasing necessity in modern industry.

Network Infrastructure:
Here the proposed computer network is built with the client-server direct connection and the star topology where all computers are connected to a central switch/hub. The maximum distance between each computer and the hub is about 150m for the LAN and the WLAN networks and whole continents in the Internet case. All computers are working with Windows operating system. The PWS (Personal Web Server) is installed on the computer to be the web page server. This server has an interface connected to its parallel port. The reason of developing this interface is to provide the server with an ability to provide the robot with main control signals "which are either ON or OFF in our design". The clients sharing the LAN or the wireless LAN have the ability to provide the same control signals to the robot system connected through an interface which is installed on the server. Each client has the ability of viewing the web pages hosted on the server with the Web Browser. These web pages provide the ability to the clients to control the robot system. These web pages are designed with the HTML. Due to the limitation of this language especially to access all computer facilities like the low hardware level programming, the CGI language is chosen to be an intermediate language between the web pages and the low level programming. The robotic system remotely connected through the LAN system is simulated as shown in Fig. (1), while the wireless LAN network for the same proposed system is shown in Fig. (2).

Network Software:
The main page or the home page is programmed with HTML language; it is the publishing language of the World Wide Web (WWW) [1]. HTML is written in such a way it has standardized tags and elements, which the web browser understands. Web browser is a software that translates the HTML code (along with other associated components like CGI scripts, images etc.) to a friendly viewer web page [2]. Most common web browsers are Internet Explorer (from Microsoft), Netscape and Opera. The main page contains control object to control the robot system. Each object refers to a link of a special CGI script allocated on the server. The source code of the main page is written with the text editor "Notepad" and saved with the extension .html, as shown in Fig. (3). After publishing the main page and viewing it with the Internet Explorer Web Browser, it will be displayed as shown with Fig (4).

Main Page Functions:
As shown in Fig. (4), the main page contains the control object, and with each object there is a brief description of its job. To control the designed robot system which has three joints and for each joint there is a motor, each motor needs three orders to control it: 1. Turn ON the motor in one direction. 2. Turn ON the motor in the reverse direction to that in the previous step. 3. Turn OFF the motor.
Each command is programmed with object oriented programming technique; each object command has its special code. In the HTML language the commands are programmed with the FORM Tag, HTML tag is enclosed within the "<" and ">" [3]. The "post" command defines that the orders which will be provided to the objects and these orders should be posted to the server. Action is the path where the link of the program to be executed is allocated. The action provides the protocol type, the IP address of the server, and the path of the CGI file to execute it [4].

Compiling Programs:
The basic function in the HTML language is to write codes that are generated as web pages displayed with the web browser. For programs written in C language to represent the HTML pages the C programs should be compiled with a special compiler called the GCC compiler [5]. This compiler stands for (GNU Compiler Collection), which converts C programs to CGI. These CGI programs are served with the web site server as the web pages, but instead of producing pure web pages written with the HTML, the web server translates scripts of CGI compiled programs. The server receives orders from the CGI scripts as producing web pages, giving hardware orders to the parallel port, and replying to the clients with web pages declaring that the orders are taken and executed [6]. Fig. (5) Shows a complete Sketch of the relationship between the C, CGI, and HTML languages.

Client, Server Communication:
Mechanism of client requests is to ask the server to provide a data output to the port where the robot interface is installed. This request is replied with an answer from the server as a web page acknowledges the client that the request had been performed [7]. The requests are also classified according to the type of orders. The orders types are listed at the home page. page viewed with web browser; include moving the robotic system up and down, left and right as shown in Fig. (6). The feedback of the motor is viewed with a camera installed on the server. The system mechanism is expressed in Fig. (7), and shortly briefed with the following steps: 1) Client sends requests to the server.
2) The request passes through the network environment. This request will be sent as an HTTP request.
3) The web server receives the request and translates from a high level request (HTTP) to a low level request, and sends the data out to the hardware interface which controls the robotic system. 4) The hardware interface that receives the data from the web server and converts these data into electrical signals to be used to control the robotic system. 5) The hardware interface replies feedback to the web server data input. 6) The server also receives the visual feedback of the camera installed on it. 7) The web server replies the client with the HTTP response and videos back to the client. 8) The client receives the HTTP response as web pages, and views them with the Internet Explorer, and video feedback is viewed with the Net-Meeting.

Upgrading System Implementing Public IP:
A public IP address is restricted for upgrading the web site server to be accessed via Internet. This operation includes connecting the web site server to an Internet transceiver type (Nera). This Internet transceiver connects directly to the Internet through a satellite dish. This satellite dish has a dual LNB's (Low Noise Block), one LNB is for receiving data over satellite connection, and the other LNB is to broadcast data. This satellite system has an upload speed of 128Kbps / 512Kbps download speed.

Conclusions:
The most important results from the proposed designed robotic system based on computer network are: 1. Two networks are built and tested the first one is the client-server direct connection, and star topology network connection, and the second is the wireless LAN.
2. The PWS is installed on the server machine to host web pages. Programs with HTML are written to test the web server in data processing, and all operations are successfully tested.
3. An interface card is designed and tested locally on the web server and through the clients on the network in two stages. The first stage is testing the interface card in controlling electrical signals. The second stage is testing the interface card in controlling the robotic system. 4. A camera video is installed on the web server to capture video frames for the robot transmitting the video to the clients, and to enhance controlling of the robot.
5. Security software is used to record any unauthorized movement of the robot. 6. The PWS is upgraded with public IP address for upgrading the web site server to be accessed via Internet.