Initialise as usual
> cd ~/decal_sw
> source decal_sw_setup.sh
Compile if needed
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
> ./backupData.sh # to see options
> ./backupData.sh webdav real # to backup to the webdav server
> ./backupData.sh 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 :
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.
Setting up the Trigger Distribution Board and Front Panel
- 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).
- Start an xterm/terminal session
Make sure trigger board is powered up and USB cable connected to computer
Load FrontPanel in FrontPanel directory. The Front Panel loads as pop up.
> cd FrontPanel
> ./FrontPanel.bin &
- 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.
- Open file testbeam.bit [caliceon directory]
- [N.B Do not open old firmware misleadingly titled testbeam_new.bit]
- Check FPGA is complete at the bottom of Front Panel window ("FPGA configuration complete").
- Load Front Panel profile by clicking right icon on Front Panel. (Arrow over two files)
- Open file testbeam.xfp [caliceon directory]
- The old panel will display some lines and a new panel will pop up
- Select positions the trigger should act on by making the corresponding mask Busy.
- The USBDAQS are connected to the trigger board by coloured IDC cables. They plug into the trigger board into sockets numbererd 1 to 8.
- [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.
- Numbers 8-1 at the bottom of the window control the masks.
- Select the masks for the connected USBDAQS. For the 3 sensor mode shown below they would be 1, 2, 3.
- Line 2 is reported to be dodgy and should be avoided.
- 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.
- The counter can be set by clicking on "Count". To clear count click "CLR CN" and click again to restart.
Start the data acquisition software in Tests/src tab.
> cd ~/decal/Cherwell/Tests/src
> ./readMultipleSensors.sh <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
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
> ./readMultipleSensors.sh <#usbdaqs> [<runnum>]
> ./readMultipleSensors.sh 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
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 ./readMultipleSensors.sh 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:
- Connect serial cable between serial port of computer and port marked "COM" on front of CAEN
- log onto the power supply:
- 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