5
Nuclear Instruments and Methods in Physics Research A257 (1987) 309-313 309 North-Holland, Amsterdam AN ON-LINE DATA ACQUISITION SYSTEM BASED ON NORSK-DATA ND-560 COMPUTER Asismoy BANDYOPADHYAY, Amitava ROY, Swapan Kumar DEY, and Sailajananda BHATTACHARYA Variable Energy Cyclotron Centre, Bhabha Atomic Research Centre, 1/AF Bidhan Nagar, Calcutta-700064, India Ranjan Kumar BHOWMIK Tata Institute of Fundamental Research, VEC Centre, TIFR Group, 1/AF, Bidhan Nagar, Calcutta-700064, India Received 17 November 1986 This paper describes a high-speed data acquisition system based on CAMAC for Norsk Data ND-560 computer operating in a multiuser environment. As opposed to the present trend, the system has been implemented with minimum hardware at CAMAC level taking advantage of the dual processors of ND-560 . The package consists of several coordinated tasks running in the two CPUs which acquire data, record on tape, permit on-line analysis and display the data and perform related control operations. It has been used in several experiments at VECC and its performance in on-line experiments is reported . 1 . Introduction The Variable Energy Cyclotron Centre (VECC) in Calcutta, India, is a national facility for the study of experimental nuclear physics and related fields . It is primarily used for the acceleration of alpha particles in the energy range 30-100 MeV. There are plans to upgrade the machine for acceleration of heavy ions by the installation of a PIG and ECR heavy ion source . The data-acquisition system for VECC was originally based on a PDP-15 computer that required replacement due to increasingly unreliable operation. In order to decide on the choice of configuration to replace the original system, it was felt that the new system should be able to cater to the following kind of data processing: (1) high count rate (10-30 kcs) singles data that require minimum processing of the one-dimensional histogram type . Although such a task is most economi- cally done by dedicated pulse-height analysis, it was felt that for setup and calibration purpose, the individual components of a multiparameter setup must be capable of recording data at a high rate . (2) intermediate count rate (2-5 kcs) multiparameter data that required the generation of a number of gated 1-d and 2-d spectra . (3) low count rate (less than 1 kcs) multiparameter data that require substantial user-dependent processing along with event-by-event recording on tape . In addition to the above mentioned constraints on data handling rates, the following additional require- ments must be fulfilled by the system : 0168-9002/87/$03 .50 © Elsevier Science Publishers B .V. (North-Holland Physics Publishing Division) (4) The system must be capable of incorporating any additional CAMAC hardware brought in by an outside user . (5) Since the bulk of the users are from out-station, it should be possible for the program to cater to the need of various "standard" type experiments . A fast change- over from one configuration to another is desirable . (6) The bulk of the experiments should be able to acquire data with a single program, with no user pro- gramming . Provision must also be kept for user-pro- gramming in a high-level language, but it should be compatible with the data structure of the rest of the programme . (7) During the initial phase, the system must have a multitasking capability with provision for the simulta- neous acquisition of data, program development and replay of previously acquired data . Although the last requirement implies a compromise in on-line data han- dling capability, the count rates observed in a majority of experiments are not expected to be CPU limited . The present data acquisition system is based on a Norsk-Data ND-560 computer with CAMAC interface. The operating system takes advantage of the parallel processing capability of the dual CPU of ND100 and ND500 to obtain a high throughput rate. The hardware configuration used is described in section 2 and the software in section 3 . Section 4 summarises the ob- served performance of the on-line program under typi- cal experimental conditions .

An on-line data acquisition system based on Norsk-Data ND-560 computer

Embed Size (px)

Citation preview

Page 1: An on-line data acquisition system based on Norsk-Data ND-560 computer

Nuclear Instruments and Methods in Physics Research A257 (1987) 309-313

309North-Holland, Amsterdam

AN ON-LINE DATA ACQUISITION SYSTEM BASED ON NORSK-DATA ND-560 COMPUTER

Asismoy BANDYOPADHYAY, Amitava ROY, Swapan Kumar DEY,and Sailajananda BHATTACHARYAVariable Energy Cyclotron Centre, Bhabha Atomic Research Centre, 1/AF Bidhan Nagar, Calcutta-700064, India

Ranjan Kumar BHOWMIKTata Institute ofFundamental Research, VEC Centre, TIFR Group, 1/AF, Bidhan Nagar, Calcutta-700064, India

Received 17 November 1986

This paper describes a high-speed data acquisition system based on CAMAC for Norsk Data ND-560 computer operating in amultiuser environment. As opposed to the present trend, the system has been implemented with minimum hardware at CAMAC leveltaking advantage of the dual processors of ND-560 . The package consists of several coordinated tasks running in the two CPUswhich acquire data, record on tape, permit on-line analysis and display the data and perform related control operations. It has beenused in several experiments at VECC and its performance in on-line experiments is reported .

1 . Introduction

The Variable Energy Cyclotron Centre (VECC) inCalcutta, India, is a national facility for the study ofexperimental nuclear physics and related fields . It isprimarily used for the acceleration of alpha particles inthe energy range 30-100 MeV. There are plans toupgrade the machine for acceleration of heavy ions bythe installation of a PIG and ECR heavy ion source .The data-acquisition system for VECC was originallybased on a PDP-15 computer that required replacementdue to increasingly unreliable operation. In order todecide on the choice of configuration to replace theoriginal system, it was felt that the new system shouldbe able to cater to the following kind of data processing:

(1) high count rate (10-30 kcs) singles data thatrequire minimum processing of the one-dimensionalhistogram type . Although such a task is most economi-cally done by dedicated pulse-height analysis, it was feltthat for setup and calibration purpose, the individualcomponents of a multiparameter setup must be capableof recording data at a high rate .

(2) intermediate count rate (2-5 kcs) multiparameterdata that required the generation of a number of gated1-d and 2-d spectra.

(3) low count rate (less than 1 kcs) multiparameterdata that require substantial user-dependent processingalong with event-by-event recording on tape .

In addition to the above mentioned constraints ondata handling rates, the following additional require-ments must be fulfilled by the system :

0168-9002/87/$03 .50 © Elsevier Science Publishers B.V.(North-Holland Physics Publishing Division)

(4) The system must be capable of incorporating anyadditional CAMAC hardware brought in by an outsideuser .

(5) Since the bulk of the users are from out-station, itshould be possible for the program to cater to the needof various "standard" type experiments . A fast change-over from one configuration to another is desirable .

(6) The bulk of the experiments should be able toacquire data with a single program, with no user pro-gramming . Provision must also be kept for user-pro-gramming in a high-level language, but it should becompatible with the data structure of the rest of theprogramme .

(7) During the initial phase, the system must have amultitasking capability with provision for the simulta-neous acquisition of data, program development andreplay of previously acquired data . Although the lastrequirement implies a compromise in on-line data han-dling capability, the count rates observed in a majorityof experiments are not expected to be CPU limited .

The present data acquisition system is based on aNorsk-Data ND-560 computer with CAMAC interface.The operating system takes advantage of the parallelprocessing capability of the dual CPU of ND100 andND500 to obtain a high throughput rate. The hardwareconfiguration used is described in section 2 and thesoftware in section 3 . Section 4 summarises the ob-served performance of the on-line program under typi-cal experimental conditions .

Page 2: An on-line data acquisition system based on Norsk-Data ND-560 computer

310

2 . Hardware configuration

The data acquisition system at VECC is based on theNorsk-Data computer system ND-560 [1] consisting ofan ND-500 CPU for computation and an ND-100 CPUas front end . The 32 bit CPU for ND-500 performs theCPU oriented jobs while the 16-bit CPU of ND-100takes care of the I/O operations . For an on-line experi-ment, the analog signals are digitized and the digitalinformation is entered into the shared ND-100/ND-500memory through CAMAC interface .

The ND system is specially designed for high speedscientific applications with the facility to support atime-sharing, multitasking operating system. The ND-100 CPU with a cycle time of 150 ns and an I/O bustransfer rate of 3 .6 Mbytes/s is ideally suited for highthroughput rate of input data. In the present configura-tion, it is connected to one CAMAC crate controller,two removable 288 Mbytes disc drives, three 75 ips800/1600 BPI tape drives, four video display terminals(VDU), two TEKTRONIX Colour graphics terminals,one plotter and a fast line printer .

For computation-intensive jobs, the ND-500 CPU isused which is about a factor of 3 faster than the CPU ofND-100. The ND-500 CPU has a basic cycle time of200 ns, a memory of 4 Mbytes, a fast-access cachememory of 32 Kbytes, double precision floating pointarithmetic and an efficient memory management systemallowing each user a total of 8 .6 Gbytes of addressspace . From benchmark tests, its speed is estimated tobe 1 .8 Mips . Communication between ND-100 andND-500 is achieved through shared memory segments .

The communication with the experimental environ-ment is provided through a CAMAC interface . TheCrate-Controller (CC-NORD-10) [2] designed byNorsk-Data is compatible with ND-10 I/O bus, and anappropriate interface (NORD-10 bus adapter) is pro-vided by the manufacturer to connect it to ND-100 bus .Transfer of 16 bit data by direct memory access be-tween CAMAC crate and computer memory is takencare of by a CAMAC DMA Controller module (CDMA)[3] . The CDMA is operated in a LAM synchronizedaddress scan mode for module register access and inter-leaved DMA transfer of 16 bit data. This mode ofCDMA operation avoids idle CPU and dataway time .The upper 8 bits of the 24 bit wide memory addressregister of NORD-10 bus adapter are preloaded atsystem loading time to offset the DMA buffers into thecommon shared memory of ND-100 and ND-500 . Thedata transfer time by CDMA has been found to be 2ps/16 bit data including CAMAC Cycle time of 1 [,s.

The shortcoming of the available CDMA is that itdoes not have an end address register for scan mode ofoperation. Hence module scan is terminated by aninterrupt on encountering a vacant station (Q = X = 0response), when starting value of NAF must be re-

A . Bandyopadhyay et al. / On-line data acquisition system

RESET

3. Software configuration

vCOMPARATOR

Reset

from

CDMA

Current Nto CDMA

PRESET AN

Fig . 1 . Extender board to CDMA-controller for suppressinginterrupts .

loaded from the computer. This would defeat the pur-pose of DMA since the interrupt response time in amultiuser environment is quite appreciable. This prob-lem has been avoided by doing a hardware modificationto the CDMA module (fig . 1) . The N-increment signalhas been disconnected so that the NAF register alwayscontains the starting station number No . The N-incre-ment pulses are counted in a separate counter andadded to No in an 8 bit adder to generate the currentstation number N. When the counter content exceeds apreset value, the counter is reset by hardware whichavoids the generation of an interrupt per every scan . Itis therefore possible to use any number of modules inthe CAMAC crate with the modified CDMA withoutsacrificing speed provided that they occupy consecutivestations . An interrupt is generated to the computer onlywhen the wordcount register of CDMA is zero. At thisstage a Real-time program on ND-100 swaps the bufferby a buffer area that is free, and a filled buffer isavailable for software processing by ND-500 .

In order to use the existing 100 MHz 13 bit Tracor-Northern ADCs (NS-623) for data conversion, a multi-plexer unit has been fabricated that plugs into one slotof the CAMAC crate. At present provision has beenkept for multiplexing 8 ADCs . But in principle thehardware can be extended to connect upto 16 ADCs .The module behaves as a single width multichannelCAMAC ADC but has the flexibility of selecting re-quired number of channels through external switches .An external strobe applied to the multiplexer synchro-nized with the ADC gate generates a LAM after asuitable time delay. The multiplexer LAM triggers theDMA controller to read the ADC data and transfer itto the computer memory. A block diagram of the multi-plexer is shown in fig. 2.

The data acquisition system is written as a combina-tion of real-time and background jobs under the

CIncrement O

UN from ND

CDMA TER

ER No from

CDMA

Page 3: An on-line data acquisition system based on Norsk-Data ND-560 computer

LINKBus

GATEZr ANALOG

SIGNALS

HARDWARE

MANAGEMENT

11

I

1

A . Bandyopadhyay et al. / On-line data acquisition system

311

Fig. 2. A block diagram of the multiplexer for CAMAC interface .

HOST ( ND-100)INTERFACE

FORCAMAC

CAMAC CRATECONTROLLER

CAMAC DMAMODULE

CAMAC ADCMODULE

CONTROL6

STATUSFLAGS

SPECTRUM

BUFFER

PROGRAM

PROCESS

IN

( ND-500)

PROGRAM

CONTROL

IN

(ND-500)

CONTROL

CONTROL

III1H

1

SHARED MEMORY1

I

SOFT WAREi

ND-100 6 ND-500

Fig. 3 . Block diagram for the data acquisition software.

TERMINAL(STATUS DISPLAY )

MAGNETICTAPE

COLOUR GRAPHICSTERMINAL

I USER INTERACTION i DISPLAY)

II

BUFFER I j

DMA III

BUFFER 2II~` BUFFER 3

I

RT Î

PROGRAM IIN BUFFER SWITCHING I(ND- 100)

I

_1I

Page 4: An on-line data acquisition system based on Norsk-Data ND-560 computer

31 2

SINTRAN-J operating system. The software essentiallyconsists of three programs, namely SERVICE, CON-TROL and PROCESS running in parallel . The softwareblock diagram is shown in fig . 3 . The entire code iswritten in FORTRAN-77. The CAMAC library, writtenin NORD programming language, was obtained fromCERN, Geneva [5] .

The intercommunication between the three programsis provided by control flags in shared data segments .Two common data segments are provided . The first onecontaining the DMA list buffers is fixed in a definedphysical memory location and is common to all threeprograms . The second one is essentially the spectrumhistogram area and is shared by PROCESS and CON-TROL programs .

The first program, SERVICE, runs in ND-100 and isactive only when interrupted by CAMAC. Initialisationof the CAMAC crate, service of the CDMA module onword-count overflow and DMA data buffer interlockare taken care of by this program. Three DMA bufferswith a maximum size of 4K words each, are available toSERVICE. The buffers are switched between theSERVICE and PROCESS programs in a round robinfashion and the buffer interlock is achieved throughsemaphores . This program is transparent to the userwith no direct interaction .

The program PROCESS does the job of spectrumgeneration and transfer of filled DMA buffers to mag-netic tape. This program is removed from the time-slicemechanism and is assigned a fixed priority to run like areal time job in ND-500. The user has no direct interac-tion with this program as well .

The user can interact with the data acquisition sys-tem through the program CONTROL which is run as abackground job in ND-500. It is always waiting for aterminal interrupt from the TEKTRONIX graphicsterminal . The experimental configuration for the PRO-CESS program can be initialised by the user throughCONTROL, and the various spectrum areas may beviewed at the terminal as one-dimension histograms ortwo-dimension contour plots . The user can alsostart/stop the data acquisition and transfer the spectrato mass storage through CONTROL . Simple mathe-matical operations on the spectra like energy calibrationand finding of area and centroid are also performedthrough CONTROL . More complex operations likemultiple peak fitting can in principle be performed,although they are more conveniently done during off-lineanalysis [6] .

In order to have a flexible program that can bedirectly used by more than 75% of the users, the PRO-CESS program [7] consists of a list of commands corre-sponding to the generation of one and two-dimensionalhistograms, checking of one and two-dimensional gatesand conditional jump instructions . From the table ofADCs contained in the list buffer, a new set of virtual

A. Bandyopadhyay et al. / On-line data acquisition system

ADCs are computed by addition, multiplication or divi-sion depending on the application . The sequence ofcommands to be executed per multi-parameter event istaken from a command table residing in the sharedmemory segment. This table is setup by the CONTROLprogram from a list of command instructions at thetime of defining the experiment . The slight loss incomputational speed in such a "dynamic" programmingenvironment is more than offset by the vastly increasedflexibility offered for on-line processing. For each com-mand in the PROCESS program, there are two entriesin the CONTROL program for generating the com-mand table . An user-friendly subroutine, TTSUBS [S],is used for handling all formatted input.

4. Performance

The ultimate throughput rate of the data acqusitionsystem is determined by the time spent at the followingintermediate steps :(1) The 100 MHZ ADCs have a conversion time of 10ILs for 10 bit data . This time may be reduced by usingfaster ADCs and/or parallel conversion of several ADCsin a multiparameter setup .(2) The DMA transfer rate is 2 us per data word.(3) There is an interrupt-servicing time of 2 ms whenthe list buffer is full, resulting in an average dead timeof 0.5 1Ls/word for a 4K buffer size .(4) The 75 ips writing speed of the 1600 BPI tape drivewould limit the data-transfer rate to tape at less than60K words/s.(5) A command to generate a histogram from the listbuffer can be executed in 15 ILs on ND-500 CPU. Theneed to first copy from the list buffer to a virtual ADCbuffer and search the command table increases this timeto 30 ILs per instruction .(6) The updating of the display does not significantlyincrease the dead time of the system as the display isgenerated by the CONTROL program running as abackgroundjob . The display itself is stored in the rastermemory of the TEKTRONIX terminal and requiresCPU intervention only when updated.

The count-rate capabilities for various configura-tions used in typical experiments may be summarised asfollows :(1) For singles mode of operation it has been possible togenerate histograms at the rate of 40 000 cps . Theoverall deadtime is dictated by the finite conversiontime of the ADCs.(2) For multiparameter data, a maximum throughputrate of 40 000 words/s has been achieved. The list-modebuffers are copied block by block on magnetic tape butfurther software processing is suppressed . Since theexecution time per instruction (i .e. generatiion of 1-dand 2-d display, software gates etc .) is 30-60 Its, the

Page 5: An on-line data acquisition system based on Norsk-Data ND-560 computer

data rate has to be reduced by a factor of 2-3 for 100%online processing.(3) One of the major applications of two-parameter datais the generation of total energy and particle-identifica-tion from AE-E telescope data . A fast algorithm with"banana gates" has been written to generate the energyspectra for different types of particles at the rate ofupto 7500 events/s.(4) Upto a factor of two improvement in processingtime may be obtained by eliminating the virtual ADCsand command table and writing a compact code . Theflexibility of the on-line system would however be greatlyreduced as each application requires a separateprocessing program. In the present setup, the commandtable may be saved as a text file for future reference.

5. Summary and conclusions

A CAMAC based data acquisition system has beeninstalled at VECC for the collection of multiparameterdata . The software configuration consists of three inde-pendently running systems that take advantage of thedual ND-100 and ND-500. The CPU idle time is virtu-ally eliminated allowing other batch jobs to run concur-rently. A throughput rate of 40000 words/s has beenachieved by using a commercially available DMA mod-ule that has been modified to reduce the number ofcomputer interrupts . An extremely flexible processingprogram has been written in FORTRAN which is capa-ble of executing upto 30000 commands/s. The on-lineprocessing rates for different experimental configura-tions are compatible with the anticipated data rates .The system has been working reliably for the last oneyear without major breakdowns .

One of the major limitations of using DMA scan formultiple CAMAC stations is that all subaddresses ineach station have to be read leading to a large overheadin buffer processing . This can be avoided in a micro-processor controlled DMA where the successive NAFinstructions are read from a built-in memory. The DMAshould also be capable of suppressing the transfer ofzero data in order to reduce the volume of tape gener-ated . Work is in progress for the construction of an"intelligent" DMA controller .

A. Bandyopadhyay et al. / On-line data acquisition system

Acknowledgements

We would like to thank all users and Mr. B.R .Pratap of INDCHEM for many fruitful discussionsduring the installation of the system. One of us (R.K.B .)is indebted to Drs. P. Kroon of KVI, Netherlands andMr. T.W . Thacker of University of Oxford, England forhelpful suggestions . The help provided by the NuclearPhysics Division of Bhabha Atomic Research Centreand the computer staff at VECC is warmly acknowl-edged. We are greatly indebted to Dr . C. Eck and Dr.Andre Bogaert of CERN for kindly supplying the CERNlibrary and for many helpful discussions . We like tothank Mr. Sujit Kumar De for typing out thismanuscript .

References

[1] NORSK Data A.S., P.O . Box 25, Bogerud, 0621 Oslo 6,Norway .

[2] CAMAC Crate Controller, JCC 10, M/s. SchlumbergerNuclear Instrumentation Branch, also, CC-NORD-10Hardware, Publ. No. ND-12.006 .02 (June 1978) NORSKData A.S . Oslo, Norway.CAMAC Direct Memory Access Controller, General Infor-mation Publ. No. ND-12.004.01 (June 1974) NORSK DataA.S., Oslo, Norway.

[4] SINTRAN III Reference Manual, Publ . No. ND-60.128.04(Feb . 1984) NORSKData A.S ., Oslo, Norway .Standard Camac Subroutine, CERN DD division,DD/OC/80-4 Version 3, (May 84) CERN, Switzerland.

[6] The Program VECSORT (R.K. Bhowmik, private com-munication) is used for off-line processing. It can be usedfor interactive analysis of complex line shapes encounteredin X-ray spectroscopy .The architecture of the PROCESS program is similar to theoff-line program PAX at KVI, The Netherlands, Drs. P.Kroon, KVI Annual Report (1981) p. 88.

[8] TTSUBS (R.K. Bhowmik, private communication) is anutility program written in FORTRAN for formatted inputof integer or real data and text with provisions for userprompting and error detection. The program is similar toCIO package at KVI (Drs . P. Kroon; KVI Annual Report(1980) p. 139) .

31 3