Nuclear Instruments and Methods in Physics Research A290 (1990) 613-614 North-Holland
613
Letter to the Editor
A MICROCOMPUTER-BASED MULTIPARAMETER NUCLEAR DATA ACQUISITION SYSTEM M.B . SCHNEIDER and N.K. GREGORY Department of Physics, Grinnell College, Grinnell, IA 50112, USA
Received 11 December 1989 An inexpensive and flexible microcomputer-based CAMAC data acquisition system is described . Quantitative performance characteristics are given to allow calculation of acquisition speed for an arbitrary configuration. Most multiparameter, pulse-height analyzing nuclear data acquisition systems utilize relatively expensive technology: a substantial minicomputer connected to several CAMAC crates. The expense of such a system, as well as the difficulties of implementation and maintenance of one, would severely tax the resources of small research or teaching laboratories . Wishing to perform a nuclear physics experiment that required the coincident pulse-height measurement of low-count-rate signals from three detectors, we chose to develop our own acquisition system around an inexpensive microcomputer, and use commercially available CAMAC equipment (including the computer interface). The components for such systems have been available for several years, and have been implemented for single-channel acquisition [1,2]. We used low-level interface drivers supplied by the interface manufacturer, and wrote our own sorting and display software. The results is a serviceable and flexible data acquisition system for less than 10000 US$. Having neither the desire nor the expertise to develop our own CAMAC hardware and interface, we chose commercially available equipment. Our analogto-digital conversion relies on an EG&G Ortec AD811 eightfold CAMAC ADC module . This module converts eight analog channels simultaneously upon detection of a NIM standard negative strobe pulse . Simultaneous conversion of all eight channels takes a fixed 80 ps. For our microcomputer, we used a Standard 286 IBM-PC AT compatible machine. This is interfaced to a Kinetic Systems mini-CAMAC crate with an interface/controller system manufactured by DSP Technology. DSP Technology also supplied low-level software drivers which we then implemented in our data acquisition program written in Turbo Pascal. This code was written almost entirely by Grinnell undergraduates with only modest programming experience. A complete data acquisition cycle following a valid strobe pulse includes the following operations: analog-
to-digital conversion of data, detection of the look-at-me (or LAM, the CAMAC module service request), reading data, clearing of the module, and histogramming of data (which may be conditional depending on the values of other data channels). Some of these may not in practice be implemented separately (the crate controller requires detection of LAM prior to unloading data, and the clear is incorporated with a specific read operation) . However, the processing times given in table 1 allow one to accurately calculate the time required for a specific data acquisition and sorting configuration. To choose a concrete example, let us consider an experiment that sorted signals from three detectors into five histograms . Let us further specify that three of these histograms are singles spectra, and the remaininb two are sorted dependent upon signals from another channel being within a specified range (two window conditions for each histogram). We can then calculate the processing time from the values above, and evaluate them by the five categories. The maximum time for sorting each event would then have contributions as given in the example column of the table, for a total of 332 ~Ls per cycle . This corresponds to a dead time fraction of about 250 for a random event rate of 1 kHz, Table 1 Data processing times by operation Operation
Analog- to- digital conversion LAM detection Data read Module clear Histogramming Window condition
0168-9002/90/$03 .50 0 1990 - Elsevier Science Publishers B.V. (North-Holland)
'1 e fcr si. s : t-c lee operation
Example (see text) [[.si
8011s 15 ~Ls 50 [ts per channel 50 [.s 5 Ws per histogram 3 ~Ls per condition
80 15 150 50 25 12
614
M. B. Schneider, N.K Gregory / Nuclear data acquisition system
and a maximum acquisition rate of 3 kHz . This data acquisition rate, while inferior to minicomputer systems common at small nuclear accelerator laboratories, is nonetheless of the same order of magnitude of performance at roughly 10% of the cost [3] . The surprising result of this investigation is that the processing of the data by the microcomputer is a negligible part of the total processing time. In fact, histogramming a full eight data channels takes less time per cycle than the analog-to-digital conversion in the CAMAC module itself. The histogramming operation itself is the only operation in the above list, in fact, that can take place after the clearing of the module, and so can occur while the next event is being converted in the ADC module . Clearly the greatest time is spent in unloading data from the CAMAC module, which appears to be limited by the rate at which data is transferred between the CAMAC controller and the main program. It is likely that custom software I/O drivers might improve this data rate; discussions with DSP Technology indicate that a transfer time of 10 Rs per channel is possible with assembly language programming. There are some natural improvements that one might consider incorporating in this system which do not necessitate hardware changes . For example, detection of the LAM is accomplished presently by continuous polling by the host processor. This demands the continuous use of the microcomputer, and does not allow analysis or presentation of data during acquisition . This can be circumvented by interrupt-processing of events, although this requires more sophisticated programming skills to develop the interrupt service routines. The interface card provides for the interpretation of a LAM as a hardware interrupt with minor modification of the card. This improvement would not result in a significant increase in data acquisition rate, since only a very small fraction of time per event is spent in the detection of the associated LAM by the palling routine . Another improvement would be to allow the user to more easily modify the number of data channels (i.e. number of detectors) acquired and the details of the histogramming. At present, the data sorting routine must be rewritten for every change of the number of histograms or the number of data channels to be sorted. These changes, however, are easily accomplished within standard Pascal, and arf no more cumbersome than some
specialized data acquisition control languages in use at many nuclear accelerator laboratories. The greatest improvement in performance depends on the crate controller and associated interface . Controllers with microcomputer interfaces are now being introduced which will take advantage of considerably faster data transfer rates. Controllers which use the Small Computer Systems Interface (or SCSI), the IBM PS2 microchannel interface, or Ethernet are available or planned from more than one manufacturer, and should significantly reduce this data transfer problem. These controllers also greatly broaden the number of possible microcomputers that one could apply to these tasks to include the most recent 16- and 32-bit machines. It is not unrealistic to expect that these systems would then begin to be limited by the conversion speed of the CAMAC module, with useful data rates with our CAMAC hardware then approaching 10 kHz . In summary, we have developed an inexpensive yet extremely versatile and surprisingly fast multiparameter nuclear data acquisition system from commercially available components. This system required no hardware development, and only minimal software development. There is good reason to expect substantial improvement beyond this with new CAMAC controllers that are now available, with an overall improvement in processing speed of perhaps a factor of five. Acknowledgements We gratefully acknowledge useful conversations with R.T. Kouzes and M. Miller. This work was supported in part by the Iowa S ;sence Foundation through grant ISF 88-47 . One of us (N.K.G.) gratefully acknowledges the support of the Joyce Foundation during the summer of 1988. References [1] R.T. Kouzes, L. Piilonen and D. Schreiber, IEEE Trans. Nucl. Sci. NS-30 (1983) 3895. [2] L.O. Lindquist and C.E. Moss, IEEE Trans. Nucl. Sci . NS-34 (1987) 958. [3]_ R.T. Kouzes and M. Karlsson. IEEE Trans. Nucl. Sci. NS-32 (1985) 1363 .