3.5 VAX Monitoring and Control Programs


3.5.1 Elementary Process (EP)

G64s communicate with the Elementary Processes, which in general run in the detector partitions' VAXstations. Most Elementary Processes either use standard software or are closely based on it, and work with the G64 Skeleton program described in section 3.3.2. A few are dedicated programs (marked $ ^{p)}$ in the Elementary Process column of table 3.2), including those which handle the less standard applications. It is the standard program that will be described here.

Each elementary process oversees one subsystem of a detector partition, and is represented in SMI by a single object, whose state indicates the condition of that subsystem. For example, the temperatures on one side of the Hadron Calorimeter are monitored by one EP and are represented by one SMI state (indicating whether they are within an acceptable range).

The Elementary Process provides the connection between, on the one hand, the G64s and, on the other, the State Management Interface (SMI, described in more detail in section 3.8), the Error Message Utility (EMU, section 3.6), and the expert user interface (HIPE, section 3.5.2). It also updates the Status Update Database (section 3.7.2). These connections are represented diagrammatically in figure 3.1. In order to handle interrupts from many of these sources, as well as to perform periodic monitoring, the EP is by necessity event driven, using the mechanism of VMS event flags [114].

Each Elementary Process communicates with one or more G64s, and each G64 can communicate with up to eight EPs (though each channel reports its status changes only to one EP). Thus an Elementary Process can control, monitor, and accept status changes for a large number of channels. Status change reports call an RPC routine as an interrupt (VMS AST level), allowing immediate timestamping and reporting to EMU. Other actions, such as recomputing the SMI state, are queued for subsequent execution. Analog values sent or received from the G64 can have a linear transformation applied to allow for conversion from the integer ADC count to the physical parameter being measured (e.g. temperature or voltage).

Channel definitions, normal settings, and conversion factors are read from the Slow Controls Configuration Database (section 3.7.1). This also defines names for each channel, to make any error messages (sent via EMU) helpful to the operator. The overall program configuration is defined by VMS logical names. `Hooks' are provided in the code to allow for special requirements (e.g. the automatic trip-recovery used by the forward tracking and muon chambers, described in section 3.2.43.4).

The Elementary Process can accept commands from, and report state changes to, SMI. At any time a single SMI state is evaluated to represent the status of all channels overseen by an Elementary Process: these states are listed in table 3.3 . SMI commands, which act on all relevant channels, perform actions such as switching apparatus on, off, or to an intermediate (standby) level (normally only used for high voltages).

State changes in each channel, reported by the G64, are sent to EMU. These generally indicate an error condition being either raised or cancelled, though computer problems, such as communication errors, also generate EMU messages.

Changes in channel statuses reported by the G64, and in parameter values determined by periodic monitoring are written onto the Status Update Database for use by the offline data analysis. Multiple changes occurring together (within a few seconds) are combined in order to reduce the number of updates to the same database record (timestamped according to the time of receipt from the G64). Database updates are usually inhibited when no data is being taken in order to minimize the number of updates due to the raising and lowering of the high voltages at the start and end of datataking. Outstanding changes are then written (backdated to their last change) when datataking commences. These updates are sufficient because the offline programs only require the detector status at the time of the events being analysed. Since this task is of lower priority than others, a block of database updates may be temporarily interrupted, for instance to respond to an operator command.

Special procedures are included for the CAEN. When a command to change the voltages is given, all parameters (ramping rates, etc., as well as voltage values) are downloaded from the Elementary Process to the G64 and thence to the CAEN. If defined in the configuration database, a special ramping current limit is used in order to prevent trips due to the higher currents drawn during ramping. When completion of the ramp is signalled by the G64, the normal current limit is downloaded. The Elementary Process also has to recognize CAEN crate-wide conditions, such as the disabling of high voltages by manual intervention.


3.5.2 Expert Interaction (HIPE)

Display and control of individual channels by detector experts can be effected via the Elementary Process using the HIPE [124] user interface (see figure 3.3).

Figure 3.3: A typical screen from the HIPE Expert Display. Each row shows information for a single channel (it could also show a summary of a group of channels). In this case, some of the temperatures from the DELPHI environmental monitoring are shown. Channel gives the sensor name, Demand the nominal desired temperature, Value the actual monitored value, and Istat the channel status (i.e. whether it is in error -- in this case a number of channel values are out of range, as the detector is switched off). Other monitoring parameters are also shown, and further details can be requested by selecting a channel.
\includegraphics[width=\textwidth]{hipe-display}
This allows, for example, high voltages to be adjusted for problem channels. At a command from HIPE, these modified values can then be written by the EP to the Slow Controls Configuration Database, to become the new standard values. HIPE uses a VMS global section to retrieve information directly from the EP's datastructures in memory. This keeps interactive access from interrupting the work of the Elementary Process, though commands (such as the adjustment of channels) can be left for the Elementary Process to perform when it is free.

HIPE user interaction is based on the MHI [121] menu package. The definition of the Elementary Processes to which HIPE must connect, the channels and groupings, and the menu structure is made by configuration file. Special channel types or requirements can usually be accommodated by changing the default menu structures.

Tim Adye 2002-11-06