Slow Control for GEn Detectors

This page describes the slow controls for BigBite and Neutron Arm detectors, for GEn experiment.

High Voltage System

  1. Overview
  2. Starting High Voltage System
  3. Save/Load HV Settings
  4. HV Maps
  5. Scripts to read/adjust HV
  6. Troubleshooting

Crates Resetting

  1. Overview
  2. Resetting from GUI
  3. Resetting from Terminal

Discriminators Threshold Setting

  1. Overview
  2. Setting the thresholds

Port Server

  1. Overview

Electronics and Crates

  1. Overview

High Voltage System

1. Overview

The High Voltage System Program (HVS) is used for controlling and monitoring the high voltage mainframes, of the type LeCroy-1458, over Ethernet network using TCP/IP protocol (if an Ethernet interface is installed in the mainframe) or telnet protocol (if a portserver is connected to the mainframe's serial interface, which is usually the case). This program has a GUI (Main Window) to control and setup various mainframes' parameters by the user. It also runs a server to process external control requests. So, the user can do monitoring and updating of the mainframe parameters by using either the GUI window or the remote interface.
The program is located on adaql?, account adev (home directory /adaqfs/home/adev), in the following subdirectory:

       HV_BB/      - BigBite HV files  
       HV_NA/      - Neutron Arm HV files   
       hvg/             - Java code and the server code  
       reset/           - tools to reset the crates  
       scripts/        - various scripts (HV adjustments, external monitoring etc.)  
Let us consider the BigBite detector. The subdirectory HV_BB contains the configuration files, the HV settings etc:
    HVframes.conf    - contains the list of mainframes used for this detector  
    HVmaps.conf       - contains references to geometrical maps of the detector
    hv_log/                  -  log files 
    hv_maps/              -  files with the geometrical maps of the detector 
    hv_set/                  -  files with the detector HV (and other) settings 
More detailed help on HVS program is here.

2. Starting the High Voltage System

To start the program, type in terminal windows :
    slogin adaql5 -l adev        - login to one of adaq machines
    hvs HV_BB                        - start the task for BigBite

    slogin adaql6 -l adev        - login to one of adaq machines
    hvs HV_NA                        - start the task for Neutron Arm  
The hvs call parameter defines the subdirectory of ~adev/slowc, which contains the configuration and the settings files for the detector. The script hvs checks whether a task for the detector is already running. A running task would leave a lockfile, say ~/slowc/HV_BB/.lock_hvs_HV_BB, which contains the host name, where the task is running, and the PID. If such a PID is indeed active, the script hvs asks the user whether to kill the old task and start a new one, or to quit.

After the mainframes have been identified, a GUI window appears with a menu and an initialization bar. The mainframes (crates) are defined by their access points through portservers, as genps1:2001. A mainframe (say, genps1:2001 for example) or several of them may fail to connect because the portserver has not released the line to this mainframe. One may check this by:

    telnet genps1 2001   - try to connect (use the proper numbers)
                                                   -  if it fails, do:  
    telnet genps1        - enter as root (see ~adaq/doc/portserver.doc)
    who                  - check the connection
    kill 1               - kill the connection to port 1 (2001) or whatever port is needed
    quit                 - leave the connection to the portserver
After that, try to restart hvs.

If initialization of all high voltage mainframes (in 1-2min) is completed successfully, a tabbed panels with names of all connected mainframes will appear in the window: HVS main control window One may select a mainframe using the upper tabbed panel, then a module (slot) using the next tabbed panel. The values of the module properties are presented as a table in the selected module tab. Those shown in blue color can be changed by the user. Additionally, one may turn on/off the selected crate, using the buttons at the left side of the panel. Also, one may turn on/off groups of channels (all of them, or the selected crate, or the selected module) using the meny Edit>Enable Channels and Disable Channels

3. Save/Load Settings

The hv_set directory contains the files with the HV and other settings. It is recommended to use the .set extention for the file names, and use a consistent numbering. A file can be saved using the File menu:
    Save Voltage Set       - Store only the demanded HV values  
    Save All Settings       - Store all the appropriate values  
One can select the file name from a pop-up menu (see an example for the Neutron Arm), HVS file loading

edit or type in a new file name and hit Save.

Loading a file with settings is similar, by using the File ->Load Settings menu. The time to update the mainframes depends on the number of channels to change.

4. HV Maps

The HVS program allows to view the high voltage channels in the detector coordinates (map). There are map files that keep the correspondences between high voltage channel address (name) and the geometrical location (coordinates) of this channel in the detector. All the map files are stored in the directory hv_maps. Each file used has a map name, defined in the file HVmaps.conf. To view the high voltage map of the detector one can select from menu Map the item with the map name specified. The following map names are in use:
    BB_SH        - BigBite shower detector  
    BB_PS_L    - BigBite preshower detector, Left  
    BB_PS_R    - BigBite preshower detector, Right  
    BB_SC_L    - BigBite scintillator detector, Left  
    BB_SC_R    - BigBite scintillator detector, Right  
    BB_DC        - BigBite Drift Chambers  
    NA_ND_L    - Neutron Arm neutron detector, Left  
    NA_ND_R    - Neutron Arm neutron detector, Right  
    NA_VT_L    - Neutron Arm veto detector, Left  
    NA_VT_R    - Neutron Arm veto detector, Right  
    NA_PO      - 4 positioning (vertical) counters   
After selecting a map from the Map menu a map window with the geometrical locations of the high voltage channels for this map pops-up (see the left picture):

HV map BB shHV map BB sh MV

A green ball indicates than the channel is ON. Using the Map menu one can display various parameters, for example the measured voltage (see the right picture). To find out what channel in the main program window corresponds to the channel in the map window one can double click on the channel in the map window. A window with the selected channel information pops up.

HV map BB sh chan

Additionally, in the main window the corresponding crate and module are selected, and the channel is highlighted. To close window with channel information press "OK" button.

5. Scripts to Read/Adjust HV

The base HMS program contains a server. One can send a local or a remote command to this server, containing commands to read/set HV parameters. The client program hvcli is located in the same directory hvg, as the HVS code. One can use scripts which allow to make basic operations in a simple way. It can run on adaql? computers (or anywhere else where the client program is installed). Let us assume that one wants to change the voltage on BB Shower, channels ix=3,iy=5 and ix=5,iy=21, that the signals would change by factors 1.2 and 0.85. One writes a file (let us name it adj.dat) containing:
   3  5 1.2 
   5 21 0.85 
and type BB_SH adj.dat
The first parameter is the map name (see the existing names). To print the maps names: -D NA -c MAPS  - for Neutron Arm -D BB -c MAPS  - for BigBite  
To print the measured voltages on a detector sub-matrix x: 1-7, y: 1-27: -D NA_ND_L -m 1:7,1:27 -c GET -P MC  
If no -m parameter is specified the full matrix will be printed.

Typing ?  
explains the parameters.

6. Troubleshooting

When the progrem starts, it tries to connect to the crates listed. If some can not be connected, the program reports it and happily continues with fewer crates. One should see how many are really attached (should be 2 for BB and 4 for NA). Fixing the problems is explained here.

One of the most common problems occurring when the beam is on, is tripping of a crate, presumably because of radiation. The crate typically loses connection and sometimes also turns HV off. A flashing alarm panel appears on the screen along with a sound alarm (a "harp" sound). Again, typically, connection is automatically re-established in a minute or so, and the program starts to read the values from the crate again. One should click on the alarm panel. Next, one should look what is printed at the bottom of the main GUI panel. Here is an example: HV error The program reported that it reopened connection to crate 1, but that it found the HV off - and not from GUI operations. Also, the last slot shows 0 voltages and currents. One should try to turn HV on (clicking on ON button at the left). If the voltage starts rising (it actually starts with the 1-st slot), most likely no other intervention is needed. Sometimes it happens that the GUI reports HV off, but shows non-zero measured voltages, probably stale ones, in the slots. Then, it is better to restart the GUI.


Crates Resetting

1. Overview

There are two different types of crate resets. The most powerful one is to cycle the crate power. All the VME crates and the slow control crate genslo1 are connected to this system, described here. The second type of resets is explained in this document.

Resetting of sevreral GeN crates is performed by using a 64 channels relay board VMIVME2210 installed in a VME crate with a hostname genslo1. There is a reset patch panel with output connectors labeled from 0 to 16 installed above this crate in the RR7 rack. The connector number corresponds to the relay board channel number, which has normal-open-contacts.

The reset inputs of the crates are connected to the patch panel. A high voltage or a VME crate is reset when the corresponding relay closes  its contacts. For FASTBUS crates there are special output connectors on the patch panel labeled as <>#15 and #16 providing the NIM level of output signals on them for reseting. Table 1 shows the mapping between the crate name and relay board channel number:

Table 1 . Crates Resetting.
Mapping of the crates' names to the relay channel number
Since several crates are hooked up to a more powerful reset by power cycling, they are removed from the reset discussed.
Description Crate Name Reset channel number connected?
Neutron Arm (NA)  
NA High Voltage Crate hv1
NA High Voltage Crate hv2 genps1:2002
NA High Voltage Crate hv3 hatsv22:2002
NA High Voltage Crate hv4 genps1:2004
NA VME Crate
NA Fastbus Crate
NA High Voltage Crate Spare genps1:2003

BigBite Arm (BB)

BB High Voltage Crate hv5
BB High Voltage Crate hv6 genps2:2002
BB Fastbus Crate bbsfi1 15
BB Fastbus Crate bbsfi2 13
BB Fastbus Crate bbsfi3 14
reserved reserved 0


2. Resetting from GUI

In order to reset a crate from GUI one should use a terninal window on adev@adaql? to type:

After a few seconds a GUI pops up. One can run several reset GUIs at the same time. GeN-reset

The GUI window has three groups of the buttons, marked with the crate names. In order to reset a crate one should click on corresponded button and confirm this operation in the next window. Resetting takes 2-3sec.

The configuration data for GUI buttons and channel numbers are stored in a text file ~/slopc/reset/dat/, defined in the gen-reset (rbs) script.

The format of this file is clearly seen from the example considered:

[Neutron Arm Crates]
VME_CPU (genvme1)  5
FASTBUS_CPU (gensfi1)  16 
[BigBite Crates]
FASTBUS_CPU (bbsfi1)  15 
FASTBUS_CPU (bbsfi2)  13 
FASTBUS_CPU (bbsfi3)  14 
[High Voltage Crates]
NA_HV_Frame hv01 (genps1:2001)  1
NA_HV_Frame hv02 (genps1:2002)  2
NA_HV_Frame hv03 (hatsv22:2002)  3
NA_HV_Frame hv04 (genps1:2004)  4
BB_HV_Frame hv05 (genps2:2001)  6
BB_HV_Frame hv06 (genps2:2002)  7

3. Resetting from a terminal

In order to reset a crate from command line one should use a terninal window on adev@adaql? to type:

    gen-clreset crate_name  
The crate names are defined in a file ~/slopc/reset/dat/
genps1:2001  1
genps1:2002  2
hatsv22:2002  3
genps1:2004  4
genvme1      5
gensfi1      16
gensfi2      13
gensfi3      14
genps2:2001  6
genps2:2002  7
bbsfi1       15


    gen-clreset  genvme1           - reset the NA VME crate  
    gen-clreset  genslo1:2001    - reset the 1-st HV crate for NA  

Discriminators Threshold Setting

1. Overview

Discriminator thresholds are set by using a 8-channel 12-bits DAC of a type BiRa 5408, installed in the slot #20 of a CAMAC crate. The CAMAC crate has (#1) is connected to the VME CPU, hostname genslo1.

The DAC accepts input values in a range of 0 - 4095 and generates the output voltage in a range of -10V - +10V (0 V for 2048 input). The resolution of the DAC is 5mV. The way to read/write into the DAC is to use a command cnaf from CODA. The output of the DAC is attenuated by a factor of 10 and combined with an external offset of -5 - -10 mV and distributed to:
# channel # detector
0 Neutron Detector sums
1 BigBite preshower
2 BigBite shower

2. Reading the threshold

In order to read the threshold voltage one should use a terninal window on adev@adaql? to type:

    gen-threshold  get 0  -  - For Neutron Detector  
There is a hardware offset of about -10 mV to be added to the value read.

3. Setting the threshold

In order to set a threshold voltage to -50 mV one should use a terninal window on adev@adaql? to type:

    gen-threshold set  0  -50  -  - For Neutron Detector  
    gen-threshold set  1  -50  -  - For BigBite  
Because of a hardware offset, the real threshold will be about -60 mV.

Port Server

1. Overview

The port servers type of DIGI-TS8 is used to make connections to the serial line interfaces of the high voltage mainframes and VME crates, over ethernet network. The port server has eight serial ports with numbers 1-8. For network connections, these ports are numbered as 2001-2008. There are two PortServers used, with hostnames:
    genps1       - Neutron Arm  
    genps2       - Big Bite  
Table 2. The serial line connections to the Port Servers
Device Name/Hostname
Telnet connection to
Neutron Arm  genps1

High Voltage Frame hv1
genps1 2001
High Voltage Frame hv2
genps1 2002
High Voltage Frame Spare
genps1 2003
High Voltage Frame hv4
genps1 2004
Slow Control VME Crate (2700) genslo1
genps1 2005
VME Crate (TDC) (5100) genvme1
genps1 2006
Fastbus Crate (ADC) (5100) gensfi1
genps1 2007
configured for terminal
genps1 2008
Neutron arm  hatsv22

configured for terminal
hatsv22 2001
High Voltage Frame hv3
hatsv22 2002
BigBite Arm  genps2

High Voltage Frame hv5
genps2 2001
High Voltage Frame hv6
genps2 2002
FASTBUS Crate for DC  bbsfi3
genps2 2003
FASTBUS Crate for DC  bbsfi4
genps2 2004
VME Crate TriggerSupervisor/Scalers (5100) bbts1
genps2 2005
Fastbus Crate (ADCs) (2306) bbsfi1
genps2 2006
VME Crate (ADCs/TDCs) (5100) bbvme1
genps2 2007
configured for terminal genps2 2008

The DAQ portserver map is also documented here.

To make telnet connection to the selected crate one can type

    telnet genps1 2002   - connect to HV crate #2 of Neutron Arm
                                                   -  if it fails, do:  
    telnet genps1             - enter as root (see ~adaq/doc/portserver.doc)
    who                             - check the connections
    kill tty=2                      - kill the connection to port 2 (2002) or whatever port is needed
    quit                              - leave the connection to the portserver


Electronics and Crates

1. Overview

The system includes a VME crate with a CPU Motorola MVME2700 - MPC 750. The net name is genslo1. The boot parameters are:
     IP:               - genslo1
     IP host:       - adaql1
     boot file:              /adaql1:/adaqfs/home/adev/vxworks/vx2700-128MB
     host user:            adev
     script to load:      /adaqfs/home/adev/vxworks/genslo1.boot


E-Mail :
Last updated: 07 Mar 2006