# STATUS OF The SOLEIL Control SYSTEM

N. Leclercq, A. Buteau, M. Ounsy, B. Gagey, Synchrotron SOLEIL, St.
Aubin, France

Abstract

The present paper provides an overview of the SOLEIL control system --
the world's first 100% TANGO-controlled accelerator. The aim is also to
provide the reader with some feedback after the first year of machine
operation.

## About SOLEIL

The SOLEIL \[1\] 3^rd^ generation synchrotron light source is based on a
low emittance 2.75 GeV electron storage ring that was commissioned in
2006 at Saint Aubin, France. The facility provides a high-intensity
photon beam covering a wide spectral range -- from ultraviolet light to
hard X-rays. SOLEIL will serve the international community in many
scientific fields, including physics, materials science, chemistry, and
biology. Around 10 beam lines have already received light, and the first
users are expected by the end of 2007.

## ADOPTING TANGO

### A Little Bit of History...

In 2002, the SOLEIL computing team was seeking its core software
technology for both accelerators and beam lines. In order to make an
objective choice, we decided to specify an ideal modern control system
and to compare the resulting requirements with existing offers. Among
the available solutions, the TANGO \[2\] framework was in phase with the
SOLEIL medium and long-term expectations. Although it was an emerging
project under development at ESRF \[3\], TANGO already fulfilled SOLEIL
requirements in terms of:

-   open source and collaborative development;

-   long-term maintainability;

-   enhancement potential;

-   pure object-oriented technology.

### The TANGO Collaboration

SOLEIL's selection of TANGO boosted its development and attracted
similar projects. Today, TANGO is the core component of close
collaboration among five European light sources: ESRF, SOLEIL, ELETTRA,
ALBA, and recently, DESY.

From a technical point of view, TANGO implements advanced control system
services as built-in features. Synchronous and asynchronous
communication mechanisms, events, distributed logging \... are all now
part of the TANGO core library. This "all you need is inside" approach
coupled to a rich client offer provides a global solution for
large-scale distributed control systems implementation.

TANGO remains in a state of continual evolution. Ongoing collaboration
maintains medium- and long-term perspectives with respect to potential
enhancements and add-ons \[4\].

## CONTROL SYSTEM ARCHITECTURE

Its underlying CORBA \[5\] technology, permits TANGO to provide a
natural way to implement *service-oriented* *control systems.* In this
approach, the control system actors -- called *devices* in TANGO jargon
-- are totally disconnected from each other. This allows the developer
to respect the *separation of concern* paradigm on a system-wide level
and offers a clear view of each component to the operator. Specifically,
each TANGO device acts as a service provider\*. It then becomes
straightforward to hierarchize the control system by aggregating
component services. The main advantage of this design is to factorize
(or share) a service by embedding the application logic into the
associated TANGO device -- rendering control room clients pure display
applications \[6\] \[7\]. The SOLEIL control system strictly follows
those concepts. Figure 1 illustrates an example of the approach
described.

### Implementation Strategies and Guidelines

In order to respect time, cost, and manpower constraints, we have
decided to focus on "off the shelf" hardware and software solutions
integration, and to dedicate home developments to very specific
projects. In this context, TANGO will act as the glue combining those
heterogeneous solutions into a coherent whole.

Long-term maintainability was also a major constraint. As an approach to
achieving this requirement, the concept of *hardware abstraction* has
been applied to all generic hardware functions. For instance,
video-hardware details are masked in plugins, which are themselves
dynamically loaded and managed by a shared library providing advance
image acquisition features to the TANGO device developer. The latter can
then focus on the application logic instead of struggling with hardware
details or "reinventing the wheel" in each project. Moreover, supporting
a new piece of hardware simply requires writing a new plugin itself
supporting a well-defined and documented interface. Finally, this
approach eases software maintenance, since similar applications have
similar implementations and any team member can potentially fix a
problem in a code he/she did not write.

Due to lack of manpower, software development effort-sharing among all
teams involved in the control system was mandatory. For instance, on the
client-side of the control system, high-level and user-friendly
interfaces provide both machine physicists and operators with total
autonomy in development of machine operation applications. At SOLEIL,
control room applications have been written and are maintained by their
users.

### Implementation Details

SOLEIL control is based on a classical three-layer design. However, this
vision is purely logical, since any control system actor may be reached
from any other (i.e., there is no network or software barrier between
TANGO devices running in the control system).

The lowest layer is mostly (and obviously) composed of TANGO devices
that provide access to the hardware. Those devices are hosted on compact
PCI (cPCI) crates running the Windows or Linux operating systems\*. The
cPCI crates host the processor unit (CPU), the common data acquisition
hardware, a bridge to a PROFIBUS fieldbus to which vacuum equipments and
power supplies are connected, and the timing system local agent \[8\].
Currently, 105 CPUs are on this control system level. On the network
side, each cPCI crate is connected to the control system via a 100-Mb
Ethernet switch, which is itself connected to a 1 Gb fiber backbone.

The intermediate (or middle) control system layer hosts the so-called
*logical TANGO devices*. At present, these services are distributed over
40 quad processor Linux servers. This layer has no well-defined
hierarchical structure, since the relation between the devices is
application- (or service-) dependent. We can define it as the level at
which devices not directly linked to hardware run. This software layer
also hosts peripheral services such as a Java based archiving system
\[9\].

Finally, the client layer constitutes the highest control system level.
It is mostly composed of graphical application that can be displayed on
any of the 30 X terminals installed in the control room.

### Software Deployment

Large-scale software deployment requires efficiency and coordination.
Poorly designed or tricky deployment processes may influence machine
operation and consequently, beam time availability. This is particularly
true in the early stages of a project -- when bug fix and enhancement
releases follow one another. At SOLEIL, TANGO is also deployed on beam
lines, and its ubiquity reinforces the need for an efficient deployment
process.

To achieve such a goal, several system administration techniques have
been coupled. First, a database is used to store the information
associated with each TANGO device to be compiled then deployed. This
information -- which contains data such as a programming language
identifier, the target operating system, CVS module name, CVS release
tag -- is used to perform a batch compilation of the 295 classes
developed at SOLEIL. The compilation process is spread over two machines
for each target platform and takes less than two hours to complete. In
case compilation fails, the developer automatically receives an email
alert containing the compiler log. Once compiled, the devices are pushed
into a file server repository accessible from any host within the
control system. TANGO administration tools are then used to selectively
restart the devices and allow users to benefit from bug fixes and/or
service enhancements.

## FEEDBACK EXPERIENCE

The aim of this last chapter is to provide the reader with some feedback
after a year of routine operation.

### Machine Commissioning

The first stored beam was obtained June 2^nd^ 2006 -- four years after
construction started. Adoption of the strategies and guidelines detailed
in the previous chapter, allowed most of the systems and commissioning
tools to be available from day one. As far as TANGO is concerned, the
control system was very stable and never prevented the commissioning
process from progressing. The SOLEIL computing team had to face
classical problems of software bugs, systems setup, and tuning, but the
current level of stability was quickly obtained.

### Status

The TANGO database reports that 9319 devices are currently running
within the control system. Among this population, 7452 are actual
control system services (the remaining device being deployed for the
purpose of TANGO processes administration). If we compare this figure to
the number of executable binaries generated by the batch-compilation
process, it gives an average value of 25 instances per binary. This is
mostly due to the fact that a synchrotron is composed of almost
identical cells. Note that those figures do not take into account
devices deployed on beam lines. A quick evaluation yields approximately
15.000 devices after 5 years of operation for both the machine and the
first twenty beamlines.

## ACKNOLEDGEMENTS

The SOLEIL computing team expresses its gratitude to the ESRF machine
control group for initiating the TANGO project and for its constant
enhancement efforts. Our acknowledgements also go to our colleagues at
ELETTRA, ALBA, and DESY for their friendly and fruitful collaboration.

## References

\[1\] http://www.synchrotron-soleil.fr

\[2\] http://www.tango-controls.org

\[3\] http://www.esrf.eu

\[4\] A.Goetz, The Future of TANGO, ICALEPCS07

\[5\] http://www.corba.org

\[6\] L.Nadolski & al, EPAC06, « Control applications for SOLEIL
commissioning and operation »

\[7\] K.Saintin & al, these proceedings, « How to use a SCADA for
high-level application development on a large-scale basis in a
scientific environment »

\[8\] J.P.Ricaud & al, these proceedings, « Synchronization System of
Synchrotron SOLEIL »

\[9\] S. Pierre Joseph Zephir & al, these proceedings, « Status of the
SOLEIL Archiving System »