UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Camac-based nuclear data acquisition system Le Patourel, David Andrew 1972

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata


831-UBC_1972_A6_7 L45.pdf [ 1.84MB ]
JSON: 831-1.0084848.json
JSON-LD: 831-1.0084848-ld.json
RDF/XML (Pretty): 831-1.0084848-rdf.xml
RDF/JSON: 831-1.0084848-rdf.json
Turtle: 831-1.0084848-turtle.txt
N-Triples: 831-1.0084848-rdf-ntriples.txt
Original Record: 831-1.0084848-source.json
Full Text

Full Text

A CAMAC-BASED NUCLEAR DATA ACQUISITION SYSTEM by DAVID ANDREW LE PATOUREL B.Sc,  University of British Columbia,  1971  A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE  in the Department  .  of Physics  We accept this thesis as conforming to the required standard  THE UNIVERSITY OF BRITISH COLUMBIA September,  1972  In p r e s e n t i n g t h i s t h e s i s  in p a r t i a l  f u l f i l m e n t o f the r e q u i r e m e n t s f o r  an advanced degree at the U n i v e r s i t y o f B r i t i s h Columbia, I agree the L i b r a r y s h a l l make i t f r e e l y a v a i l a b l e  that  f o r r e f e r e n c e and s t u d y .  I f u r t h e r agree t h a t p e r m i s s i o n f o r e x t e n s i v e copying o f t h i s  thesis  f o r s c h o l a r l y purposes may be g r a n t e d by the Head o f my Department o r by h i s r e p r e s e n t a t i v e s .  I t i s understood t h a t copying o r p u b l i c a t i o n  of this thesis f o r financial written  permission.  Department of  Physics  The U n i v e r s i t y o f B r i t i s h Vancouver 8, Canada  Date  gain shall  25> September, 1972*  Columbia  not be a l l o w e d w i t h o u t my  il  Abstract This paper describes a data a c q u i s i t i o n system developed f o r an intermediate energy nuclear s c a t t e r i n g experiment.  Equipment  standards o f CAMAC and NIM were used together w i t h a 12K minicomputer and an i n d u s t r y compatible magnetic tape d r i v e r . The higher l e v e l languages o f BASIC and FORTRAN were equipped w i t h subroutines that allow input/output communication w i t h the CAMAC data a c q u i s i t i o n system.  The BASIC-CAMAC system proved t o  be most u s e f u l t o the experimenter o n l y t a k i n g second place t o the FORTRAN-CAMAC system when data handling speed was o f paramount importance.  iii  Contents Page 1.  INTRODUCTION  1  2.  REQUIREMENTS OF A DATA ACQUISITION SYSTEM AND THE CAMAC CONCEPT  2  2.1 2.2  Scope of Current Experiment General Requirements of a Nuclear Data A c q u i s i t i o n System  2 •  2.2.1 2.2.2 2.2.3  3.  2 CAMAC Hardware Structure of CAMAC  3.1  6 System Hardware Interfacing 3.2.1 3.2.2  3*3  3.3.2  6 7  Loading the BHD  7  A CAMAC Cycle  7 8 8  BASIC  CAMAC Subroutines CALL h CALL 9  3.3.1.U  Physics Subroutines  8 9 9 10  FORTRAN  11  11  FORTRAN Subroutines  12 Ik  CONCLUSION REFERENCES APPENDIX A APPENDIX B APPENDIX C APPENDIX D APPENDIX E  6  NOVA/NIM Interrupt Unit Branch Highway D r i v e r  Programming 3.3.1  k.  3 h  6  SYSTEM DESCRIPTION  3.2  2  15" Design of the NOVA/NIM Interrupt Unit Operation of the CALL Statement CALL 9 The Magnetic Tape Subroutine A B r i e f Data A c q u i s i t i o n Program i n BASIC FORTRAN Examples  16 17 19 23 25  iv  L i s t of Figures To follow page... Fig. 1  Beam Line Configuration  2  Fig. 2  Data Acquisition Hardware  2  Fig. 3  Lines Used During A CAMAC Cycle  7  Fig. U  CAMAC Command Bit Configuration  7  Fig. 5  Spark Chamber Readout  10  Fig. 6  Circuit Logic for The NOVA/NIM Interrupt Unit  15  V  Acknowledgment For much of the preliminary work on both software and hardware for the existing system, I wish to thank the Controls Group at TRIUMF, University of British Columbia.  I am also indebted to  Dr. Quentin Ingram, U . B . C , for his continued interest in further software developmentj  to Professor Garth Jones for the opportunity  to build and run the system on his experiment at the Lawrence Berkeley Laboratory, and in particular to my advisor, Dr. Richard Johnson, for continued help and encouragement during the course of my studies.  1, Introduction This paper describes the data acquisition system (DAS) developed for a 50 MeV Tl*d scattering experiment u t i l i z i n g a NOVA 1200 computer*  Section 2 describes the equipment used, and anticipates the  problems involved i n designing a DAS compatible with the hardware.  Section  3 describes the necessary system interfaces, and the software developed for the experiment.  The data acquisition program was i n i t i a l l y developed using  the BASIC interpreter.  This commonly known interactive language allowed the  experimenters involved to edit and expand the DAS easily.  When a f i n a l  configuration was reached for production running, a change to FORTRAN as the system language was initiated to speed up the data logging process. Generally applicable features of the DAS are described i n the main portion of the text;  detailed aspects specific to this experiment are discussed  in the appendices.  - 2 -  2»  Requirements of a Data Acquisition System and the CAMAC Concept 2.1  Scope of Current Experiment The purpose of the present experiment i s to measure do/dn  for elastic scattering of £0 MeV positive pions from deuterium over an angular range of 10 deg. to 170 deg. testing the predications of impulse approximation calculations.  This low energy range has not previously been  theoretically considered, and good data is scarce.  A beam of known intensity  strikes a liquid deuterium target and scattered particles are detected i n a stopping plastic s c i n t i l l a t o r .  F i g . 1 illustrates the beam line configuration,  and F i g . 2 the electronic equipment used.  The experiment embodies most  of the nuclear detection techniques used today.  The data acquisition  system is generally applicable to these techniques. 2.2  General Requirements of a Nuclear Data Acquisition System (DAS)  2.2.1  Requirements of theacurrent system are typical of most nuclear  scattering experiments: i) beam characteristics such as flux and energy must be monitored. The beam current is integrated or each incident particle is counted to obtain the estimate of flux.  A counter (scaler) is required to record the measurement.  A sample of the incident beam particles stopped i n a s c i n t i l l a t o r are analysed with an analogue to d i g i t a l converter (ADG).  The beam energy distribution  corresponds to the pulse height distribution obtained from the ADC. ii)  Scattered particles of experimental interest must be identified  by a fast logic coincidence network that defines an event. handled by fast nuclear electronics electronics is several nano seconds. this experiment.  (NIM equipment).  The basic speed of the  Figure 1 presents a logic diagram for  The event of interest is defined as EVENT =  This task is  G^C^if^  Figure 1  Beam Line Configuration The pion beam is produced by the primary proton beam of  the Berkeley 18U" cyclotron.  It is taken off at a backward angle of  59 deg. and focussed achromatically onto a liquid deuterium target. Knowledge of an incident particle's position on the target and which hodoscope element i t passed through is sufficient for momentum determination.  ,/•  TT+ p r o d u c t i o n target  12 e l e m e n t hodoscope  proton  beam M: bending  magnet  Q:  quadrupole  C:  plastic scintillator  S:  spark chamber  stopping counter  FIGURE 1  BEAM  LINE CONFIGURATION  Figure 2  D a t a A c q u i s i t i o n Hardware Enough i n s t r u m e n t a t i o n f o r the system e x i s t s t o  s e v e r a l NIM b i n s j  fill  o n l y t h e one powering the i n t e r r u p t u n i t i s diagrammed.  The BHD i s shown i n a CAMAC c r a t e . can f u n c t i o n w i t h j u s t  T h i s i s not n e c e s s a r y as the u n i t  a +6v power s u p p l y .  No b a c k p l a n e c o n n e c t i o n s  a r e needed u n l e s s more t h a n seven CAMAC c r a t e s are u s e d .  crate controller CAMAC  &  teletype  terminator  modules DGC  NOVA  1200  branch highway driver Ampex  NOVA/NIM interrupt unit  FIGURE  2  DATA  ACQUISITION  HARDWARE  TMZ tape  transport  - 3 -  The NOVA/NIM unit presents an interrupt to the computer when such an event has occurred. iii)  the scattered particles must be tagged with their trajectories,  their energy and momentum.  Particle trajectories are tagged by spark  locations i n several chambers i n the beam path, as well as an array of finger scintillator counters (hodoscope).  The energy is obtained from analogue  to d i g i t a l conversions of stopped particle scintillator pulse heights. Momentum is obtained through computation based on the trajectory or pulse height information. iv) Data associated with each event must be stored for later retrieval and analysis. v) Some display capability is required for diagnostic and monitoring purposes.  A teletype is standard equipment.  A CRT display is  convenient and i n this experiment is driven from two digital-to-analogue converters that are capable of driving an X-Y plotter. Use of small computers to aid data handling has resulted i n a variety of interfaces designed to allow on-line control of experimental equipment, and i t is for this purpose the CAMAC specification has been developed. This hardware standard allows experimenters to build a generally applicable DAS, requiring most specialized changes for specific experiments to be made i n the controlling software and not the hardware.  Thus, consideration of a  particular system illustrates a solution to a much wider problem. 2.2,2  CAMAC The CAMAC interface, called a BRANCH HIGHWAY DRIVER (BHD),  allows the computer to perform a l l the tasks outlined i n 2.2*1. communication with experimental equipment is achieved through . i t . equipment signals an event.  Two-way Fast NIM  The fast NIM event pulse is separately interfaced  - k -  to the NOVA as an interrupt (Sec. 3.2.1),  Sixteen CAMAC scalers i n the  spark chamber system are read, for each event, along with a pattern recogniaer for the hodoscope and an ADC for the stopping counter on the exit arm. presents a schematic sketch of this equipment.  Fig. 2  This is a l l the necessary  information for trajectory, energy and momentum analysis, and i s stored immediately on magnetic tape.  Since multiply-dimensioned arrays are possible  with the high level language used i n the DAS multiple data binning can be done with incoming data that is not possible with a conventional hardwired multichannel analyser.  Display of these i s accomplished with two CAMAC DAC's used  to drive X and Y traces on a storage oscilloscope;  data from core  is simply  read out to the units sequentially, so a continuous plot appears on the scope. Any two parameters from the data array can be used as coordinates.  On-line  calculations are undertaken for low event rates while the system waits between events.  For example, spark chamber raw data is converted to an  absolute geometric position and individual scattering angles are calculated. Sophisticated analysis depends only on available time and core. 2,2,3  Hardware Structure of CAMAC Detailed specifications for CAMAC are found i n references 1 aril 3  2.  A general description of CAMAC is available and a journal is devoted to U  its applications.  A brief presentation of the CAMAC structural hardware  is included here for completeness• Hardware necessary for a CAMAC system is indicated i n F i g . 2j up to seven CAMAC crates can be daisy chained to one BHD.  Each crate has 2k  stations for modules and the 2£th, or control station, for a crate controller type A (CCA) which interfaces modules i n the crate to the BHD.  Communication  between computer and BHD is effected with the standard i / O cable for the machine used.  - 5" -  To address a module, and cause i t to perform some function, one must specify to the BHD, the module's crate number C, station number N, sub address A within the module, and some allowed function code F denoting the operation that is required of that section of the module.  - 6 -  3.  System Description 3«1  The system was built from the idea of incorporating an easy to use,  flexible programming language with the CAMAC specification.  In particular,  high level languages that are familiar to most scientists were used.  Greater  u t i l i t y of the system follows from this standardization since both electronics and programming are specified.  The system speed i s limited by the CAMAC  cycle time and more importantly the program language speed • E L - J Operating system details also limit the DAS speed.  For example, computer cycle  time affects the speed with which the CAMAC system can handle incoming data and hence limits count rates.  The two distinct periods during an experiment,  debugging and f u l l scale data acquisition, have different program requirements. I n i t i a l l y , ease of program editing i s the most important considerationj speed of event handling replaces i t .  later,  Such a change has been met by using  two different programming languages, BASIC and FORTRAN. 3.2  System Hardware Interfacing Two system interfaces are required;  one, to translate a fast  NIM coincidence signal to a computer interrupt signifying an event, the other the standard CAMAC interface.  In principle, the standard CAMAC inter-  face having an interrupt feature i s capable of undertaking the event  5" interrupt task. 3.2.1  NOVA/NIM Interrupt Unit This unit, daisy-chained onto the NOVA I/O cable before the  BHD i s recognized by the computer as a separate peripheral.  The "event  definition" pulse (indicating a ^....Ccj coincidence has occurred) i s input to i t , and causes this device to request servicing (see Appendix A); the service routine initiates transfer of experimental data from CAMAC to the NOVA.  During the transfer, this unit outputs a NIM pulse, which can be used  to inhibit functioning of any NIM unit i n response to a new event.  - 7 -  This unit was designed as economically as possiblej  however,  use of the Look-At-Me (LAM) CAMAC feature provides an alternate way of signalling an event.  Either the external LAM point on a crate controller  or LAM point on a coincidence register can be used.  This approach is equally 6  acceptable, and has been used i n more complicated systems. 3.2.2  Branch Highway Driver The Master Branch Highway Driver is designed to interface a  NOVA computer to a CAMAC system.  It can drive up to 7 crates alone.  However, i t can drive three Slave BHD's which i n turn drive seven crates, thus bringing twenty-eight CAMAC crates under the control of the Master BHD. This is a non-standard CAMAC feature and necessitates a Branch Highway code in each command as well as the standard CNA. Loading the BHD In order to initiate a command to the CAMAC system the three sixteen-bit buffers labelled A,B,C of the BHD must be loaded from core as indicated i n F i g . k*  A command requires specification of a  three-bit crate number C (1 to 7)j a five-bit station number N (usually numbered 1 to 2k) corresponding to the addressed module's position i n the crate and a four-bit sub-address A to specify a device within a module (e.g. scaler 1 within a quad scaler).  A five-bit function code F is also  necessary to make the addressed unit perform some task, such as read or clear.  A four-bit branch code must be specified i f the Master/Slave  configuration is used;  however, for this purpose, just a master BHD is used  so the branch code is always 1110.  F i g . k also illustrates the position  of the twenty-four data bits which can be transferred either way. A CAMAC Cycle With the buffers loaded i n the above manner a start pulse from the computer w i l l initiate a CAMAC cycle.  F i g . 3 presents a  F i g . 3 Lines Used During A CAMAC Cycle i)  C,N,A,F lines are activated by BHD and the BTA timing reference pulse is generated,  ii)  the crate controller activates a single N Line and the A and F lines.  iii)  the addressed module puts i t s data on the read (R) lines and generates a Q response to indicate its successful completion of the operation.  iv)  the strobe pulse SI puts the data into the controller which then generates the BTB timing reference pulse to indicate proper operation.  v)  the BHD terminates BTA and the crate controller generates strobe S2 to clear the R lines,  vi)  the BTB pulse is removed, causing the BHD to clear the C,N,A,F lines and the cycle is complete. Receipt of the Q and BTB pulses is checked under program control  in each CAMAC cycle since lack of either indicates a program error or a hardware f a i l u r e .  B C N A BHD Branch 7  Highway  o  Dataway  Signals  Signals  5  B N lines  lines  (binary)  4 B A lines ( binary) 5 BF  lines  (binary)  o  1  —5 ft to  4 A  lines  5 F  lines  O o  BTA  —i  o  CO ZT  d e d i c aatteedd  N  liner 0)  CL  CL —I  (0  (fi  S1 S2  ro Q-  24 R ( r e a d only) l i n e s  > o  o  >  to"  24 < CD  Registers  B C R l i n e s (one p e r c r a t e ) 7 BTB  CD  Command  B R W lines (common read/write)  -<  24 W ( w r i t e only) l i n e s  3  ( l o w 16 data bits r e t u r n e d to NOVA b u f f e r C ; h i g h 8 t o B ) BQ  ( t o N O V A on receipt of allQs  FIGURE  3  LINES  USED  o  CL  Q from module then to B H D  DURING A  CAMAC  CYCLE  to"  Figure k  CAMAC Command Bit Configuration This illustrates the standard designation of the U8 bits  involved i n a CAMAC cycle and their positions when loaded into the command registers.  When a CAMAC sequence is built i n core, three  16-bit words can be used for each entry, with the same configuration as drawn.  (See 3*3.2.2).  !  1  B U F F E R  A  B  8 ^4 I  |  B U F F E R B  D  I  I  c c c  1 ^4  ^ 2 ^1  CAMAC  •  i  i  i  1  i  i  i  8  F  7  r  F  1  i  D  i  I  I  i  i_  i  1  1  r  1  1  1  I  I  I  COMMAND  11 D 1 0 D 9  D  J L  BIT  8  D  ?  D i  6  D I  CONFIGURATION  1  i  i  r  ^ 3 ^2D21  1  1  ^ 8 ^ 4 ^ 2 ^1  1  i  I  16D15DKD13D* I  FIGURE 4  I  B  6  i  C  I  2  0 0 0 Ej F 5 I  B U F F E R  B  !  5  D I  20D19  D  D  1 8  i  1  D  4  l  3  D  2  D  1  1 ?  description of the operation. function is performed.  Data is sent to or from CAMAC and some CAMAC  An error flag is returned indicating the success  or failure of the CAMAC cycle. 3.3 Programming 3.3.1 BASIC BASIC was chosen as the programming language to use during the system installation and commissioning phase of the experiment. is interactive.  BASIC  Programs can be halted, edited and restarted from a  teletype at anjr time during execution without otherwise affecting them. Since BASIC is an interpretive system storing the teletype code program lineby-line i t is slow.  Assembler language subroutines doing the CAMAC operations  were added to the BASIC system. DATAGEN BASIC.-:  This was done using the CALL feature of  The CALL command is interpreted as a jump-to-subroutine r  (JSR) command followed sequentiallyfaythe adresses i n core of each of the subroutine parameters classified as output (input) to (from) BASIC.  She  assembler routines are headed by a table in core specifying subroutine number, core entry point, and parameter l i s t .  CAMAC Subroutines  CALL 1, (C), (N), (A), (F), D, E executes a CAMAC read operation.  The user enters decimal numbers for C N A and F to read or read  and clear a module.  Data is returned as variable D.  A zero is returned i n  E for a successful CAMAC operation or a CAMAC error code is returned in E i f the operation is unsuccessful.  CALL 2 (C), (N), (I), (F), (D), E is used  analagously to write data into a module.  Either operation takes about  1G msec although only 30 usee of that is the actual CAMAC cycle. Single CAMAC read or write instructions are used to check the  • DATAGEN of CANADA, LTD.  Hull, Quebec.  Copywrite 1970.  - 9-  operation of modules.  However, even during commissioning the execution  times of single CAMAC instructions have proven to be excessive.  Sequences  of CAMAC instructions can be defined by CALL U711> J, I, C, N, A, F, D where J i s one of 5> allowable sequences and I i s one of 10 allowed sequence elements.  CNAFD bear the usual CAMAC significance.  CALL 3>  Z(J, 1), E  allows the execution of the CAMAC sequence J with the resulting data returned to row J of array Z.  A zero returned for E indicates a successful sequence  execution while other E values denote CAMAC response errors during the sequence execution.  The execution speed i s much shorter (about 1 msec per CAMAC  instruction) than single CAMAC instructions since an assembled program i s used when the sequence i s being executed.  The time difference between this  and the CAMAC cycle time i s due to data conversion to the BASIC floating point format. CALL k BASIC responds to only teletype interrupts. to allow program access when evert interrupts occur. parameters.  CALL h i s used  CALL it has no  It takes program comtrol from BASIC and puts the system into  a loop awaiting the arrival of an event interrupt from the NOVA/NIM unit. When an event interrupt occurs program control i s returned to BASIC and CAMAC sequence reads are then executed to gather data associated with that event. One additional feature i s associated with CALL U. acquisition may be stopped at a known point i n the program.  Data  The CALL k  loop checks front panel switches expecting to find only Switch Ik up.  If  the user puts i t down, a crate inhibit command i s sent to CAMAC suspending CAMAC operation until the switch i s again returned to an up position. CALL 9 A magnetic tape handler was incorporated into a separate  - 10 -  subroutine, Call 9.  It is used primarily to write raw data from the Z array  mentioned onto tape for later analysis, but is capable of any tape handling operation.  Free format for recorded data was used so analysis of the  tapes produced at a large computing center usually requires some specialized software to get data from the tapes.  Writing onto tape considerably  increases time to analyze an event.  From start up to completion a tape  write operation requires about 50 msec.  Consequently data from 12 events  are stored i n the computer before the data is logged as a single record on magnetic tape. event.  This reduces the net writing time to about 5 msec per  Appendix G contains a l i s t of magnetic tape options available  i n Call 9. 3«3«1«U  Physics Subroutines  In order to speed up event analysis, assembler subroutines (CALL 21 and CALL 22) were developed to interpret the hodoscope reading and the spark chamber data for each event.  The hodoscope reading is a  12 bit word, one bit for each of the s c i n t i l l a t o r fingers.  CALL 22 is  a bit-examining routine to see i f just one element, or possibly two adjacent elements fired.  Any other result is interpreted as an error.  Either multiple passage of particles through the hodoscope, or a failure of the equipment is possible. spark planes.  CALL 21 checks proper operation of a l l 8  Each plane has associated with i t two scalers;  after a  successful f i r i n g , a fiducial count should be held i n the second scaler. An intermediate count w i l l reside i n the f i r s t scaler, corresponding to the particles trajectory position i n the spark plane. is not met, an error message results.  If this condition  F i g . 5 illustrates the spark  chamber configuration and readout. The execution speed achieved by assembler coding these two program segments is considerable.  CALL 21 requires 130g instructions and  Figure 5*  Spark Chamber Readout The pulse trains are from a 20 MHz clock.  The fiducial  pulse separation for each spark chamber is characteristic of the wand. The spark chamber system is typically 8$ per cent efficient i n prolonged operation.  XI Y1 X2 Y2 X4 Y4 spark first  fiducial  plane  pulses  event p u l s e  second fiducial  •start both scalers stop f i r s t  scaler  stop second  FIGURE 5  SPARK  CHAMBER  READOUT  scaler*  - 11 -  is executed i n about 100 usees. 50 usees.  CALL 22 requires 53 o Q  executes i n about  Ten lines of BASIC are required for the BASIC equivalent of  CALL 22 for an execution time of 100 msec.  About 25 BASIC lines are  required for a CALL 21 BASIC equivalent for an execution time of 250 msec. The net speed increase is over three orders of magnitude. The most rapid data acquisition program used with the BASIC/CAMAC system to date accepts data from CAMAC with sequence reads, performs CALL 21 and CALL 22 operations and records the data on magnetic tape, requiring about 200 msec per event.  This is about the speed limit  on this form of BASIC/CAMAC data acquisition. Appendix C contains the BASIC/CAMAC subroutine operating instructions, and Appendix D, a simple BASIC data acquisition program. 3.3.2  FORTRAN Several advantages are gained by a system change to FORTRAN as the DAS language.  Primarily, the increase in speed of event  handling justifies the change.  FORTRAN-CAMAC sequence reads offer a  time saving of up to an order of magnitude  over BASIC-CAMAC sequence reads.  Since single precision (16 bit) integer format can be specified for a l l variables i n the main FORTRAN program, no time is used for conversion between fixed and floating formats.  This has the added advantage that  magnetic tapes written on with free-formatted binary integers are easy to read, so translation software necessary for data analysis is minimal. Assembler language subroutines are simple to incorporate, since the DATAGEN FORTRAN compiler accepts machine language instructions as part of a FORTRAN program.  Although FORTRAN is not interactive, this  feature is hardly missed after a system has reached its final configuration. The major drawback associated with FORTRAN is the sophisticated hardware necessary for quick compilation and execution.  To prepare a  - 12 -  program for execution requires the loading of the compiler i t s e l f , assembler to produce a relocatable binary tape from the compiled output, and the library routines to supply the assembled program with the necessary mathematical subroutines (trigonometric, logarithmic, etc.)  This represents  about itOK words worth of paper tape, which even with a high speed reader, is rather tedious to load. A disc is the best fast storage and retrieval system to use for FORTRAN programming with a NOVA, but is expensive.  Attempts to use the  tape unit as a f i l e storage system by means of DATAGEN's "MAGNETIC TAPE SIMPLE MONITOR" (SIMON) system have been disappointing since the tape unit simply has neither the speed nor the r e l i a b i l i t y of a disc.  Two changes to SIMON  to make i t more compatible with magnetic tape may allow a complete conversion to a FORTRAN system.  The f i r s t change is a rairainization of  the necessary writing done by the system, particularly at start-up.  The  fewer opportunities the system has to destroy i t s e l f by overwriting, the fewer system crashes there w i l l be.  The second change involves increasing  to U192 from 256 the number of words written per block when the system is storing a f i l e .  This reduces by a factor of 16 the number of times directory  access is made, thus ensuring less wear on the tape, and less chance of overwriting the directory accidently.  FORTRAN Subroutines  Subroutines written for CAMAC and tape unit handling are quite similar to their BASIC counterparts.  Thus, CALL CYCLE (C,N,A,F,D(l),$n) does  a single CAMAC operation, returning the low order sixteen bits i n D(2) and the high order eight bits to D ( 1 ) .  A hardware error causes return to  line n i n the main program. Similarly, a sequence operation is effected with CALL EXEC (X(l,l),N,$n).  X is a 3 x N integer array.  CNA is encoded into X ( l , l ) as  - 13 the I  command i n the Sequence.  F and the eight high order data bits are  in X ( 2 , I ) , and the sixteen low order bits are returned i n X(3»I)> just as in F i g . U's representation of the BHD buffers.  Provision for just one long  sequence of as many CAMAC operations as necessary is made;  N is the number  of commands i n the sequence. The routine to build a sequence performs the same function as BASIC'S CALL U711.  The hodoscope and magnetic tape routines are  unchanged, but spark chambers are handled just with a FORTRAN subroutine. A brief data acquisition system program i n FORTRAN which w i l l do the same analysis as the BASIC program in Appendix D takes no more than £0 msec per event, most of the time being required for the tape unit to write the data record.  The immediately obvious improvement to this is one which was  incorporated to the BASIC program as well;  that i s , multiple event logging.  Data for 20 events is accumulated i n a large array, then written onto tape so that the time required to record each event averages out to less than 2.5 msec.  An example of a FORTRAN sequence build is found i n Appendix E .  -lu-  ll*  Conclusion The approach adopted towards DAS development has been  reasonably successful.  A BASIC-CAMAC system certainly offers experimenters  a simple way i n which to reach a f i n a l configuration without much reprogramming necessary.  The system f a i l s to be satisfactory, however, when  events rates rase much above five per sec.  A change to FORTRAN is the  logical next step to preserve the f l e x i b i l i t y and ease of use offered by a high level language and increase the system speed to a point where the spark chambers w i l l limit the event rate to about twenty per sec.  Since the  FORTRAN data logging program described i n section 3.3*2 occupies only $ msec (200 per second), the FORTRAN DAS is not computer limited.  Additional  calculation can be done during the nuclear electronics dead time. It has been demonstrated that a CAMAC system with a high level controlling language does offer wide applicability once the i n i t i a l system has been established.  715 -  References  1)  "CAMAC": A Modular Instrumentation System, Description and Specification", EURATOM Report EUR UlOOe, Luxembourg, 1969.  2)  "CAMAC: Organisation of Multi-Crate Systems. Specification of the Branch Highway and CAMAC Crate Controller Type A - l " . EURATOM Report EUR U600e, Luxembourg, 1972.  3) IEEE Transactions on Nuclear Science NS-18.  2, (1971).  k)  CAMAC Bulletin, a journal of the ESONE Committee.  5)  "TRIUMF/CAMAC Branch Highway Driver", W.K.Lacey and D.P.Gurd, TRIUMF Report No. TRI-1-71-2, May 1971 (unpublished).  6) Dollard, Marquardt, Gurd, Johnson, "Proceedings of the 6th Annual Accelerator Conference", July, 1972. (to be published). 7) How to Use the Nova Computers, Massachusetts, April 1971.  Data General Corporation, Southboro,  Figure 6 Circuit Logic for the N O V A / N I M Interrupt Unit The event input, labelled EVENT, is a negative NIM pulse converted to a positive-going TTL pulse.  The CPU BUSY output is a  TTL level which is converted to a NIM level before being used outside the unit.  The unit has device code U-OQ •  STRT OCPU  BUSY RQENB  DE\M0 SEL  CLR  FIGURE  6  CIRCUIT  LOGIC F O R  THE  NOVA/NIM  INTERRUPT  UNIT  - 16 -  APPENDIX A Design of the NOVA/NIM Interrupt Unit Figure 6 illustrates the logic associated with the interrupt unit. It i s a simple device, designed to request a CPU interrupt when a NIM event pulse is input to i t . When the data acquisition program enters the CALL k subroutine a Start (STRT) pulse sets the BUST f l i p - f l o p (ff) and clears the DONE f f . An event NIM pulse i n then clears BUSY and sets DONE.  The leading edge  of the next Request Enable (RQENB) pulse from the CPU sets the Interrupt Request (INT REQ) f f .  The response of the interrupt service routine  within the assembler subroutines (recall BASIC ignores a l l but teletype interrupts) to this request is simply to clear the DONE ff , and transfer program control back to BASIC.  The next RQENB senses that DONE has been cleared,  and so clears INT REQ.  The BUSY f f is s t i l l clear and is not reset until  the next CALL U is executed;  the unit i s then ready to accept the next  event pulse. For the length of time that BUSY is clear, that i s , from receipt of event pulse to next execution of CALL U, a NIM signal is output from this unit to indicate that the computer is busy analysing an event.  The  signal is used to veto possible incoming events. A more detailed analysis of interface operation i n general w i l l be found i n reference 7 »  -.17  -  APPENDIX B Operation of the CALL Statement The CALL statement implemented t o BASIC has the general format CALL r,a,b,c,...,h where r i s the number of the assembler subroutine t o be executed, and a,b,c,....(maximum of 8) are e i t h e r input parameters passed from the BASIC program t o the assembler r o u t i n e , or output parameters, passed from the assembler routine t o BASIC.  The BASIC i n t e r p r e t e r occupies  the  f i r s t U K of core, and at address 10g resides the s t a r t i n g address of  the  assembler subroutines.  They are preceded by a three word t a b l e f o r  each, s p e c i f y i n g subroutine number, subroutine entry p o i n t , and a v a r i a b l e cont r o l word which c l a s s i f i e s parameters as e i t h e r input (coded IO2) o r output (coded l l g ) .  (Hence the e i g h t v a r i a b l e r e s t r i c t i o n - 2 b i t s f o r each i n  a 16 b i t word.) Input parameters are i n BASIC'S f l o a t i n g point format, and must be encoded as b i n a r y integers before being used i n the assembler r o u t i n e s . Output parameters are b i n a r y i n t e g e r s , which must be encoded as BASIC f l o a t i n g point numbers when passed back t o BASIC.  These processes are accomplished  w i t h the FIX and FLOAT routines w i t h i n the BASIC I n t e r p r e t e r and probably require of the order of 100 usee each.  (Use of FORTRAN'S i n t e g e r format  f o r data handling w i l l negate the need f o r such wasteful b i t s h u f f l i n g . ) Preceding these t a b l e s i s the address of the i n t e r r u p t s e r v i c i n g routine which handles CAMAC, magnetic tape, i n t e r f a c e and NOVA/NIM u n i t interrupts.  This device s e r v i c e routine c a p a b i l i t y e x i s t s i n a d d i t i o n  to BASIC'S own t e l e t y p e s e r v i c i n g r o u t i n e .  An attempt t o incorporate both  together would require reasonably major e d i t i n g t o the BASIC i n t e r p r e t e r , which i s uneconomical when system requirements are i n a s t a t e o f f l u x .  - 18 -  When the statement CALL r , a , b , c , . » # is executed, the following sequence "appears" to the assembler package: JUMP TO SUBROUTINE (JSR) r ADDRESS of a ADDRESS of b ADDRESS of c *• •  ADDRESS OF LAST PARAMETER RETURN TO BASIC HERE . When the JSR instruction is executed, its location i n core is stored i n an accumulator, so the method of access to the parameters and to the return address is obvious.  - 1 9 -  APPENDIX C CALL 9 The Magnetic Tape Subroutine Interfaces for NOVA-compatible magnetic tape units such as the AMPEX Type TMZ transport are three buffer devices.  The A buffer can  hold one of seven possible tape command codes F : 0 (Read), 1 (Rewind), 3 (Space Forward), k (Space Reverse), $ (Write), 6 (Write End of F i l e ) , 7 (Erase).  Buffer B contains ant address A which is the start of a block  in core, and buffer C contains a word count, N. For a Read or Write command, the user must specify both an N and an A as well as F .  If the command is Write, the unit w i l l write on  tape N 16 bit words from core, beginning at location A.  If the command  is Read, the unit w i l l read a record off tape, and deposit N words from i t onto core beginning at location A. For Space Forward or Reverse commands, the tape w i l l advance over or rewind over N records, positioning i t s e l f at the start of a new record when complete. Subroutine Call 9, N,F,A,E,X is capable of a l l six possible tape functions.  F is simply the function code, as described.  X is a flag  (either 0 or 1) to indicate whether the tape unit is going to read or write BASIC variables (32 bits) or an area of core (16 bit words).  In  the former case, A is interpreted as the beginning address of a BASIC array such as Z (0,0), and N is doubled to take into account the double word length of the parameters.  In the latter case, A is interpreted as an  absolute address i n core.  Thus, for example, the statement CALL 9,  5"0, 1, Z(0,0), E , 1 would write 5*0 BASIC variables (100 16 bit words) onto tape, beginning with Z(0,0) and ending with Z(li,£)»  - 20 -  E is a hardware error flag returned to BASIC from the subroutine. Any non-zero return indicates a fault i n a particular record (parity or bad tape) or i n the system i t s e l f . Any time data acquisition is halted, the user can inspect the data for any particular event by reversing over sufficient records and reading the desired record back into core.  A simple way to organize data on  tape is to write one record for each event, tagging i t with the run number, and separating runs with end of f i l e (EOF) marks.  - 21 -  CALL 21 The Spark Chamber Subroutine After a sequence data read of the sixteen scalers associated with the eight spark planes, the counts from each scaler reside in absolute locations i n core.  The statement CALL 21,W3,F,1,L,U,WU w i l l  test that the count contained i n the f i r s t scaler (event pulse on Fig.5) on the f i r s t spark plane (XI) is non-zero, and less than the fiducial count F for that wand.  The count from the second scaler (second fiducial  on F i g . 5) must l i e within five of F to be accepted as the fiducial count. If i t is less, two event pulses presumed to have occurred. the scaler is assumed to have overrun.  If greater,  Each of these possibilities has  a code number; the outcome of each test is returned in variable W3. A further restriction on the event pulse can be made. The user can test that i t lay within lower and upper bounds L and U. Variable Wii is returned as 1 i f this test is passed, and 0 i f f a i l e d . Any number of spark planes can be tested in this way with CALL 21; the essential operation of the spark chamber test i n Appendix D's program should be clear.  - 22 -  CALL 22  The Hodoscope Subroutine  Immediately after an event, the hodoscope pattern recognizer has bits set corresponding to the elements of the hodoscope which f i r e d . The statement CALL 22,H,I,E causes the data word stored as BASIC variable H to be examined for set b i t s .  A valid event is characterized by a single  bit or two adjacent bits being set.  I is a variable returned from the  routine indicating which bit or bits were high. indicates the tenth hodoscope element firedj and eleventh fired). for these cases,  (For example, 1=20  1=21 indicates both tenth  E , the hodoscope quality flag is returned as 0 or 1  respectively.  Possible errors are hardware malfunctions, i n which case 1=0, or multiple passage of particles through the channel, resulting i n several bits being set.  In that case I is returned as 1.  cause an E return of 2.  A practical example of the use of this  subroutine is found in Appendix D.  Both errors  APPENDIX D  A Brief Data Acquisition Program i n BASIC As a specific example of a data acquisition program i n BASIC, the following one i s included, with a brief description of i t s operation: 1000 CALL h 1020 LET Z(0,10) = Z(0,10)+l 10U0 CALL 3,1,Z(1,1),E1 10la CALL 3,2,Z(2,1),E2 10U2 CALL 3,3,Z(3,l),EO 10U3 CALL 3,U,Z(U,1),E3 1060 CALL 9,50,1,Z(0,9),W1,1 1100 CALL 22,Z(2,10),H1,WU 1101 LET H(H1) = H(H1)+1 1102 IF WU< 2 GOTO 1120 1103 LET E(8) = E(8)+l 110U GOTO 1000 1120 LET ¥ 1 = 0 1121 FOR I = 0 TO 7 1123 CALL 21,W3,F(l),I+l,L(l),U(l),Wli 12.2k IF WJi > 0 GOTO 1128 1125 LET S(I,¥3) = S(I,W3)+1 1127 LET ¥ 1 = 1 1128 NEXT I 1129 LET F8 = F8+¥l 1130 IF ¥1 * 1 GOTO 1000 1LU0 LET S2 - Z(2,8)/25+25 Ilia IF S2 >0 GOTO llii3 11U2 LET S2 = 0 131*3 IF S2 < 100 GOTO 11U5 llhk LET S2 - 100 11U5 LET Q(0,S2) =• Q(0,S2)+1 1150 GOTO 1000 Line 1000 i s the CALL k execute, which sets the system i n a condition to accept an event. Control i s returned to BASIC when the event interrupt occurs, and the next four lines (lOlil to 10U3) are four CAMAC sequence reads of ten commands each.  These read i n a l l necessary data associated with a single  event, and store i t i n 5 x 10 array Z.  Line 1060 i s the write on tape  instruction, writing out the useful segment of the Z array.  - afc-  Lines 1100 to 1103 do the hodoscope check with CALL 22 j  errors  are binned i n E(8) and analysis is aborted; or, i f the hodoscope functioned properly, proceeds to the Spark Chamber test, CALL 2 1 .  Lines 1121 to 1128  check that a l l eight positional sparks were non-zero, f e l l within their respective fiducial limits, limits L(I) and U(I)* return to line 1000.  F ( l ) , and within any assigned lower or upper  Any error causes a halt to further analysis and a Otherwise, the ADC reading from the stopping counter  on the scattering arm is binned (lines lliiO to llk$)• normal return to line 1000, to await the next event.  Line 1150 is the  - 25 -  APPENDIX E An example of a ten element CAMAC sequence build using DGC FORTRAN is included to demonstrate the use of some of the FORTRAN subroutines.  20  INTEGER D( 2) INTEGER X(3,10) DO 20 1-1,10 ACCEPT C,N,A,F,D,(1),D(2) CALL SEQNC (X(1,I),C,N,A,F,D(1))  Each time the program encountered the ACCEPT statement, i t would pause while the user entered C,N,A,F and data necessary for any write commands.  Data can be up to 2k bits with the low order 16 bits i n D(2) and  the high order 8 bits i n D ( l ) . The core image of this sequence is the array X(3>10), each column of which has the configuration of F i g . U. 1st element  2nd element  (X(1,1))=CNA (X(2,1))=F plus Dg (X(3,l))=D l6  . . .  ...  10th element (X(1,10))=CNA (X(2,10))=F plus (X(3,10))-D l6  The following segment would await the arrival of an event pulse ( i . e . an interrupt from device kO) and then execute the entire sequence. UO U5 50  CALL WAIT (DEV) IF (DEV.EQ.lio) GOTO 50 TYPE "ERROR" PAUSE CALL EXEC (X(1,1),10,$U5) GOTO kO  After the sequence execution, data from the Ith entry would reside in X(2,I) and X(3»l)  (high and low order respectively).  error would cause transfer to line U5»  BTB or Q response  


Citation Scheme:


Citations by CSL (citeproc-js)

Usage Statistics



Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            async >
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:


Related Items