**2. Some concepts**

Now, we introduce the concepts of teleoperation, telecontrol and teleprogramming, which will be used in the sequel.

**Teleoperation** is defined as the continuous, remote and direct operation of equipment (see figure 2). From the introduction of teleoperation technology, it made possible the development of interfaces capable of providing a satisfactory interaction between man and experimental equipment. On the order hand, the main aim of **telecontrol** is to extend the distance between controller devices and the equipment to the controller. Thanks to the development of the Internet, the distance between controller devices and the equipment has been increased (see figure 2).

Fig. 2. Telecontrol, teleoperation and teleprogramming schema.

Web-Based Laboratory Using Multitier Architecture 241

*Presentation tier*. The HTTP Server is the presentation tier. This tier contains several Web

*Logic tier*. In this tier, we have the programming layer. Three programming languages are used in the platform: PHP, Visual Basic and SQL. In the logic tier interacts the blocks: *i)* "PHP scripts" (which contain several programs in PHP) , *ii)* the block of the data base MySql

*Database tier*. The database tier contains information about of the platform, i.e. the users list, logbook. In fact, logic tier and database tier provide security to platform, since it is possible to use restrictions proportioned by a PHP script. This script allows the use of the platform

*Communication tier*. The platform allow establish several ways of communication with the hardware: i) using *Serial Server Component* (RS232 Server), ii) using Windows sockets

*Serial Server Component* is a software based RS232 to TCP/IP converter. RS232 Server allows any of the RS232 serial ports on the PC laboratory to interface directly to a TCP/IP network. On the order hand, also is possible the remote access using the sockets of Windows or DLL's library. The remote user uses its own programs to send instructions to program modules of

Finally, the platform has modules designed in PHP, here, the remote user can to access to

(Winsock) or DLL's library, and iii) using the PHP script services (see figure 4).

pages with information of the platform services.

only if the user has the permission.

hardware using a Web page of the platform.

Fig. 4. Communication tier.

the platform.

Furthermore it includes the instructions and regulation of the platform

and, *iii)* the block of the DLL libraries (designed in VBasic).

Figure 2.B shows a **teleoperation** scheme through the Internet working with a single channel of communication. This channel is used to change the parameters of the controller devices and/or plant. However, the effects of these changes will depend on the server layer.

Figure 2.A shows a **telecontrol** scheme through the Internet, in which the two channels of communications are required (closed-loop system), i.e. forward path *Ch1* and feedback path *Ch2*. In this case, it is necessary to maintain the stability of the closed-loop system. A solution to stability problem is that the time dalay must be less than the sampling period (Hyrun & Jong, 2005).

Furthermore, there exists a different interpretation about the **teleprogramming**. One of them is extending the distance between software programmer and the microcontroller or control board. On the other hand, it is possible to programming a remote system using two systems, called the master system and slave system, separated by the communication channel. In (Jiang et al., 2006) the teleprogramming method is based on teleoperation.
