68
Nuclear Instruments and Methods in Physics Research A247 (1986) 68-73 North-Holland, Amsterdam
CONTROLS AND DATA ACQUISTION FOR THE NRL MODIFIED BETATRON ACCELERATOR Linton FLOYD, Jeffry GOLDEN and Tab SMITH Naval Research Laboratory, Code 4711, Washington, DC 20375, USA
Eugene DAY and Spencer J. MARSH Sachs Freeman Associates, Landover, MD 20785, USA
A CAMAC based data acquisition and control system (DACS) has been developed for the NRL modified betatron accelerator. The design goal of the MBA is to accelerate single-shot multi-kA currents of electrons to 50 MeV. The DACS must perform three general tasks: (1) the control and shot sequencing of the accelerator, (2) the data acquisition of MBA shot data and (3) the archiving of the shot conditions, shot digitizer data, and oscilloscope data. A VAX 11/750 controlled system crate contains a serial highway driver that communicates with CAMAC crates in three remote locations via fiberoptic links. The DACS utilizes sensing and feedback to control capacitor banks, high vacuum pumping systems, high speed digitizers and the precision infector accelerator during shot sequencing. A control program written at NRL invokes CAMAC functions to perform shot sequencing, provide data acquisition, and archiving. The computer actuates switches that control equipment subsystems by operating relay logic and interlocking . Thus, the computer control functions in parallel with manual controls . The DACS logs the conditions before and after MBA shots. It also archives data acquired form the buffer memories of transient digitizers and from a PDP 11/23 controlled vidicon camera that digitizes oscilloscope photographs . 1. Introduction This article describes the implementation of the NRL Modified Betatron Accelerator [1-3] (MBA) data acquisition and control system [4] (DACS) . The design goal of the MBA is to accelerate electron beams with currents of several kiloamperes to energies in excess of 50 MeV. While both the MBA and the conventional betatron use rising vertical magnetic fields to inductively accelerate the electron beam, the MBA also employs an externally applied toroidal magnetic field [5-7]. Theoretical studies show that the toroidal field improves the stability and equilibrium properties of the device at high currents. The development of a highpower compact accelerator such as the MBA has exciting applications in the fields of high-power coherent radiation, X-ray radiography and national defense. Operation of each pulse or "shot" of the MBA may be divided into three phases : injection, capture and acceleration. In the injection phase, a precision accelerator generates a 2.5 kA pulse (duration -= 20 ns) of electrons with an energy of approximately 1 .2 MeV . The beam is produced by an intense relativistic electron beam diode located wihin the toroidal vacuum chamber which has a major radius of 1 m. The toroidal field (TF) and betatron (vertical) field (VF) are pulsed prior to injection. The correct field values must be obtained so * Work suported by ONR and SDIO .
that the poloidal drift motion of the beam about the equilibrium orbit radius remains inside the chamber. Next, during the trapping phase, a small change to the betatron field is produced by a set of capture-field electromagnet coils. This change in the betatron field shifts the beam equilibrium radius away from the injector so that after one poloidal oscillation (period - 0.5 p s) the beam will miss the diode and be confined . The acceleration phase follows beam capture. By increasing the betatron field flux, the beam is inductively accelerated . However, because the self-magnetic field of the beam diffuses out of the vacuum chamber, compensating coils must be pulsed during the acceleration phase to maintain equilibrium . In contrast to many other accelerator laboratories, the principal scientific objective of the present experimental program is the study of the accelerator itself. According to theory, the experimental parameters that must be precisely controlled include the injection energy, toroidal and betatron field amplitudes, auxiliary (capture and diffusion compensation) fields, and the injection radius . The purpose of the MBA DACS control subsystem is to conduct the safe and efficient operation of the MBA. The task of the DACS data acquisition subsystem is to read the accelerator data from digitizers and data loggers both before and after each MBA shot and to archive it for later retrieval. Both of these subtasks are to be accomplished with minimal operator interaction .
L. Floyd et al. / Controls and data acquistion for the NRL MBA
69
2. MBA accelerator hardware
4. Accelerator controls implementation
The accelerator hardware consists of three capacitor banks, the precision injector accelerator, the toroidal, betatron, and capture field coils, the vacuum chamber and pumping system, and the intense relativistic electron beam diode. The injector consists of a Marx generator, an ethylene glycol dielectric pulse-forming transmission line that is connected by a self-breaking SF, gas spark gap to a vacuum transmission line and beam producing diode load . Because of the constraints on the accuracy of the injection energy, the pressure of the gas is monitored and adjusted to achieve precise switching characteristics and excellent pulse reproducibility ±1%). The precision injector maintains a constant level of diode voltage (within 1%) throughout the pulse duration in spite of the variation in diode impedance amplitude through the use of a ballast resistor . The betatron and toroidal field coils are powered by separate capacitor banks. The pulse rise times are approximately 1 .5 ms . Both of these banks are charged to very high precision, i.e . ±0.2% for the betatron and +1% for the toroidal field banks.
The manual control racks contain hardware which is sufficient to operate the MBA with or without computer control. The controls for each major subsystem component are mounted in a separate rack cabinet . The interlocking logic for both the safety of the accelerator and its operating personnel is implemented in hardware relays . Our reasoning is that the MBA software is more likely to be the source of safety problems than the hardware because the hardware will not be modified as often and because the knowledge of hardware interlock safety systems is greater . Furthermore, manual controls simplify operation of the accelerator in the early testing and debugging phases . The principal advantage of computer control is that the routine button pushing and status sensing and their recording can be automated. Computer control is therefore more suitable for production work when increased MBA shot rate is important. The MBA can be fired without computer assistance, since the computer control system operates in parallel with the manual controls . The manual control switches and sense lights have separate computer control lines which allow it to fire the MBA in the same way as human operators do . Thus, the system has the advantages of both types of controls . Since components of the MBA are located, by necessity, in three different remote areas which are not in direct view from the MBA control panel, a method of ensuring personnel safety in those remote areas was devised. Several push button switches are widely separated in each hazard area. Each of the switches must be momentarily pressed within a given time period for the area to be secure, thus ensuring a proper search. When a subsystem is selected on the MBA front panel, the subsystem will not operate until that area is secure. A second safety system, independent of the first, includes emergency-trip mushroom switches in each remote area, which can terminate the MBA firing sequence when depressed. Manual control for the MBA is based on 120 V ac relay logic. Potter and Brumfield four-pole socketmounted relays and heavy-duty microswitch PM type controls are used throughout . All primary control circuits incorporate normally open interlock contacts and momentary-contact switch actuators to insure that : 1) for the majority of probable failure modes, a "disabled" quiescent state will result ; 2) interlock relays must be deliberately energized to provide a closed circuit control path. In other words, power failures affecting part or all of the accelerator controls will not cause catastrophic failure since controls need to be deliberately energized in order to do anything potentially damaging .
3. MBA shot sequence The overall MBA shot firing sequence is discussed in the context of manual controls. At this point in the development of the MBA, the computer can control the accelerator only in the same manner as human operators. The computer automatically pushes buttons during the firing sequence, but does not have real time responsibilities . In future experiments, dynamic computer control may be needed and the system that we have can be upgraded to include that capability. The first step in the shot firing sequence is the securing of hazardous areas against unauthorized personnnel access . For individual pulsed power subsystem testing, only those areas involved are affected . Next, the subsystems required for the shot are selected by the operator . The high voltage subsystems are then prepared for fire control. For example, power supplies must be connected to their corresponding capacitor banks and those banks must be unshorted. Confirmation of precharge status of all subsystems allows the MBA to enter the "start charge" sequence which commences by the operator's direction. Once all subsystems are fully charged and prepared for triggering, the trigger signal is given and the various subsystems are fired automatically with previously selected delays. Finally, after a short delay (= 1 s), post-shot controls make the hardware safe . An example of this is the electrical shorting of the capacitor banks.
1 . OVERVIEW OF EXISTING SYSTEMS
70
L Floyd et al. / Controls and data acqufstfon for the NRL MBA
5. DACS system level hardware The overall configuration of the DACS is shown in fig. 1 along with the logical function of each component. The principal communications link of the DACS system is a CAMAC fiberoptic serial highway [8] (IEEE 583 and IEEE 595). The CAMAC serial highway system is connected through the use of a "system" CAMAC crate containing a pair of Kinetic Systems (KS) 3920 crate controllers and a KS 3992 serial highway driver. The KS 3920's are connected to a VAX 11/750 and a PDP 11/23 respectively, using UNIBUS and Q-bus boards. The configuration of the system crate and the crates in the dagnostic shielded room are displayed in fig. 2. The "system-crate" configuration was chosen instead of the more widely used rack-mounted serial highway driver so that the PDP 11/23 could control the serial highway on a coequal basis with the VAX. Each subsidiary CAMAC crate is connected to the serial highway using a KS 3952 serial crate controller . There are four locations for the CAMAC crates and each of these is connected to the other locations using LeCroy 5211 U-port adapters and fiberoptic cable. Currently, the serial highway operates in byte-serial mode at a rate of 5 Mbyte/s. The U-port adapter transforms this to 40 Mbit/s bit-serial on each fiber optic leg of the serial highway. The ultimate speed of data transfer is presently limited by the CAMAC driver software. The physical layout of the DACS system is given in fig. 3. There are two diagnostic shielded rooms, one inside the eight foot thick concrete wall which encloses the MBA and another adjacent to the computer screen
VAX 11/760
console interface
PDP 11/26
minicomputer
DECnet
microcomputer
Overall Accelerator Control Data Archiving Data Analysis
room . These rooms house crates containing CAMAC digitizers of variable sampling speeds (LeCroy 8828 and 8210) and a CAMAC module interfacing to GPIB [9] (IEEE 488) digitizers (Tek 7912 and 7612). The use of the fiberoptic serial highway not only serves to minimize electrical pickup by these connections, but also allows the computer room to be placed on a completely isolated and separate ground from the experiment . The control racks outside the computer room house a pair of crates containing modules which interface to the manual control system . Capability for distributed processing is provided by an in-crate PDP 11/23 auxiliary crate controller . The switching between manual control and computer control is accomplished as follows . While the DACS is under manual control, the computer signals the operator by lighting a "computer ready" indicator lamp on the control rack. The operator then directs the computer to take control of the MBA. The computer asks to be switched into remote mode, and at the discretion of the MBA operator, the local/remote switch is toggled. At that point, the manual control switches will not operate except for the "all systems dump" switch which automatically brings the DACS to manual control. No checking by the computer of the state of manual controls is necessary for safety since relay logic ensures that the switches are operated in the proper sequence. When the computer finds that it cannot properly operate the MBA, the computer diagnoses the problem and notifies the operator for correction .
Computer Room : System CAMAC Crate
oscilloscope Photograph Digitising System
CAMAC interlxe CAMAC serial highway
Shielded Room in Room S
Control Rack in Area A
Shielded Room in Axa A
Data Acquisition :
Accelerator Controls :
Data Acquisition :
High speed digitisere (> 100 Mhs)
Igjector Low speed digitisers Vertical Field (VF) coils (c 100 Mhs) Toroida1 Field (TF) coil . Capture Field (CF) coils Image Correction (IC) coils Safety Interlock System V¢nam system
Fig. 1 . MBA DACS logical configuration .
Fig. 2. Configuration of CAMAC system level modules for system crate and sample diagnostic crates .
L. Floyd et al / Controls and data acquistion for the NRL MBA
71
Fig. 3. MBA DACS physical layout . The computer control system software operates computer switches and sense lights in parallel with the manual controls . Each switch or sense light has a corresponding bit that can be read and/or written on a register of a CAMAC module . Standard Engineering Co . Quantrol CAMAC modules are used for this purpose as well as for digital-to-analog controls and analog-to-digital senses . When possible these connections to the CAMAC modules are made through optically isolated termination blocks . When the system is transferred to computer controlled operation, relay contacts are used to disconnect the manual controls and latches and substitute a parallel set of computer controlled CAMAC switching modules . In this mode, the ON/OFF functions are reduced to "switch closed" and "switch open" indicators, respectively. The computer, however, monitors the feedback lines directly to determine if the intended control function has taken place. The manual mode interlock chain is retained in computer mode to provide a fail-safe backup for the normal computer switch sequencing . 6. DACS system level software The software for the MBA was constructed as a multilayered product. Serial highway software drivers for both the VAX and the PDP 11/23 were purchased from Kinetic Systems Corp . The VAX driver provides a
QIO level access to the CAMAC serial highway using the 3920/3992 controllers . It appears to the VMS operating system as a normal system level device . Multiple users are allowed to access the CAMAC system while multiple processes are prevented from accessing the same module simultaneously . Of course, access conflicts between the VAX and the PDP 11/23 are only incompletely resolved by the hardware and are not all resolved by the software . The driver also has interrupt handling capability for CAMAC LAMs which is not presently utilized . Provided with the driver were subroutines having CAMAC standard FORTRAN calls which we use with minor modifications allowing for high level access to the system controller status bytes. Presently, the driver does not use any of the DMA capabilities of the hardware, but we plan to upgrade the driver to include software simulated DMA capability . Above the system level of the CAMAC driver are routines which handle generalized digital sense, digital switch, analog sense, and analog control functions. A BLOCK DATA database allows the same subroutines to be called for these functions regardless of the specific hardware used . Several intruments used by the DACS are GPIB (IEEE 488) compatible . These devices are accessed through the CAMAC system using KS 3388 GPIB interface modules. A library of subroutines which makes the necessary CAMAC calls to the KS 3388 was written in VAX FORTRAN . There are three separate GPIB I. OVERVIEW OF EXISTING SYSTEMS
L Floyd et al / Controls and data acquistton for the NRL MBA
72
Table 1 MBA diagnostic channel summary Diagnostic
Marx voltage Marx current Ballast current Ballast voltage Vacuum line current Anode current Faraday cup current Diode voltage Total X-rays X-ray ratio energy (2) Toroidal magnetic field TF current Betatron magnetic field (2) Streak camera monitor Wall Faraday cup current Microwave diode X-ray dump (2) Beam centroid position (2) Circulating current position Beam electric field probe a)
(D)
Type
R-divider Rogowski dB/dt loop R-divider dB/dt loop Rogowski Rogowski capacitive scmtillator/PM photodiodes dB/dt loop Rogowski dB/dt loops Rogowski photodiodes dB/dt loops dB/dt loop capacitive
Bandwidth channel
a)
50 MHz 8828 (D) 50 MHz 8828 (D) 150 MHz 7844(0) 200 MHz 7844(0) 200 MHz 454A (0) 200 MHz 454(0) 200 MHz 7844(0) 200 MHz 7844(0) 250 MHz R7912 (D) >250 MHz 7844(0) 50 kHz 8210 (D) 50 kHz 8210 (D) 50 kHz 8210 (D) 200 MHz 7844(0) 200 MHz 7844(0) 200 MHz 7844(0) 100 MHz 8828 (D) 100 MHz 7612 (D) 100 MHz 8828 (D) 500 MHz 7912 (D)
digitizer, (O) oscilloscope .
buses in different locations and all are handled by the subroutines as if all devices were on the same bus. Each GPIB device on the serial highway has a unique identification number. The library handles the particular CAMAC calls transparently so that, in most cases, the identification number is the only information that the high level program requires in order to access the GPIB buses. 7. DACS control program The MBA control system software was entirely written in VAX FORTRAN at NRL. The MBA control program has two functions. Primarily, it coordinates the firing of MBA shots including operating the computer assited manual controls . In addition, it records shot conditions such as background vacuum gauge pressures automatically. It also logs operator comments that in the past were handwritten in a log book . By assisting in the clerical tasks as well, the control program aids in experimental efficiency. The software sequence for firing an MBA shot is as follows . First, the program SHOTSET coordinates the parameterization of the upcoming shot at the direction of the MBA operator . Its module CONFSET interacts with the MBA operator to set the shot parameters . Next, these parameters are verified and saved by the VERSET software module. Using a DCL command file execution is chained to the program SHOTFIRE which begins by preparing the MBA hardware for the shot . When the hardware is
ready to initiate shot firing, the "go ahead" signal is given by the operator, and the shot sequence is intitiated . The module AUTOSEQ performs the shot firing autosequence concluding in either successful MBA firing or an "all system dump" error condition . In the future, some or all of this autosequencing function will be delegated to the in-crate PDP 11/23. The stand-alone PDP 11/23 system will be used as a development environment for creating this autosequencing software . 8. DACS data acquisition system Data from the MBA are acquired using both oscilloscopes and CAMAC and GPIB based digitizers . Digitizers have obvious advantages when interfaced to a computer system in terms of data acquisition, archiving and analysis . We use oscilloscopes along with digitizers for the following reasons. First, our group has a substantial investment in oscilloscope hardware . Since one revolution of the MBA electron beam occurs in about 20 ns, many of the diagnostic channels are of very high bandwidth (> 100 Mhz). At these bandwidths, the per channel cost of acquiring oscilloscopes including their cameras is only about one third as much as that of high speed digitizers . Furthermore, since oscilloscopes are stand-alone units, they are not helpless when the computer is unavailable . A list of typical diagnostic channels and their bandwidths is given in table 1 . In keeping with the minimization of software devel-
L Floyd et al / Controls and data acquistion for the NRL MBA opment
73
costs, we adopted the data acquisition and
cation with other computers at NRL be available to
Laboratory for Plasma and Fusion Energy Studies [101 . This software consists of WFFILE, a program to acquire
simulations. Shielding of the computer screen room
analysis system used by the University of Maryland
the data from CAMAC and other types of digitizers,
WFCALC, a program to display them numerically and perform elementary calculations on them and WFPLOT, a program to plot the results. These were originally written in FORTRAN IV for the PDP 11/23 running RT-11, so some development time was spent transport-
ing the code to VAX/VMS. The second of these pro-
grams uses the CSI command interpreter which was not
facilitate post-processing and interaction with numerical presents an obstacle
to normal
wire
connection
of
terminals to the VAX. High speed fiberoptic modems are used to connect terminals in offices and locations
outside the computer screen room to the VAX. Installation of a fiberoptic version of Ethernet (IEEE 802.3)
connecting to other NRL VAXes and the NRL CRAY
XMP/12 is in progress . Since, in the design of the DACS, the computer is primarily a replacement for
available on the VAX and such a parser had to be
human operators, microsecond or even millisecond response times are not required . Thus during periods of
checked during software development phases using the stand-alone PDP 11/23 system.
In this way, processes in progress during MBA firing are
written. During that period, data acquisition was available using the PDP 11/23 . Code compatibility was
Another data acquisition and analysis problem was how to translate oscilloscope data to the same format as the digitizer data. To this end, we acquired a Hamamatsu C-1000 video camera system and Austin
Re-
search Associates software to digitize oscilloscope photographs. The software was modified to run under RT-11
and to produce data files in the Maryland format . The stand-alone PDP 11/23 is used to acquire and preprocess the photographic data. The resulting files are then transferred to the VAX using DECnet .
Photographs suitable for digitization must have very bright baseline and signal traces only. No graticules or other stray marks may be present. Resolution of an oscilloscope trace can be as high as 512
x 512
if the
data trace fills the TV screen . Studies have shown that
the system is accurate to within ± 1 pixel on signal trace flat-tops. Once the trace is acquired, the result can be
calibrated using an interactive program which prompts for the real coordinates of the X and Y axes . Since this digitizing process presently takes about an hour for a set of ten data traces, only selected oscilloscope traces are digitized . It is also a requirement of the DACS that communi-
MBA shot sequencing, the relative priority of other tasks such as terminal and network activity is lowered, guaranteeing adequate computer response for the DACS. not aborted, but only delayed.
References [1] P. Sprangle and C.A . Kapetanakos, J. Appl . Phys . 49 (1978) 1. [21 C.A . Kapetanakos, P. Sprangle, D.P . Chernin, S.J . Marsh and I. Haber, Phys. Fluids 26 (1983) 1634. [3] F. Mako, J. Golden, L. Floyd, K. McDonald, T. Smith and C.A . Kapetanakos, IEEE Trans. Nucl . Sci. NS-32 (1985) 3027 . [4] L. Floyd, J. Golden, T. Smith, E. Day and S.J . Marsh, ibid . p. 2092 . [5] D.W. Kerst, Phys. Rev. 58 (1940) 841 . [6] D.W. Kerst, G.D . Adams, H. W. Koch and C.S. Robinson, Phys . Rev. 78 (1950) 297. [71 C.A . Kapetanakos, S.J. Marsh and P. Sprangle, Part. Accel. 14 (1984) 261. [8] ANSI/IEEE, CAMAC Instrumentation and Interface Standards (Wiley, New York, 1976) .
[9] ANSI/IEEE, IEEE Standard Digital Interface for Programmable Instrumentation (IEEE, 1978). [10] These undocumented programs were written by one of us (E.D .) .
I. OVERVIEW OF EXISTING SYSTEMS