A VME BASED ACCUMULATION, CONTROL AND SUPERVISING SYSTEM FOR NEUTRON TEXTURE MEASUREMENTS

Nowadays VME based systems to control neutron measurement instruments are forcing out those built with PC and CAMAC. One of the several alternative solutions is presented here. Its main feature is the implementation of the entire system on the VME site. Both, the hardwareand the software parts are considered. The instrument can be controlled locally or remotely via local network (even from PCs) with a modern-styled graphical user interface.


INTRODUCTION
Two identical copies of VME based accumulation, control and supervising system are now used at the NSHR and the SKAT texture diffractometers (Walther et al., 1995) at beam 7a of the pulsed reactor IBR-2 of the FLNP/JINR (Fig. 1).
The general features for these systems are: direct diffractometer management by the VME computer in the experimental hall; remote supervising and control possibilities via the local network; 6.6 m NSHR FIGURE Beam layout: core of reactor and moderator; 2 reactor shield; 3 disk chopper; 4 biological shield; 5 neutron guide, Ar-filled; 6 neutron guide, evacuated; 7 beam stop. possibility of running experiments in spite of network failures or switch off; modem window-styled graphical user interface; spectra visualization during measurement; ease ofextending the complex to handle new experimental equipment; ease of making changes in the experimental procedure.

GENERAL DESCRIPTION
The system was created on the base ofa commercially available modular VME computer extended with some custom-made modules.
All ofthem with the exception ofthe last two are commercially available.

CUSTOM-MADE MODULES
These modules are developed to adjust a general-purpose VME computer to the requirements of the neutron time-of-flight measuring instruments.
The BC module is used to register and primary store the spectra data. It supports the following capabilities: up to 32 detectors for one module (up to 64 for two); up to 16384 time channels per detector; a minimum time channel volume is ts for detector and 32 ts for 32 ones; 8 bit data for each detector.
The spectrometric VME memory module is used to accumulate spectra data from the BC module. It has a two-port configuration to provide access for both the system processor module and the VME bus. The total storage capacity can be varied from 2 to 256 MB by building additional memory chips or using several modules. Both the address space andmemory cell depth (up to 32 bits)can be enhanced. Thememory has an embedded program-adjustable table for page addressing.
The BCE-2 module is intended to control the data acquisition storage process. The module is used to control the exposure time and to handle the time channel generator.
The BCSM-2 module is intended to handle several step motors. For each step motor it provides the required number of elementary steps in the desired direction. It is characterized by: up to 8 step motors are supported; the frequency of steps is from 1 to 25 kHz; two intermediate check points; two range limiters of the movement.

MAIN SOFTWARE FEATURES
We would like to consider the basic ideas which determine the main features of the NSHR (SKAT) software complex (Heinitz and Kirilov, 1995): We decided not to split the complex into "interface" and "development" parts. The VME computer is used to control the texture measurement. Even with the not up-to-date CC112 slow processor board the computer is fast enough to satisfy user requirements. In the future it will be replaced by an E 17 board, which is five times faster. This will make user work more comfortable.
The X11/OS-9 package is not only used as a nice user interface but mainly as the whole complex environment. The complex is organized as a community of X-clients (Fig. 2). Each of these clients completely controls one spectrometer unit, e.g., texture goniometer (Fig. 3), TOF-analyzer, heater. To eliminate routine work to spectrometer control, a measurement procedure called experiment program is provided. This is especially important for texture measurement because it mainly consists of a long sequence of two steps: "sample movement" and "measurement". This program is in ASCII format and can be easily modified. There is also a special task to interpret this program and handle various clients and to coordinate the work of the other tasks of the complex. The clients usually have two working modes" a "self-controlled" mode to satisfy user who would like to make some actions manually, and an "auto" mode, to be handled by the interpreter.
There are two ways running the complex: locally from the graphic facilities and remotely from any workstation or X-terminal connected to a local network. It is essential to note that in case ofexternal running VME local graphics is no longer required. This means that the system can be transferred to any computer without local graphic facilities. On the other hand, by having a computer with such facilities, the user can work locally even without a network connection. Special clients supervise a measurement process from outside. These tasks may be run from any "point" of the local network and have no side effects on the measurement. The user can run it, get information about the status of the measurement, can stop it, etc. Several copies of these clients can work simultaneously. One of these tasks is devoted to spectra visualization (Fig. 4), another obtains and displays information about the clients of the complex (Fig. 5). It also can help in managing the experiment program control. It allows one to start, stop, suspend, or abort the program execution. To make user work more FIGURE 4 Spectra visualization task window.
comfortable, we prepared special versions of these clients for PC, because users generally have PC at their tables. The configurability of the clients allows easy adaptation to changes of the experimental equipment. A common configuration file provides for the clients' interrelation. In our complex, many clients are configurable, this yields good results. For example, we use the same software complex to handle both NSHR and SKAT, although they differ in the number of detectors, texture goniometer characteristics, etc. CONCLUSION Our approach is characterized by: user-friendly graphical user interface; configurability; the same version for local and remote running; stability of working; ease of extending; ease in use.
One of the great advantages of our implementation (in our opinion) is the possibility of supervising and controlling the experimental process from a PC.