\documentstyle[11pt,a4]{article} \begin{document} \begin{titlepage} { \hoffset=1truein \hsize=5.25truein \vsize=10.25truein \font\small=cmssbx10 at 14.4truept \font\medium=cmssbx10 at 17.28truept \font\large=cmssbx10 at 20.74truept \hrule height 0pt \parindent=0pt %\parskip=0pt \hskip 3.9truein \large EDOC201\par \vskip .5truein \large EUROGAM PROJECT\par \vskip 1.5truein \hrule height 2pt \vskip 20pt \large NSF DATA ACQUISITION SYSTEM\par \vskip .5truein Rate Monitor technical manual\par \vskip 20pt \hrule height 2pt \vskip 1truein \medium Edition 2.4\par \vskip 5pt August 1994\par \vfill \medium Nuclear Structure Software Support Group\par \vskip 5pt Liverpool University\par \vskip .5truein } \end{titlepage} \setlength{\parskip}{1ex} \setlength{\parindent}{0em} \section{Introduction} This document describes the software in the Eurogam phase 2 Rate Monitor system. The Rate Monitor resides in a VME crate and consists of a MVME147 CPU board with ethernet interface and up to 8 VME scaler cards. For Eurogam phase II, 7 scaler cards are used. Each card has 32 channels available for rate counting. This document reflects {\bf software version 2.4}. The Rate Monitor has no console input or output, its user interface is on a SUN workstation and is integrated into eg-session, the general Eurogam user interface. As the rest of Eurogam, it uses the register server (ERS) to communicate with the VME system. A SUN server is also required for booting VxWorks and starting the Rate Monitor. Currently the VME crate is shared with the High Voltage server. \section{SETUP} The input for the Rate Monitor is via P2 on the VME scaler cards. The scaler cards are connected to EUROGAM Germanium and Clover cards via ribbon cables. One 64 way ribbon cable connects to one scaler card. The configuration of the Rate Monitor file {\bf /eg/config/eghv/rtconfig.d} This files contains a list of all the scaler cards in the crate, giving card number, VME address, Interrupt vector number and cable information. The {\bf card number} is for later reference by the user interface. Here is a listing of the setup for phase 2: \newpage \begin{verbatim} # ************************************************* # # File: rtconfig.d # # SCALER CARD LIST FOR EUROGAM RATE MONITOR # # The ADDRESSES and Vector numbers MUST be set # with gaps 40 and 8 (HEX) respectively. # # Cable : if inverted order set the number of # channels on each GE/CLOVER card plug. # Zero if not inverted # ************************************************* # DEC HEX HEX DEC # Slot Address Vectorno Cable # ===== ====== ======== ===== 4 aa0000 c0 6 5 aa0040 c8 6 6 aa0080 d0 0 7 aa00c0 d8 0 8 aa0100 e0 0 9 aa0140 e8 0 10 aa0180 f0 0 \end{verbatim} \section{SOFTWARE DESCRIPTION} The Rate Monitor code for runs under VxWorks 5.1, and is developed in a SUN/ VxWorks/GNU environment. It is programmed in C and assembly. The assembly code was migrated from PDOS, only the register server part and the SUN user interface are new for Eurogam. The user interface is written in TCL and Eurogam {\bf widget language}. \subsection{VME SERVER} This code consists of three main components \begin{itemize} \item Load the configuration file and initialise the scaler cards. \item Provide ERS interface to allow control and readout of the system. \item Interrupt routine to handle the counting process and update counts. \end{itemize} The Rate Monitor does not run any VxWorks tasks. To initialise the Rate Monitor, the routine {\bf rtStart} is called from the VxWorks startup script as follows: \begin{verbatim} rtStart("/eg/config/eghv/rtconfig.d"); \end{verbatim} This routine reads the configuration file and does a few checks on syntax etc. Then it checks if the scaler cards are present, and also if the addresses and vector numbers are contiguous. If any of these checks fail, the system status will be set to ERROR and an error messages made available for readout over the network. Messsages are sent to the Eurogam message logger. If the configuration is OK, all cards will be initialised and the Eurogam registers created. The registers are for control, status, crate layout and error message. There is one Eurogam register defined for each counter channel. \subsection{USER INTERFACE} This is written in TCL and forms part of the standard Eurogam user interface. It uses the Eurogam Register Server (ERS) to control the VME server, and read out data. The rates are display in one column for each scaler card. A file {\bf eg/rateMonitor/work/rtnames} contains a mapping from scaler channel number to a name. On the display these names are displayed instead of channel numbers. Any channels NOT defined in the "rtnames" file will be displayed as "spare". The display has buttons for {\bf start}, {\bf stop} and {\bf update}. The USER interface can only be started if the {\em rtStart} routine in the server has succeeded. See above. \section{SOFTWARE MAINTENANCE} The server code resides in the directory /eurogam/rateMonitor on the {\em nsa} SUN in Liverpool. Copies of the system are kept at {\em nnsa} at Daresbury and at {\em orchidee} in Strasbourg. Before typing {\em make} to generate the code, source file file {\em make\_env} to set the pertinent environment variables. The output goes to the file {\em rateMonitor.o}. The object files {\em vxShare.o}, {\em message.o} and {\em register-server.o} must also be loaded before the Rate Monitor can run. \section{SCALER CARD CONFIGURATION} The cards must be placed after another in the VME crate, otherwise the interrupt handling will not work. It is also crucial that they have contiguous addresses and interrupt vector numbers (ascending order, left to right). Each card has an address space of 64 (40 hex), and has 8 interrupt vectors, one for each AM9513 timer on the card. So an address gap of Hex 40 and vector gap of 8 follows. See configuration file example above. The cards must be configured to give interrupts on level 2, as the driver software assumes this. This is done with two sets of jumpers, both of which must be set to 2 (two). The scaler cards also has jumper fields for base address, vector number and address modifiers. \newpage \font\medium=cmssbx10 at 17.28truept \font\large=cmssbx10 at 20.74truept \large \vskip 1.5truein Jomar H{\o}nsi \vskip 0.5truein Liverpool, 10th of January 1995 \vskip 2.5truein E-mail: jh@ns.ph.liv.ac.uk \vskip 0.5truein Telephone: int + 51 794 3398 \end{document}