HOME ESR EXPERIMENTS LABS etc
NucAR lab laser_lab Fritz-Bosch-Lab X-Ray Lab target Beavertail
  NucAR lab  Not logged in ELOG logo
Message ID: 6     Entry time: Mon Nov 4 09:14:10 2019
Author: Jan 
Category: DAQ 
Subject: changing VME hardware of the DAQ (drasi) 
Here is a brief description of how to change the VME hardware of an exisiting DAQ system to a new configuration.

Our DAQ folders are located in /lynx/Lynx/esr/usr/litv-exp/

The current DAQ running on a specific rio4 is always located in a subfolder named as the hostname of the rio4, e.g. r4l-58.

If you want to change the DAQ on this rio you have to change the config in this folder. Be aware, that the folder name HAS TO BE THE HOSTNAME, no exeptions are allowed! Because of this the r4l-XX folders are usually softlinks to further folders, that contain different versions of the DAQ. 
In practice this means:

1. copy the current folder (e.g. r4l-58_dev) to a new one (e.g. r4l-58_new) and make sure that the link (r4l-58) is set to your new folder (ln -s /../r4l-58_new /../r4l-58)

2. change the hardware of your VME crate and check all VME addresses

3. edit main.cfg in your new DAQ folder, see the example attached here
   - always have a BARRIER between the modules
   - make sure you get the VME addresses right (MesyTec, CAEN board specialties)
   - the order of the modules in this file from top to bottom is important for the next step!

4. edit your start.sh script and all connected scripts and config-files (trloii_setup.sh, vulom.trlo..., a dedicated entry for vulom-configuration will follow)
   - check if DAQ in running, when triggers are provided

5. set up a new unpacker
   -go to the unpacker directory /u/litv-exp/unpacker/unpackexps/ and copy the old unpacker to a new directory:  
   -> cp -r old_up new_up
   -rename the main .spec file:
   -> cd new_up
   -> mv old_up.spec new_up.spec
   -open the Makefile with editor, search and replace "old_up" by "new_up", try compiling:
   -> make clean
   -> make -j

6. configure the data structure of the unpacker
   -make sure you have all the module spec-files that you need included in "new_up.spec", check nurdlib or Hans Törnqvist/Basti Löher in case you do not have it
   -edit the "main_user_esr.spec" to include all your modules (see example attached)
   -the (geom=0x1) field of each module has to be numbered according to the module order in the main.cfg above, starting from 0x1, some modules require additional things (crate=0)
   -edit the "det_mapping.hh" to assign names and types for each channel (example attached)
   -recompile and check upacker with running data stream from the daq:
   -> make -j
   -> ./new_up --stream=r4l-58 --debug (will print only error events)
Attachment 1: main.cfg  1 kB  | Show | Hide all | Show all
Attachment 2: main_user_esr.spec  660 Bytes  Uploaded Mon Nov 4 10:23:34 2019  | Show | Hide all | Show all
Attachment 3: det_mapping.hh  900 Bytes  Uploaded Mon Nov 4 10:26:33 2019  | Hide | Hide all | Show all
SIGNAL(	ADC_1, esr.madc[0].data[0],
	ADC_32, esr.madc[0].data[31], DATA32);
SIGNAL( ADC_33, esr.madc[1].data[0],
	ADC_64, esr.madc[1].data[31], DATA32);
SIGNAL(	TDC_1, esr.tdc[0].data[0],
	TDC_32, esr.tdc[0].data[31], DATA12);
SIGNAL( TDC_33, esr.tdc[1].data[0],
	TDC_64, esr.tdc[1].data[31], DATA12);
SIGNAL( SC_1, esr.scaler[0].data[0],
        SC_32, esr.scaler[0].data[31],DATA32);
SIGNAL( SC_33, esr.scaler[1].data[0],
	SC_64, esr.scaler[1].data[31],DATA32);
//SIGNAL(ZERO_SUPPRESS_MULTI(20): MDPP_E1);
//SIGNAL(MDPP_E1, esr.mdpp[0].data[0],
//       MDPP_E16, esr.mdpp[0].data[15],DATA16_OVERFLOW);
//SIGNAL(ZERO_SUPPRESS_MULTI(20): MDPP_T1);
//SIGNAL(MDPP_T1, esr.mdpp[0].data[16],
//       MDPP_T16, esr.mdpp[0].data[31],DATA16_OVERFLOW);
//SIGNAL(ZERO_SUPPRESS_MULTI(20): MDPP_TRIG_1);
//SIGNAL(MDPP_TRIG_1, esr.mdpp[0].data[32],
//       MDPP_TRIG_2, esr.mdpp[0].data[33],DATA16_OVERFLOW);
ELOG V3.1.5-fc6679b