CONTROL PANELS MADE ON WEB BROWSERBY USING ActiveX DATA OBJECTS
R. Kato, T. Igo, G. Isoyama, Institute of Scientific and Industrial Research, Osaka University,
8-1 Mihogaoka, Ibaraki, Osaka 567-0047, Japan

Abstract

2 DESIGN ARCHITECTURE

Making use of Active Server Pages and Dynamic
HTML, we can visually and interactively administerdatabases residing on other computers. By using this web
technology, we are easily able to realize virtual control
panels on a web browser.

1 INTRODUCTION
A control system composed only of personal computers(PCs) is being developed for the far-infrared free electron
laser (FEL) at the Institute of Scientific and Industrial
Research (ISIR), Osaka University [1].
The system has a simple structure consisting of somePCs connected with Ethernet. The software for the control
system is designed such that the user interface layer andthe device driver layer are connected with a database [2].
On the other hand, by using Microsoft Active Server
Pages (ASP) and ActiveX Data Objects (ADO), we caneasily realize data access from a client to a databaseserver. Using this technology, we are developing a control
system that has virtual control panels on a web browser,
for the devices in the FEL beam transport system.
The design architecture and the implementation of thissystem are described in the following sections.
PC without devices

Local Area Network
PCs with devices

2.1 Hardware
The control system is composed of PCs and standard
interface modules for them. The PCs are connected in a
local area network with Ethernet. Controlled devices inthe FEL beam transport system are three bending magnets,
six quadrupole magnets, eight steering coils and two beamprofiles monitors. The devices are connected to the PCs
with analog I/O, digital I/O and GP-IB interface modules
inserted directly into PCI or ISA buses of the PCs as
shown in Figure 1.
The system can be made inexpensively as we use only
PCs and standard interface modules.

2.2 Software
There are three layers in the hierarchical software
structure as shown in Figure 2.
1) Device control layer. It is the lowest level anddirectly controls the hardware, such as interface
modules. Device control program reads a numericalvalue from the database and writes it in the interface
module, and reads a present value from the moduleand writes it in the database.
2) Database layer. It works as a core of the data flow.
Device control programs or user interface programs
communicate only through the database.
3) User interface layer. It is the highest of the hierarchy
and works as an operator console. A user interactively
operates the control panels on the screen virtually
made by user interface programs.

Control Panel
ProgramPowersupplyControl Panel
ProgramUser Interface Layer

Relay

Database

Database Layer

Beam line elements

Q-magnet

Steering coil

Bending magnet

Beam profile
monitorFigure 1: Schematic layout of the hardware configurationof the control system.

DeviceControl
ProgramDeviceControl
ProgramDeviceControl
ProgramDevice Control Layer

Figure 2: Schematic diagram of the hierarchical software
structure of the control system.

Web Service

Web Browser
User Interface

ADO

Client PC

Database

DeviceControl
ProgramDeviceC ontrol
ProgramServer PC

DeviceControl
Program

Web Browser
User Interface
Client PC

Figure 3: Schematic diagram of the control system byusing web service and web browsers.
This structure makes it easy to develop programs in a
distributed control system connected with Ethernet andenhances the flexibility and extendibility.
We are developing the two types of control system.
One is the system based on a shared database model. For
this, a database file residing in a PC is shared among
several PCs with Microsoft file sharing service. Using thisservice, control panel programs on the other PCs canaccess the data through the network in a similar way thatthose in the PC with the database do [2].
The other type is the system making use of databaseaccess service on the web server. We can easily giveaccess from a web browser to a database on the web
server by using Microsoft Web Services and ADO. In thiscase, we do not need the control panel programs describedwith programming language and compiled to executable
files. A web browser works as a user interface instead of
the programs as shown in Figure 3.
The implementation of the later system is described in
the next section

3

SOFTWARE IMPLEMENTATION

Microsoft Windows NT 4.0 or Windows 98 is used as
an operating system of PCs, so that we can make use ofvarious developing tools and applications commerciallyavailable, such as Microsoft Visual BASIC, Borland
Delphi and Microsoft Office.

3.1 Web Service and Web Browser
Microsoft Personal Web Server 4.0 is used as web
service software on the PC with the database. It works on
Windows NT 4.0 Workstation and Windows 98. A webbrowser is used as a user interface. Taking account ofcompatibility with Visual Basic Script (VBScript) used in
ASP files, Microsoft Internet Explorer 4.01 is selected.
All parameters of the devices are interactively input
into the database with the web browser. The horizontal
and vertical positions of the devices on the control panels
are input not numerically with keyboarding but
graphically with drag and drop using a mouse, which isthe function of dynamic HTML of the web browser

3.2 Database
Microsoft Access is used as database management
software. Since a product on the market is used as the coreof the control system software, the reliability of the wholesystem is improved.
The database administers names and ordering numbersof devices, names of host computers which control thedevices with interface modules, names and channel
numbers of the modules and so on. Furthermore it
administers the arrangement of the components displayedin virtual control panels on the web browser.

4 SERVER AND CLIENT SCRIPT
Figures 4 and 5 show the flow and processing of thedata between the server and a client.

4.1 Data Flow from Server to Client
An ASP scripting engine on the web server reads an
ASP file and executes server scripts described between<% and %>. These scripts are acquisition of database
Web Server
ASP fileASPScripting
EngineClient<HTML><%
Server Script%><SCRIPT>
Client Script</SCRIPT></HTML>

Server Script<% ∼ %>
executed

User Events<HTML>
Execut ed Result<SCRIPT>
Client Script</SCRIPT></HTML>

Display

Client Script<SCRIPT>~</SCRIPT >executed
Web Browser

Database

Figure 4: Schematic diagram of the data flow from theweb server to the client.
Web Server

Client<HTML>...
<FORM Method=POST...><INPUT
Name="New Value" ...><INPUT Type=SUBMIT...></FORM></HTML>ASP file 1
ASP file 2<HTML><%
DATA=Request ("New Value" )
.. .
%>
.. .
</HTML>ASP
Scripting Server Script
Engine<% ~ %>
executed

Database

Web Browser
URL(ASP file 2)& encod ed
DATA<FORM>~</FORM>
displayed"SUBMIT"
Button clicked

Display

Figure 5: Schematic diagram of the data flow from theclient to the web server.

Figure 6: Example of the control panels made on the web browser. Positions of items on the window correspond to thepractical arrangement of devices of the ISIR-FEL beam transport system.
objects, and opening and closing the database file. Resultsof execution are output into the ASP file as text andHTML tags, and then the file is sent to the client. The webbrowser displays text and graphic images on the screen
except client scripts. When user events occur, such as amouse click, the browser executes client scripts described
between <SCRIPT> and </SCRIPT>. Results ofexecution are displayed.

4.2 Data Flow from Client to Server
If there is <INPUT> tags between <FORM> and</FORM> in the ASP file sent from the server, data input
is prompted on the screen. When the user click the“submit” button, input data is encoded and sent to theserver with location of a new ASP page. The scripting
engine on the server reads the new ASP file and executes
server scripts in it. In these scripts, values of parameterson the database are renewed.

5 CONTROL PANELS
Figure 6 shows an example of the control panels. It

Figure 7: Example of the control panel corresponding to
the each device.

contains three bending magnets, six quadrupole magnets,
eight steering coils, four beam profile monitors and one
wiggler magnet. By double clicking an item of the panel,a new control panel for the clicked device appears asshown in Figure 7.
In this system, positions of items on the browser areadministered by the database. Therefore rearrangement ofdevices on the control panel is very easy. By dragging theitem labeled “New Device” in the lower left corner anddropping it above the horizontal line, a new device can beregistered in the database. Similarly, by dragging a
registered item and dropping it below the line, the device
can be deleted from the database.
As a conclusion, the control system has flexibility forrearrangement and future upgrade.

REFERENCES[1] R. Kato, S. Okuda, Y. Nakajima, G. Kondo, Y. Iwase,
H. Kobayashi, S. Suemine, G. Isoyama, “Oscillation
at wavelengths from 21 to 126 ˚ m on the ISIR FEL
at Osaka University," Nucl. Instr. and Meth. A407
(1998) 157-160.
[2] T. Igo, R. Kato, G. Isoyama, “Control system basedon PCs for the ISIR-FEL at Osaka University,” ibid.