Using World-Wide-Web for Control Systems
F.Momal, C. Pinto-Pereira
AT Division CERN, 1211 Geneva 23ABSTRACTWorld-Wide-Web is really welcome in control systems. From anywhere, operators and specialists may accessdata from the control systems without having to install specific software or without bothering about the type ofcomputer to use. Nearly any computer, loaded with a little piece of world-wide available software, may haveaccess to the archives files of the controlled process or its documentation. The Web standard, based on thehypertext principles and being highly focused on the man-machine interface, is an easy and intuitive way ofaccessing data.
The paper describes the link which has been made between the WWW and the LHC magnet test bench controlsystem. It lists the different kinds of relevant data which are presented through this network tool: user-guides, online help, process documentation and archived data, but also real-time data like trends of sensor values or
alarms. A software gateway, decoupling the Web server and the control system is described.
A structure has been designed to cope with the nuisance which could be brought by the Web, as well as to handle
security features. It offers full transparent access to all the different data wherever they come from: files on
several computers, databases, control system’s real-time values, etc.

INTRODUCTION
A test bench has been built at CERN to accept and measure the numerous superconducting magnets for the future
LHC. CERN has also built and commissioned the first version of the LHC Test String which is composed ofseveral magnets in line. The control of the test bench[3] and of the string[4] is carried out by means of industrialcomponents[1,2]. The process control uses standards PLCs connected by an ethernet plant network. Supervisory
software systems carry out the man-process interface and some of the data collection. On the string, a fast dataacquisition system continuously stores the status and values of a set of sensors and transfers them to an Oracle
Database.
To offer remote access to the process and to allow easy post-mortem analysis, we have installed a World-WideWeb server and developed a gateway between this server and the control system components.

THE ADVANTAGES OF THE WWW
As soon as the tests started, remote access was immediately needed to the control data and to the archives. For thisreason, we developed a number of tools under MS Windows. Some of these provided real-time access to thecontrol system, some allowed extraction of sensor values stored in the archives and others provided the states of
the alarms and of the control software. The user-guides were made available on a Novell server. Various protocols
were used (telnet, TCP/IP sockets, rsh, MS Windows DDE, etc.) and numerous developments were needed. The
overall complexity, both for the developers and for the users, grew rapidly. The maintenance of these products
became time consuming. In addition, only PC users could get at this information. For these reasons we became
interested in the WWW[5], which has the following advantages:
For the developers:• No development needs to be done on the users’ machine.
• The Web software is obtainable in the public domain and needs no extra maintenance. New versions arereleased frequently.

• Browsers are available on most common platforms and are system independent, the only requirement being aconnection to Internet and a standard WWW browser such as Netscape[8]. Even relatively “out of date”
machines may be used (PC 386 with 4Mb of RAM).
• The multimedia capabilities of the browser enable the data to be presented not only in text but also ingraphical form.
For the user:• The interface is standard, graphic and intuitive. The learning time is minimum.
• A unique interface replaces all the previous small packages.
• The user does not have to worry about the source of the information he wants to see. Transparency ismaintained by the server which may transfer, in the same way, to the user a document stored on a PC or a listof values coming from a centralized database.
However, a certain number of restrictions need to be taken into account:• We should limit the transfer data format to the built-in capabilities of the browsers. This include ASCII orHyperText Markup Language (HTML)[6] for the text and JPEG or Graphics Interchange Format (GIF)[7] forthe graphics.
• Transactions between clients and servers are atomic. The communication links close down after each transferof a document. The user has to press the reload button to update the information (however a non-standardextension to the Netscape browser allows to do this automatically).
We decided to install a WWW server to meet the users’ requirements for remote access. A home-made gateway
fills the gap between the WWW dedicated to static documents and the control system, which delivers data whichchange in real time.

THE USERS’ NEEDSThe server satisfies several needs:• Those of the process experts: they want to follow the process behavior in real-time, to be informed of theevolution of a certain sensor, to correlate data coming from various programmable logic controllers (PLC), etc.
• Those of the physicists or the managers: they need more specific or general views of the controlled process,they want to retrieve and reprocess various data from archives, etc.
• Those of the control system experts: they want to monitor the behavior of their system.
The goal here was not to make a new control system, but to built a complementary system. It allows the user tohave a remote view of the data which is more restrictive but more general. Archive analysis tools were added.

DATA AVAILABLE ON THE SERVER
To answer the previous needs, we have made available several types of data:
Real-time process data
These are the data of the ongoing process. They are normally located in the control machines which are directly
acquiring sensor data and/or are doing the supervision of the process. They are presented in the following formats(fig. 1):• Graphical synoptics: they are generated on the fly and offer a process view which is similar to those presented
on the supervision consoles. To offer a faster understanding of the process status, the views may be simplified
by presenting only the most relevant data.
• ASCII tables: tables of real-time data may be retrieved. Functionally similar to the synoptics but without thegraphical part, they are faster to retrieve and may be stored on the client machine for further processing. Thesetables can be customized at will.
• Graphical trend curves: the recent trend of the variables may be presented graphically.
• List of values such as the alarms of the process.

Archived data
These are all the data acquired by the supervision system and by the fast acquisition system. Supervision consoles
store continuously the values coming up from the process in flat files, while the fast data acquisition system stores
the acquired sensor data in an Oracle database. In both case the user may request, using an HTML form, the listof values taken by a specific parameter between two times. The result is sent back either graphically or in an
ASCII list which can be reprocessed on the client machine.

Mon Oct 23 10:14:56 MEZ 1995********** CWU2 MAIN ******
ETAT: Cooling
COMMAND:
Power Consumption (%) 1
Temp.: TT287 251
TT255 292
TAIMANT 24(K) TT276 270
TT278 281
TT286 293
TT258 297***************************TT255

Figure 1: Different types of real-time data available through the WWW server

Status data of the control system
Pages generated on the fly give the status of the supervision software and of the connections with the PLCs.
Documentation
The documentation linked to the control of the tests is available on line (User guides, On-line Help, process
documentation, information on the people in charge, etc.).

HARDWARE AND SOFTWARE IMPLEMENTATION
Hardware structure
Two machines are dedicated to the WEB server:• A Pentium under MS Windows which stores the static documents such as the user-guides. The Windows httpd
WWW server is used[9].
• An HP 9000/715 station running HP-UX A.09.05 which uses the CERN httpd server[10]. The home page ofthe server is located on this machine which is essentially oriented toward the interconnection with the controlsystem.

With such a division on our server, we limit the load on the workstation and thus we can respond faster to the realtime data requests. The Uniform Resource Locators (URL) of the documents stored on the PC are referenced on
the main pages of the HP so that the user is not even aware of this separation.

WWW browsers

WWWServers{{WWWWWW

WWW

olivetti

Macintosh IITCP/IP
httpdUNIXStationURL
1request

5 HTML
document
Gateway4

dataformattingPC2
datalocalisation

Documentation

olivetti

3
data request

Supervisory Systems

OracleDatabase

Control Archives
Fast data acquisition
systemPLCs

Figure 2: Gateway Implementation

Dynamic data handling
The CERN WWW httpd server software, like the others, offers the possibility to execute an external program.
These programs are called gateways and use the Common Gateway Interface[11]. The gateways are linked to an
URL and are executed whenever this URL is requested. Parameters may be sent with the URL. We have used thisfunctionality to generate documents on the fly containing the requested process data (supervision and archivesdata). These documents are formatted using the HTML standard before they are sent back to the user.
The gateways we have developed have two purposes (fig. 2):
1. The retrieval of the data needed by the request. A description as to where the data can be found is located on
the server. The gateway uses this description to retrieve the data from the corresponding hosts. Depending onthe data, different protocols are used (SQL*Net, nsh, rsh, etc.). A communication is established with thesupervision system whenever real-time data are required. To minimize the load on the supervision system,only numeric values are retrieved.
2. The data formatting. As described previously, the data may be presented in several formats, some being
graphical (synoptics and trend curves). In such a case, graphics have to be created in a WWW compatibleformat. We have chosen the GIF format. Generic programs have been written in C to dynamically create

synoptics and curves in this format (the graphical library Gd[12] has been used). Using a description on how
the data have to be presented, the gateways create the HTML pages and the included graphics if needed. The
result is then sent back to the user. Some additional information such as a time-stamp is appended to the result.
This is particularly important in the WWW environment where transactions are atomic.
As we have already mentioned, there is no way under the WWW standards to automatically update real-time data.
Nevertheless we used the Netscape extension which allows the user to request periodically a page. By that means
the information displayed on the Netscape browser is continuously refreshed. We decided to use this extension
because it does not cause any compatibility problems. This feature simply does not work on the other browsers.

SECURITY AND CONFIDENTIALITY
Security and confidentiality are sensitive points which have to be looked at on a Web server. The very nature of
the system and its location on Internet makes it more accessed. It is not sufficient to keep private an address.
Before we even made public our server, we counted 210 visits coming from numerous countries (includingFrance, Austria, United Kingdom, Belgium, USA, Australia, Italy, Canada, Holland, Japan, Sweden). Automatic
search engines also entered the system. Log files allow us to trace all the accesses.

While most servers seek popularity, this is discouraged in this particular environment. In particular:• The system accesses raw data which is not intended for general broadcast since they may be misleading before
interpretation. For example a badly calibrated sensor will send apparently false data.
• We don’t want to attract unnecessary access to the control system even if the data flow is regulated.
• Formatting data graphically is time consuming and the normal user would be penalized by unwanted visitors.
We must nevertheless take into account the possibility of an ill-motivated intervention. This risk would be further
increased if writing should be possible through the server. Because reading of directories may be possible, they
have to be protected.
Two levels of protection are used on our Web server. The first one filters the calling address. For some pages andapplications, entry is allowed only if the user is at CERN. A second level, which is more restrictive, requires apassword for entry. This is mostly done when access to real-time data is required. No illegal access was notedsince we have implemented these protections.

CONCLUSION: ACQUIRED EXPERIENCE
The fast increase in the usage of our server confirms the choice we have made of the WWW as a means to accessdata coming from a control system (the number of accesses1 went from 3.000 in March to more than 20.000 in
September, with an estimated number of more than 30.000 in October). We can now present in a friendly way
numerous types of data coming from different sources. Graphics created on the fly give the user a convenient viewof the system. The CERN httpd server software on the HP has been now running for a year, so we have had theopportunity to test its robustness and reliability. Not a single problem was noticed since the beginning, which is
not the case for the Windows httpd server which crashed four times in the past six months. Since we implemented
the protective filtering system, no illegal access has been noted. The browsers that we use (Netscape andMosaic[13]) are highly compatible and evolve to even greater levels of reliability and user-friendliness.

REFERENCES[1] F.Momal, J.Brahy, R.Saban, P. Sollander, “Integrating a Commercial Industrial Control System to theAccelerator Control System”, Proc. ICALEPCS 1993 Berlin, p 464
1An access corresponds to the acquisition of the document whether it is an HTML page, an icon or a graphicalsynoptic.

[2] R.Saban, P.Ciriani, A.Guiard-Marigny, H.Laeger, M.Rabany, A.Swift, “Equipment Industrially Controlled”,
Proc. ICALEPCS 1993 Berlin, p 461[3] F.Momal, D.Bienvenu, D.Brahy, D.Lavielle, R.Saban, B. Vuillerme, L.Walckiers, “A Control System basedon Industrial Components for Measuring and Testing the Prototype Magnets for LHC”, Proc. EPAC 94 London, p.
2322[4] R.Saban, D.Brahy, J.Casas-Cubillos, D.Lavielle, L.Madaro, A. Rijllart, M.Skiadelli, “The Control and Data
Acquisition of the LHC Test String”, Proc. ICALEPCS 1995
[5] The World Wide Web Consortium, http://www.w3.org/hypertext/WWW/[6] HyperText Markup Language (HTML), http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html[7] The Graphics File Format Page, http://www.dcs.ed.ac.uk/~mxr/gfx/[8] Netscape’s Home Page, http://home.netscape.com/[9] Windows httpd, http://www.city.net/win-httpd/[10] CERN httpd, http://www.w3.org/hypertext/WWW/Daemon/[11] CERN Server CGI/1.1 Script Support,
http://www.w3.org/hypertext/WWW/Daemon/User/CGI/Overview.html[12] A graphics library for fast GIF creation , http://siva.cshl.org/gd/gd.html[13] NCSA Mosaic Home Page, http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/NCSAMosaicHome.html