Child pages
  • Cherwell Shifter's Manual
Skip to end of metadata
Go to start of metadata

Initialise as usual

> cd ~/decal_sw
> source

Compile if needed

> source


Running Backups

The data can be backup by running the following script periodically. The data can be backed up to the remote RAL webdav server or a local USB exteranl drive.

The script uses rsync to only copy what has changed.

> cd ~/decal-sw/Cherwell/Tests/src
> ./              # to see options
> ./ webdav real  # to backup to the webdav server
> ./ usb real     # to backup to a usb external drive

Changing configuration settings

The configurations are defined in 3 types of file in ~/decal_sw/Cherwell/bin/data/cfg/. This allows different settings for the different sensor types without having to change lots of files.

  • config_defaults.txt : this is read by all sensors when they start and contains the default options.
  • config%%.txt : these are links for each sensor number %%. They point to one of the following three files. The settings in these file override the settings in config-defaults.txt so they only contain the settings that are specific to a particular set of wafres
    • config_wafers_4_5_6.txt : setting
    • config_wafers_8_9_10.txt :
    • config_wafers_12_13_14.txt

The code first reads config_defaults.txt ; then it reads sensor%%.txt to override any settings in the defaults file. The code then applies those settings to the sensor. The settings are recorded in ~/decal_sw/Cherwell/bin/data/log/


To arrange for the vncserver to start when computer boots up

> sudo chkconfig vncserver on
> sudo service vncserver start

To stop the vncserver running and to prevent it restarting on boot up:

> sudo service vncserver stop
> sudo chkconfig vncserver off

Setting up the NIM crate

Here is a diagram of the cabling of the NIM crate required to produce either scintillator or generator triggers. The o/p from the "Receive" channel provides a reference voltage (0V) for the triggers in the trigger distribution board.

  • Scintillator Trigger: On the "Discriminator", set the on/off switch to on for each scintillator you want in coincidence. Set the "external trigger" on/off switch to Off.

  • External Trigger: On the "Discriminator", set the on/off switch to off for all the scintillators. Set the "external trigger" on/off switch to On. The frequency of triggers can be adjusted by using the red (coarse) and grey (fine) tuning knobs in the lower half of the "LRS 688".
  • Dual Scaler. The counter is started by pressing the "Start"; counting stops on pressing "Stop"; the counter is set to zero by pressing "Reset";

Setting up the Trigger Distribution Board and Front Panel


  1. See Trigger_Distribution_fanout_cables.pdf for how to connect USBDAQ to the Trigger Distribution Board. You willo need to connect up the 7-way IDc cable to teh 6-way socket on the Trigger Board and the 4-way + 1-way sockets on the USBDAQ (don't ask, see the diagram below).
  2. Start an xterm/terminal session 

    Make sure trigger board is powered up and USB cable connected to computer
  3. Load FrontPanel in FrontPanel directory. The Front Panel loads as pop up.

    > cd FrontPanel
    > ./FrontPanel.bin &
  4.    Download  configuration firmware by clicking on left icon on Front Panel (Arrow over single file). This will be greyed out if you have not plugged in the USB cable.
    1.   Open file testbeam.bit      [caliceon directory]
    2.    [N.B Do not open old firmware misleadingly titled testbeam_new.bit]
    3. Check FPGA is complete at the bottom of Front Panel window ("FPGA configuration complete").

  5. Load Front Panel profile by clicking right icon on Front Panel. (Arrow over two files)
    1. Open file testbeam.xfp      [caliceon directory]
    2. The old panel will display some lines and a new panel will pop up
  6. Select positions the trigger should act on by making the corresponding mask Busy.
    1. The USBDAQS are connected to the trigger board by coloured IDC cables. They plug into the trigger board into sockets numbererd 1 to 8.
    2. [Busy 1, Not Busy 0]. There are two 'Busy' lines on the Front Panel; the top represents the masks (1=allowed,0=blocked), the bottom the sensors.
    3. Numbers 8-1 at the bottom of the window control the masks.
    4.  Select the masks for the connected USBDAQS. For the 3 sensor mode shown below they would be 1, 2, 3.
    5. Line 2 is reported to be dodgy and should be avoided.
    6. In the 4-port dip switch labelled "MODE", the two centre dip switches (nos. 1 and 2) should be in the down position and the others in the up position. The FrontPanel window will show the "Trig Mode" as green for numbers 1 and 2.
    7. The counter can be set by clicking on "Count". To clear count click "CLR CN" and click again to restart.

  7. Start the data acquisition software in Tests/src tab.

    >  cd ~/decal/Cherwell/Tests/src 
    > ./ <No. Sensors> <Run Number>

Checking USBDAQs are ready

The simplest way to check the USBDAQS are partially alive is to run ./IDTest

> cd ~/decal_sw/Cherwell/Tests/bin
> ./IDTest

If the usbdaq is alive it will return the sensor and board id. At the moment it only works for the first usbdaq it finds rather than all of them but it usually gives some indication that the system is ready.

Starting a Run

data taking can be stated by running the ./readMultipleSensors script. This will spawn one process and terminal for each USBDAQ. The read out code then waits for a trigger before reading out the frame. the code runs continuously until told to stop (see below)

> cd ~/decal_sw/Cherwell/Tests/src
> ./ <#usbdaqs> [<runnum>]
> ./ 6


  • #usbdaqs is the number of usb daqs it expects to find.
  • runnum is optional. The code will either use this run number of the next available number. If you choose a run number that already exists you will be offered the option to abort.

 The readout code will write out information to

  • log directory : ~/decal_sw/Cherwell/Tests/bin/data/log/<site>/<run number>/
  • pixel data    : ~/decal_sw/Cherwell/Tests/bin/data/pix/<site>/<run number>/

Stopping a Run (cleanly)

Once you have started a run you can stop it by issuing the following command

> ~/decal_sw/Cherwell/Tests/src/

This creates a file called STOP_DAQ_RUN in ~/decal_sw/Cherwell/Tests/src. The readout processes stop when they see this file (you will see the terminals disappear one by one). The file is automatically deleted by ./ before starting a new run but other scripts may not. 

Recovering from a crashed run

> cd ~/decal_sw/Cherwell/Tests/src
> ./


Programming the firmware

Power recyling USBDAQS

 To cycle the power:caliceon@heplnw045 decal_sw

  • log onto the daq computer:
                  ssh caliceon@
  • Connect serial cable between serial port of computer and port marked "COM" on front of CAEN
  • log onto the power supply:
                  minicom testbeam
  • log into the power supply using the password:
  • select menu then channels (press enter to select)
  • use the arrows to navigate the channels
  • when in the Pw column press space to switch supply on or off

    Resetting Power supply screen:
  • if the supply stops making sense then you need to log out and log in again
    • press tab to select main menu
    • then enter and select logout
    • then log in as before

  • No labels