Introduction

The problem of controlling the various activities that constitute the data-acquisition and/or the slow control system of an experiment is a difficult one, mainly because of the complexity of the required operations, that involve a mixture of hardware and software. Not only the requirements may widely vary from experiment to experiment, but also within a single experiment it may be necessary to foresee important modifications of the control procedures as the setting-up proceeds and more experience is gained.

In the SMI framework, the adopted approach to the control problem is based on the State Manager (SM): the control aspects of an experiment are simulated by a finite state machine, which represents the behavioural model of the equipments under control. The various procedures necessary to run the experiment are executed by the SM which operates the corresponding state transitions on the state machine.

Beside the so called run control procedures, there are many other procedures in an experiment, requiring organization and synchronization of activities performed by independent processes and devices, such as calibrations, control of the apparatus, initial setting-up, etc. The SM approach can also be used for all these cases.

An experiment with limited requirements may consider to use some simpler methods for controlling the runs. A monolithic control program may very well do the job, thus avoiding the learning period necessary to properly use the SM. Still the advantages of using the SM may very well pay-off in the long term even for a small experiment. Aspects of the SM to be taken into account are its flexibility to adapt to different requirements, the inherent modularity of the model adopted to describe the experiment, the fact that the experiment description is easily modifiable, the self-documenting feature.