HV CALO

From Hall A Wiki
Revision as of 08:39, 31 August 2010 by Jroche (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Back to DVCS

Slow Control for the DVCS Calorimeter

The following paragraphs describe the slow controls for the electromagnetic calorimeter, specific to the DVCS 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


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 adaqh1, account dvcs (home directory /adaqh1/home/dvcs), in the following subdirectory:

  slowc/
      HV_DVCS/         - calorimeter HV files     
      hvg/           - Java code and the server code  
      reset/         - tools to reset the crates  
      scripts/       - various scripts (HV adjustments, external monitoring etc.)  
 

For the calorimeter 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_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 :

ssh dvcs@adaqh1

   ssh dvcs@adaqh1              - login to one of adaq machines
   cd slowc/hvg
   ./hvs ~/slowc/HV_DVCS        - start the task for the Calorimeter

The hvs call parameter defines the subdirectory of ~dvcs/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_DVCS/.lock_hvs_HV_DVCS, 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 dvcstlab1:2004. A mainframe (say, dvcstlab1:2004 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 dvcstlab1 2004   - try to connect (use the proper numbers)
                           -  if it fails, do:  
   telnet dvcstlab1        - enter as root (see ~adaq/doc/portserver.doc)
   who                     - check the connection
   kill 1                  - kill the connection to port 1 (2004) 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 1 bis.jpg

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, HVS file loading

HVS 5 bis.jpg

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:

   DVCS           - electromagnetic detector  
   DVCS_COSMIC    - Cosmic paddles detector  

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):

HVS 2 bis.jpg

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.

HVS 3 bis.jpg

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 adaqh1 computers (or anywhere else where the client program is installed). Let us assume that one wants to change the voltage on the electromagnetic calorimeter, channels ix=3,iy=5 and ix=5,iy=7, 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  7  0.85 
 

and type

   hv_adj.com DVCS_SH adj.dat
 

The first parameter is the map name (see the existing names). To print the maps names:

   hv_proc.com -D DVCS -c MAPS  - electromagnetic calorimeter  

To print the measured voltages on a detector sub-matrix x: 1-7, y: 1-8:

   hv_proc.com -D DVCS -m 1:7,1:8 -c GET -P MC  

If no -m parameter is specified the full matrix will be printed.

Typing

    hv_proc.com ?  

explains the parameters.


6. Troubleshooting


When the program 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 Calorimeter and 1 for cosmic paddles). 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

HVS 4 bis.jpg

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.