EDOC201

EUROGAM PROJECT

NSF DATA ACQUISITION SYSTEM Rate Monitor technical manual

Edition 2.4 August 1994

Nuclear Structure Software Support Group Liverpool University

1 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 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.

2 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 /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 card number is for later reference by the user interface.

Here is a listing of the setup for phase 2:

# *************************************************
#
#   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

3 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 widget language.

3.1 VME SERVER

This code consists of three main components

• Load the configuration file and initialise the scaler cards.

• Provide ERS interface to allow control and readout of the system.

• Interrupt routine to handle the counting process and update counts.

The Rate Monitor does not run any VxWorks tasks. To initialise the Rate Monitor, the routine rtStart is called from the VxWorks startup script as follows:

rtStart("/eg/config/eghv/rtconfig.d");

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.

3.2 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 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 start, stop and update. The USER interface can only be started if the rtStart routine in the server has succeeded. See above.

4 SOFTWARE MAINTENANCE

The server code resides in the directory /eurogam/rateMonitor on the nsa SUN in Liverpool. Copies of the system are kept at nnsa at Daresbury and at orchidee in Strasbourg.

Before typing make to generate the code, source file file make env to set the pertinent environment variables. The output goes to the file rate-Monitor.o. The object files vxShare.o, message.o and register-server.o must also be loaded before the Rate Monitor can run.

5 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.

Jomar Hønsi Liverpool, 10th of January 1995

E-mail: jh@ns.ph.liv.ac.uk Telephone: int + 51 794 3398