THE ACQUISITION AND DISPLAY OF BEAM PROFILES
L.David, P.Duneau, E. Lecorche, P. Lermine, J.Vila, C. Maugeais, M. Ulrich
GANIL BP 5027 14021 CAEN FRANCE
E-mail : David@ganexp.in2p3.fr
1. INTRODUCTION
The adjustment of the ion beam at GANIL requires the knowledge of its shape (profile). Until recently, this wasprovided by analog signals acquired through CAMAC interfaces and displayed on an oscilloscope. For weak signals, avery long integration time was necessary and as only one plane was acquired at each tick of the clock, there was aconsiderable delay when eight profiles were displayed together. No numerical values were available to be used bytuning programs for alignment or adaptation. The effect of adjustments and comparisons between two profiles could
only be judged visually. The recording of the profiles could only be made by taking photographs.
The profile measurements are made by using multiwire grids [1], gas jets and microchannel plates [2]. The
electronics group has developed a new electronic interface for the multiwire grids and the physics group interfaces forthe other two types. Computations are performed on the data from these interfaces to get numerical values and profile
shapes, which are then transmitted through the network to the main control room, to be displayed on workstations
and used by different beam tuning programs.

2. CLIENT/SERVER PATTERN
2.1. New VME processors
In the past, all the thirty front-end controllers were identical, consisting of a CAMAC crate fitted with a numberof general purpose modules, mainly controlling equipments such as motors, probes, power supplies etc. Each has aprocessor of type RTVAX 300, embedded in a Kinetics 3968 module. The operating system is VAXELN and thenetwork protocol is Decnet.
We decided to use VME for the new multiwire profile system, using some special-purpose modules for theprofile acquisition. To be able to use the same operating system and network protocol, we use the AEON VME300
board, which incorporates an RTVAX processor.
2.2 Database
Although the management of the profile data is carried out in a much more specific way than for the other front
end controllers, the data follow the protocol used in the former drivers. These data, whatever their types, are integrated
into the INGRES database from which, at boot time, they are extracted as files and loaded into the VME crate.
As this project is the first integration of VME into our control system, it has required the installation of thewhole set of functions needed to manage the VME bus, added to the profiler acquisition program itself. Now these
specific VME mechanisms are available for the next installation to come, such as new power supplies and ion source
devices which will also be controlled through VME.
2.3 ArchitectureThis project was easily integrated in the client-server architecture that had been defined from the beginning of thenew control system. The control workstations are always clients of the CAMAC crates in charge of reading orwriting values in the equipments.
In this profile project, the acquisition and the management of numerical values are carried out by a VME crateused as a data server. This crate distributes the data through the network to each client program on a station in thecontrol room or in the physics division. Therefore the same program can be used on different stations to get theprofile data and several different programs (adaptation, alignment, etc.) can ask simultaneously for different data sets.
The network diagram is shown in Figure 1.

Figure 1. Network Diagram.

3. PROFILE PROBES
3.1 Multiwire profiles
These consist of metallic grids with planes of 47 horizontal and 47 vertical wires. The grid is locatedperpendicular to the axis of the beam and each wire measures the intensity received over its entire length. Theseprofilers stop a part of the ion beam (5 to 10%) and can’t be used for high intensities.
3.2 Gas ionization profiles
These constit of standard CHARPAK chambers filled with Ar-CO gas, with horizontal and vertical metallic grids
inside with gaps of 1 mm between wires. Each wire grid is situated between two electrodes. The beam ionizes the gas
and the positive ions are captured by the negative electrodes and the electrons by the wires. The ionization ratedepends on the intensity of the beam and also on the high voltage applied to the polarization electrode (2500 Vmaximum).
These profilers are used with small beam intensities, between 102 particles/s to 107 particles/s. They stop almost
the whole ion beam and thus must be moved in or out by pneumatic propellers.
3.3 Microchannel plate profiles
These detectors use the beam ionization of the residual gas, and particles are recovered on microchannel plates forelectron amplification. The gap is 1mm; the high voltage (1500V maximum) and integration time are adjustable.
These profiles have a great dynamic range, 1nA to several µA and they don't stop the beam, though they can easily bedestroyed by too high a voltage.
3.4 Spiral scanner profiles
For medium energy beams the multiwire or microchannel profiles cannot be used because of their fragility andneither can the gas ionization ones because the high voltage creates beam steering.
In cooperation with the Dubna Laboratory new profilers have been tested. They are composed of a helical shapewire in a cylinder that is angled at 45° to the axis of the beam. While turning once, the wire will have covered theentire vertical and horizontal apertures, while intercepting very little beam and without damage because of its size
(1mm ∅) .

4. ELECTRONIC ACQUISITION
Three VME crates are dedicated to this acquisition which operates as a stand-alone remote process. One is used forthe accelerator multiwire profilers, the second for those in the experiment area and the last for the special(microchannel, gas ionization, spiral scanner) ones.
4.1 VME Acquisition
The two crates used for multiwire profilers include VME controllers based on RTVAX processors and memory
interface and data acquisition boards. The physical profilers are connected to the acquisition boards, each of which canmanage 8 planes (4 profilers). The crate contains 20 boards in order to access the 80 profilers of the beam transportlines. The integration periods are externally triggered and the A/D conversion is to 12 bit accuracy. The acquisition iscarried out in approximately 150 ms for 160 profiler planes. At each acquisition cycle data are transferred to a sharedmemory board, and an interrupt is sent to signal that a new set is available for the processor.

4.2 Serial Acquisition
The VME crate used for the ionization gas and microchannel plate profiles contains the same VME controller anda board for serial-bus access to the G64 crates involved in the acquisition, Figure 2. Due to the two levels ofcomputing, it takes 200 ms to dispatch data up to the G64 crate, and another 200 ms to send them to the VME crate(speed 19200 baud). As the serial JBUS line uses a master/slave protocol, these times have to be multiplied by the
number of profilers that are going to be read.
The four serial ports of the board are used in order to acquire several profiles at the same time.

Figure 2. Schematic for serial data acquisition.

5. ACQUISITION SOFTWARE
5.1 Data Acquisition
In the control system, ADA was chosen as the common language, both for the workstation and the real-timecrates, where the multitasking is commonly used.
The main package is built with two tasks, together with generic procedures and the starting entry for the othertasks. The first task is a loop for the acquisition of the data from 160 planes. The other is the main part of theapplication. It reads the names of the chosen profiles from a mailbox filled by the network, and returns values by
sorting the profiles and calling appropriate tasks for the different functions available.
For the gas ionization and microchannel plate profiles, a systematic reading of the requested profiles is carried out
by a polling program, and inserted into a DATA COLLECTOR. When a workstation asks for a profile, the DATACOLLECTOR is scanned and data are sent immediately, however those transferred correspond to a measurement having
taken place slightly earlier. A generic task was written to obtain or store profile values, whatever their types. By
instanciation, it becomes one task to read the multiwires and an other for the microchannel plates, using differentdrivers.
These tasks can be used for:Refresh reading
Immediate reading
Offset readinga full polling cycle is made before sending the datareading from the data collector
reading the offset value

Measure offset
Clear offset
First readinga new measure of the offset average value
set the offset to zero
new list of profiles to refresh

5.2 Computing
After data acquisition the ELN process undertakes some computations so as to provide numerical values to client
programs on the workstations:- center of gravity- width at half height- width at the foot- surface area
When a wire is broken, computations undertaken on measurements using it will be wrong. In this case it is useful toobtain a reconstituted profile by interpolating the curve between the previous and following wires. Thisapproximation will be signaled on the display, because it is necessary to be sure that the wire is really lacking andthat one isn't observing an actual weak value.
The electronic acquisition generates background noise that is added to the measured signal. It is possible, when aprofiler has been pulled out of the beam, to measure only such noise. For normal measurements these offsets, that arestored, are automatically subtracted from the values for the corresponding profiles. The offset measurement has to beunder operator control (it is necessary to pull the corresponding profiler out of the beam) because any change in
profiler configuration can nullify the meanings of the values. Therefore a special function exists to set the offset tozero.
5.3 Access Lists
So as to decrease the network traffic, all the means of access to the profile crates have been made by list, toobtain data from several simultaneously. In the case of multiwire profiles, all are read every acquisition cycle but only
the ones requested are sent back to the client. In the case of gas or microchannel plate profiles, only the requested ones
are read by the data collector, in order to limit the JBUS line traffic. The ADA/VMS package contains about twenty
procedures that are used to read the data, clear the offsets and control the integration time and high voltage. This
package uses another one that carries out network communication with all the different crates. If the list contains
profiles dispatched from several crates, the package generates automatically a sub-list for each crate.

6. PROPELLER CONTROL
6.1 Commands
As most of the profilers stop the beam, they have to be pushed in during the tuning, then withdrawn. Thus eachprofiler is moved by a pneumatic propeller. The control of the propellers is not carried out by the same VME crate
but by other crates on the network. The display program on the stations can order them to push or pull the profilers.
Depending on the station on which this program runs, the available propeller list is different. For instance it is notallowed to manipulate profilers n the beam lines from physics or experimental area workstations. Therefore propellers
have been listed by clusters and the following ones are, or are not, displayed in one's menu: injector 1 or 2, beam line
1, 2 or 3, exp. rooms. These menus are constituted from a database mainly used to define the different beam optics
and beam paths, and depending on the workstation name. Propellers are displayed in green if they are outside thebeam, red if they are inside and yellow if their status is unknown. It is possible to select only one propeller in a list,
or a lot of them, through the user interface.
6.2 Protection
The profile shape display doesn't automatically push the profiler into the beam. The human operator must do so,
because it is quite difficult to know if the beam intensity will be too high for the equipment. If it is too high, anelectronic system (chopper) can cut out part of the beam, an amount depending on the beam path and parameters.

7. DISPLAY SOFTWARE
7.1 Multi-threading
As for every ADA control program, this one is separated into three tasks (Figure 3):- the graphic task is mainly composed of the MOTIF mainloop, with an added delay for other tasks to be able to run,and MOTIF callbacks (procedures activated by mouse clicks).
- the action task is activated by the command callbacks. As the callbacks are run during the main loop, they cannot be
used to control equipment and wait for replies, because the main loop would be in a wait state and no operator's clicks
could be received. So the callbacks only give synchronization points called «rendezvous» to the action task that will
be in charge of the equipment commands. After testing for possible errors, this task uses MOTIF calls to display thedata as numerical values.

- the refresh task is activated by only a single callback. This task performs polling on the required profiles andrefreshes them on the screen. When the first profile is chosen, the corresponding callback activates this task. After
that, when a new profile is required, the same callback adds its name to the polling list.

Figure 3. Console software schematic.

7.2 Menus
As the profilers are sometimes moved from one beam line to another, their names are not defined in the display
program but in the database. The profilers are described in a tree-like structure, corresponding to the beam lines andread only at start time of the display program. The scrolled lists are built from these structures, in a recursive way andwhen an operator wants to watch a new profile it is available in memory without need for disk access. Other
functions are also defined in these structures, such as clustering together all the profilers used for a beam line
adaptation and displaying them always in the same place. Other specific profile characteristics are defined in thedatabase, such as type of monitor, distance between the wires, gap between wires with reference to the axis of thebeam, etc.
7.3 Commands
7.3.1 Scale
In case of saturation, the graph becomes orange. The operator can modify the scale by clicking on the + and push buttons on each profile. He can also use the automatic scale option, in the top menu bar to fit the profile to themaximum of the window.
7.3.2 Offset
It is necessary to be able to eliminate the background noise during measurements. So, when there is no beam,
the push button "offset measure" carries out a noise measurement. This measure will be subtracted from the real
profiles later, and the label "offset" is displayed under the shape, to note its purpose. The button "clear offset" isuseful when the beam intensity is very weak, not so different from the offset itself.
7.3.3 Integration timeFor each profile, the current on each wire charges a capacitor, so the electronics is able to measure the voltagethat will be displayed on the screens. If the current is too low, the voltage can be amplified by increasing thecapacitor charge time, called the integration time. For the multiwire profiler the integration time is controlled by an
external electronic system, but for the gas ionization and microchannel plates, it must be controlled separately foreach profiler from the control room.
7.3.4 High voltage
For the gas ionization profiles, the amplification rate depends on the high voltage applied to the polarizationelectrode or between the microchannel plates. For these profiles a push button in the display window opens specificwindows with sliders dedicated to high voltage and integration time control. This window is movable so as to see theresult of the commands.
7.4 Graphs & Widgets
Previously oscilloscopes allowed us to see 8 profile planes, 4 horizontal and 4 vertical. The size of theworkstation screen and its definition (1280x1024) are large enough to display 8 profiles, (e.g. 16 planes) and theirassociated commands in eight windows. In each window a push button can allocate the profile chosen by the menu. If
two planes of the same profiler have been selected they will be displayed in the same window.
A button allows to freeze in red the external shape of a profile, while its real-time representation is still refreshed. The
influence of an adjustment in comparison to a reference previously defined by the operator can be seen in this way.
Each profile window is divided into two parts- a label for the profiler’s name and buttons for the commands- a graph for the profile shape
The label and push buttons are standard MOTIF widgets but the graph is drawn with a commercial one called XRT,from the K.L. Group, a widget which is also used in other GANIL beam tuning programs.
7.5 Numerical data
With two button pushes (HO for horizontal plane data and VE for vertical), the graphic display can be replaced byan array of numerical values :- center of gravity- integration time
- high voltage- width at the foot- width to mid-height- surface area
7.6 Archive storage
The numerical values and acquired data can be saved in the database, in order to be able to restore them later
during another beam tuning session, for comparison by superposition with real-time measurements. In addition to theprofiler data, other data relevant to the beam and optics are automatically saved. For restoration different sorting
criteria, namely by name, date or beam identity, can be used.
7.7 Printing
The print button in the main window opens a new menu to print either all the eight graphs on the screen, or
only one profiler (two planes) with its numerical data. The print function of the XRT widget writes in postscript
format a file with the "print on close" attribute, to be directly sent to the printer at the end of this function. The
numerical values are written on the same page as the XRT graph.
A home-made postscript library has been developed to be called from the ADA programs and to be compatible
with the XRT functions. The initial procedure of this library tests a boolean notifying a completion of postscript by
XRT and gets the name of the file created. The text is written by the postscript routines and the file is closed without
print. Then an XRT function opens the same file in append mode (and not in creation mode reserved when XRT isalone), writes in the file and closes it, sending it to the printer. VMS logical names are used to dispatch the printout
to different printers, depending on the workstation submitting the job.

8. OTHER UTILIZATIONS
8.1 ECR source control
A specific program has been developed for the control of ion sources. Besides control of all the source equipment, thisprogram can display the shape from that profiler which sees the source output. The XRT widget is used exactly in thesame way as in the common display program, so the operators can directly see the consequences of their actions on
the ion source.
8.2 TuningAn optimization program wil be developed to tune the beam lines. The operator will select the adjustment point
among all those possible and then the relevant three corresponding profiles will be displayed. The program willcontrol the nearby quadrupole magnets to achieve the desired proportions between the three profiles.

9. REFERENCES
1.

Electronique d’ acquisition rapide des profils,T.André, R.Baumgarten, E.Petit, Ganil/575/93/ml

2.

Installation des Profileurs à gaz & à galettes de microcanaux, Groupe Aires d’ expériences, Ganil/20/94

3.

Controlling the Ganil from an operator workstation, L. David, E. Lécorché, C. Maugeais, M. Ulrich, Conference
EPAC 94 London

4.

Beam profile monitors at Ganil, E. Petit, C Jamet, Conference DIPAC 95 Hamburg