Difference between revisions of "CODA Summary"

From Ciswikidb
Jump to navigation Jump to search
 
(110 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Summary of CODA Configurations ==
+
=='''OPS Network'''==
 +
Mott DAQ Host:
 +
          name      =>  opsmdaq0
 +
          ip        =>  129.57.236.240
 +
 
 +
Mott DAQ SBC:
 +
        name      =>  sbcmdaq0
 +
        ip        =>  129.57.236.242
 +
 
 +
Mott DAQ IOC:
 +
        name      =>  iocmdaq1
 +
        ip        =>  129.57.236.241
 +
 
 +
Other network information: 
 +
        name      =>  opsnet
 +
        number    =>  129.57.236.0
 +
        mask      =>  255.255.252.0
 +
        cidr      =>  22
 +
        hexmask    =>  0Xfffffc00
 +
        broadcast  =>  129.57.239.255
 +
        gateway    =>  129.57.236.1
 +
        domain    =>  acc.jlab.org
 +
        vlan      =>  5
 +
        comment    =>  OPS
 +
 
 +
 
 +
 
 +
=='''Power-Cycling Mott DAQ VME Crate'''==
 +
 
 +
We do '''NOT''' have remote reset for this crate. We tried these options but none is working now:
 +
 
 +
# Use APC ''http://g0injreboot.acc.jlab.org'' but after power cycling the crate remains in power-safe mode.
 +
# At one time, we used minicom to hard reboot the Mott DAQ VME crate. This service was discontinued.
 +
# We will try the RS232 connection on the CAEN VME64X VME8200.
 +
 
 +
 
 +
 
 +
=='''Mott DAQ sbcmdaq0'''==
 +
 
 +
Upgraded from MVME6100/VxWorks to Intel/Linux VME SBC. For more information, please see: [https://coda.jlab.org/wiki/index.php/Intel-based_VME_Controllers]
 +
 
 +
MVME 6100 was replaced with a Concurrent Technologies VX915.
 +
 
 +
Local Operating System (CentOS 5.10) is installed on a Compact Flash (4GB) that is mounted on the module.
 +
 
 +
All DAQ software resides on NFS mounted directories from opsmdaq0.
 +
 
 +
From the idaq home directory, softlinks were made to
 +
/opt/coda/sbcmdaq0/linuxvme (contains an up to date version of the JLab module software drivers)
 +
/opt/coda/sbcmdaq0/rol (CODA readout lists for Mott)
 +
 
 +
Non-DAQ group software drivers were also ported to Linux to minimize software changes to be done on the analysis and monitoring side. These include:
 +
* scalers (SIS3801, SIS3801.no_ring, intlib, scaser)
 +
* v775
 +
* v895
 +
* helicity
 +
 
 +
To support the scaler library framework, a new library was written to facilitate the movement of data between different processes (scaler server, scaler producer, CODA ROC): crateSharedMem
 +
 
 +
All of these new libraries are located (and used) in:
 +
/opt/coda/sbcmdaq0/linuxvme/
 +
 
 +
The Scaler server and sisProducer are launched after boot via boot scripts in (sbcmdaq0)
 +
/home/idaq/boot_scripts/
 +
via entries in
 +
/etc/inittab
 +
 
 +
CODA Readout Lists used in the 6100 were updated into the newer "C" readout list framework. No more using makelist or writing .crl files.
 +
 
 +
Scaler libraries were then optimized to support DMA.
 +
 
 +
All Mott CODA configurations are now ready to go:
 +
# Mott_Sample
 +
# Mott_SemiInt
 +
# PEPPo_Int
 +
# Scalers
 +
 
 +
The source is available here:
 +
/opt/coda/sbcmdaq0/rol
 +
 
 +
To compile, must be on sbcmdaq0. Use the Makefile.
 +
 
 +
To access the Mott DAQ VME SBC:
 +
 
 +
  idaq@opsmdaq0 > ssh sbcmdaq0
 +
 
 +
 
 +
 
 +
=='''Mott DAQ iocmdaq1'''==
 +
 
 +
There are two ways to access the Mott DAQ ioc:
 +
# From an accelerator machine: '''telnet iocmdaq1'''
 +
# From an accelerator machine: '''ioc_concole iocmdaq1'''. Here you need to enter a password to this cannot be done with the idaq account.
 +
 
 +
The startup file: idaq@opsmdaq0:/cs/op/iocs/iocmdaq1/startup
 +
 
 +
  # IOC: iocmdaq1
 +
  # Location:
 +
  shellPromptSet("vxwrks@iocmdaq1 -> ");
 +
  # Add the DAQ Host
 +
  hostAdd "opsmdaq0","129.57.236.240"
 +
  # Mount the CODA Distribution
 +
  nfsMount "opsmdaq0","/opt","/opt"
 +
  # Load CODA software and Drivers for Mott system
 +
  cd "/opt"
 +
  < /opt/coda/boot/mott_roc1.boot
 +
 
 +
 
 +
The CODA boot file: idaq@opsmdaq0:/opt/coda/boot/mott_roc1.boot
 +
 
 +
  # Boot file for CODA ROC 2.6.2
 +
  # PowerPC version
 +
  # Add Multicast Routes for cMsg support
 +
  mRouteAdd("224.0.0.0","129.57.236.0",0xf0000000,0,0)
 +
  # Load host table
 +
  hostAdd("opsmdaq0.acc.jlab.org","129.57.236.240")
 +
  # Setup environment to load coda_roc
 +
  putenv "MSQL_TCP_HOST=opsmdaq0"
 +
  putenv "EXPID=inj"
 +
  putenv "TCL_LIBRARY=/opt/coda/2.6.2/common/lib/tcl7.4"
 +
  putenv "ITCL_LIBRARY=/opt/coda/2.6.2/common/lib/itcl2.0"
 +
  putenv "DP_LIBRARY=/opt/coda/2.6.2/common/lib/dp"
 +
  putenv "SESSION=injuser"
 +
  # Load Tempe DMA Library
 +
  ld< /opt/coda/2.6.2/extensions/tempeDma/usrTempeDma.o
 +
  usrVmeDmaConfig(2,3,0)
 +
  # Load JLAB FADC library
 +
  ld < /opt/coda/2.6.2/extensions/fadcV2/v2.0/fadcLib.o
 +
  # Load cMsg Stuff
 +
  cd "/opt/coda/2.6.2/cMsg/vxworks-ppc"
 +
  ld< lib/libcmsgRegex.o
 +
  ld< lib/libcmsg.o
 +
  # New TI library
 +
  ld < /opt/idaq/crl/tid/tidLib.o
 +
  # Load the CODA Readout controller
 +
  cd "/opt/coda/2.6.2/VXWORKSPPC/bin"
 +
  ld < coda_roc_rc3.6
 +
  ld < /opt/idaq/lib/v895/v895.o
 +
  ld < /opt/idaq/lib/v775/v775.o
 +
  ld < /opt/idaq/lib/JLabdiscr/vmeDSClib.o
 +
  ld < /opt/idaq/lib/JLabdiscr/GUIDiscrim/vmetcpserver.o
 +
  # Initialize the event counter
 +
  ncnt = 0
 +
  # global variable, needed for out-of-time scalers to inform CODA they're ready
 +
  scaRunReady = 0
 +
  scaNbError=0
 +
  # global to control printouts of SIS3801
 +
  scaDebug = 0
 +
  # global variable, needed to tell scalers ROC is active
 +
  rocActivate = 0
 +
  # Helicity timing board globals
 +
  vxhelclock=0
 +
  vxheltsettle=0
 +
  vxheltstable=0
 +
  vxhelpattern=1
 +
  vxheldelay=0
 +
  vxhelfreq=0
 +
  # Scaler libraries (on idaq)
 +
  ld < /opt/idaq/scaler/intlib/5.5/scalIntLib.o
 +
  ld < /opt/idaq/scaler/SIS3801/SIS3800.o
 +
  ld < /opt/idaq/scaler/SIS3801/SIS3801.o
 +
  ld < /opt/idaq/scaler/SIS3801.no_ring/SIS3801_noring.o
 +
  sis3801Init(1);
 +
  ld < /opt/idaq/scaler/scaser/scaser.o
 +
  taskSpawn "scalServ",125,spTaskOptions,10000,bobServer
 +
  initSIS()
 +
  initISR_SIS()
 +
  end_run_flag=0
 +
  taskSpawn "SISProd",95,spTaskOptions,10000,SISProducer
 +
  runStartClrSIS()
 +
  # Helicity info gathering
 +
  ld < /opt/idaq/helicity/sgethel.o
 +
  taskSpawn "helinfoServ",127,spTaskOptions,10000,helServer
 +
  # Spawn tasks
 +
  taskSpawn ("ROC",200,8,250000,coda_roc,"","-s","inj","-objects","ROC1 ROC")
 +
  sp main
 +
 
 +
 
 +
 
 +
=='''CODA Files'''==
 +
 
 +
CODA crl files are in: idaq@opsmdaq0: /opt/idaq/crl
 +
Scalers.crl
 +
Mott_Sample.crl
 +
Mott_SemiInt.crl
 +
PEPPo_Int.crl
 +
To compile: makelist Mott_Sample.crl ppc
 +
 
 +
CODA scripts files are in: idaq@opsmdaq0: /opt/idaq/scripts
 +
 
 +
 
 +
 
 +
=='''Summary of CODA Configurations'''==
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
| Name
+
| '''Name'''
| Readout
+
| '''Readout'''
| Output
+
| '''Output'''
| Trigger
+
| '''Trigger'''
 
|-
 
|-
 
| '''Scalers'''
 
| '''Scalers'''
 
| Scaler S1 (helicity gated), S2 (un-gated)
 
| Scaler S1 (helicity gated), S2 (un-gated)
| Scalers_%d.dat
+
| /data/mott/Scalers_%d.dat
 
| Delayed nT_Settle
 
| Delayed nT_Settle
 
|-
 
|-
 
| '''Mott_Sample'''
 
| '''Mott_Sample'''
| Mott FADC, S1, S2, TDC
+
| Mott FADC (Mode 1), S1, S2, TDC
| Mott_Sample_%d.dat
+
| /data/mott/Mott_Sample_%d.dat
 
| Mott Detector
 
| Mott Detector
 
|-
 
|-
 
| '''Mott_SemiInt'''
 
| '''Mott_SemiInt'''
| Mott FADC, S1, S2, TDC
+
| Mott FADC (Mode 7), S1, S2, TDC
| Mott_SemiInt_%d.dat
+
| /data/mott/Mott_SemiInt_%d.dat
 
| Mott Detector
 
| Mott Detector
 
|-
 
|-
| '''FADC_Int'''
+
| '''PEPPo_Int'''
 
| INT FADC, S1, S2
 
| INT FADC, S1, S2
| FADC_Int_%d.dat
+
| /data/compton/PEPPo_Int_%d.dat
 
| nT_Settle
 
| nT_Settle
 
|}
 
|}
Line 31: Line 223:
  
  
== Mott FADC ==
+
=='''Backup Data Files to SILO'''==
 +
 
 +
Cron scripts are installed on the idaq account on opsmdaq0 to back up data and delete it from /data and /data1:
 +
 
 +
/opt/idaq/cron/cron_opsmdaq0
 +
 
 +
Do not attempted to copy, delete, move, or rename files.  Never !
 +
 
 +
The scripts assume that data appears in /data*/DIR where DIR = "annihilation" or  "compton" or  "mott" Files must have the keywords "PEPPo" or "Scalers" or at least "dat". This avoids writing scratch files like root output. Do not start putting data in some new place or with new names.  It won't be backed up to MSS if you do that.
 +
 
 +
The data are deleted from local disks if they have been written in duplicate with correct byte count to the MSS tape silo.  The data stay on disk for an amount of time that is related to the amount of disk space is available.
 +
If lots of disk available, the data stay forever.  If not much disk, the data are deleted aggressively.
 +
 
 +
  The data is copied to: /mss/accel/peppo/raw
 +
 
 +
'''The copying of data was disabled on January 3rd, 2014.'''
 +
  - To list: crontab -l
 +
  - To remove: crontab -r
 +
  - Check again: crontab -l
 +
  - To load: crontab cron_opsmdaq0 (in /opt/idaq/cron)
 +
 
 +
 
 +
 
 +
=='''Mott FADC'''==
 +
 
 +
  const FADC_ADDR      = 0x680000  # 12 bit fADC MOTT - Slot 7
 +
  const FADCMODE        = 1 (Mott_Sample)
 +
  const FADCMODE        = 7 (Mott_SemiInt)
 +
  const FADCSLOT_Mott  = 7
 +
  const TRSPLIT        = 0xeb13  # Address of fADC Signal Distribution Module
 +
 
 +
  CH1 - E LEFT    Range - 0.5 V  DAC_offset = 3300
 +
  CH2 - E RIGHT          - 0.5 V  DAC_offset = 3300
 +
  CH3 - E UP            - 0.5 V  DAC_offset = 3300
 +
  CH4 - E DOWN          - 0.5 V  DAC_offset = 3300
 +
  CH5 - dE LEFT          - 0.5 V  DAC_offset = 3300
 +
  CH6 - dE RIGHT        - 0.5 V  DAC_offset = 3300
 +
  CH7 - dE UP            - 0.5 V  DAC_offset = 3300
 +
  CH8 - dE DOWN          - 0.5 V  DAC_offset = 3300
 +
  CH9 - BFM              - 1.0 V  DAC_offset = 3300
 +
  CH10 - Empty          - 1.0 V  DAC_offset = 3300
 +
  CH11 - Mott Trigger    - 1.0 V  DAC_offset = 3300
 +
  CH12 - Empty          - 1.0 V  DAC_offset = 3300
 +
  CH13 - Delayed Hel    - 1.0 V  DAC_offset = 3300
 +
  CH14 - T_Settle        - 1.0 V  DAC_offset = 3300
 +
  CH15 - Pat Sync        - 1.0 V  DAC_offset = 3300
 +
  CH16 - Pair Sync      - 1.0 V  DAC_offset = 3300
 +
 
 +
* Reference: JLab Module Manuals [https://coda.jlab.org/drupal/content/othermisc-modules]
 +
 
 +
* Reference: [[Media:FADC250_V2_ADC_FPGA_V5.pdf]]
 +
 
 +
* Reference: [[Media:Programming_FADCV2_3.pdf]]
 +
 
 +
* Summary of FADC250 Operating Modes (2/18/14): [[Media:FADC250_modes_2.pdf]]
 +
 
 +
* Changed Mott_SemiInt to the '''FADC Mode 7''' from Mode 3 -- Done on April 29, 2014. This mode provides:
 +
# Pulse integral (sum of all 4ns samples over set threshold, up to 3 pulses per window)
 +
# Pulse time (62.5 ps resolution)
 +
# Pedestal average of 4 samples at beginning of window.
 +
 
 +
'''FADC Programmed Thresholds:'''
 +
# Mott_Sample: Threshold = 0
 +
# Mott_SemiInt:
 +
  CH1 - E LEFT            Threshold = 600
 +
  CH2 - E RIGHT          Threshold = 600
 +
  CH3 - E UP              Threshold = 600
 +
  CH4 - E DOWN            Threshold = 600
 +
  CH5 - dE LEFT          Threshold = 600
 +
  CH6 - dE RIGHT          Threshold = 600
 +
  CH7 - dE UP            Threshold = 600
 +
  CH8 - dE DOWN          Threshold = 600
 +
  CH9 - BFM              Threshold = 1750
 +
  CH10 - Empty            Threshold = 100
 +
  CH11 - Mott Trigger    Threshold = 1000
 +
  CH12 - Empty            Threshold = 100
 +
  CH13 - Delayed Hel      Threshold = 10
 +
  CH14 - T_Settle        Threshold = 10
 +
  CH15 - Pat Sync        Threshold = 10
 +
  CH16 - Pair Sync        Threshold = 10
 +
 
 +
'''Mott_Sample Settings:'''
 +
  FADC_BLOCK_MODE = 1
 +
  MODE            = 1
 +
  PL              = 80    - Programmable Latency (100 ns to 8 µs)
 +
  PTW            = 50    - Programmable Trigger Window (100 ns to 2 µs)
 +
 
 +
'''Mott_SemiInt Settings:'''
 +
  FADC_BLOCK_MODE = 1
 +
  MODE            = 7
 +
  PL              = 80
 +
  PTW            = 50
 +
  NSB            = 5      - Number of Samples before the threshold crossing sample (TC) included in the pulse data set (integral)
 +
  NSA            = 28    - Number of Samples after the threshold crossing sample (TC) included in the pulse data set (integral)
 +
  NP              = 1      - Number of pulses to search for in PTW
 +
 
 +
 
 +
 
 +
=='''INT FADC'''==
 +
 
 +
  const FADC_ADDR      = 0xed0000  # 12 bit fADC Int - Slot 10       
 +
  const FADCMODE        = 3 (Int_Int, special)
 +
  const FADCSLOT_PEPPo3 = 10
 +
  const TRSPLIT        = 0xea13  # Address of fADC Signal Distribution Module
 +
 
 +
  Range - 2.0 V  DAC_offset = 3300
 +
 
 +
Reference: [[Media:PEPPo-FADC.pdf]]
 +
 
 +
Reference: [[Media:PEPPo_Helicity_Trigger_FADC250.docx]]
 +
 
 +
Reference: [[Media:PEPPpoHelicityFirmware.pdf]] [[Media:PEPPpoHelicityFirmware.docx]]
 +
 
 +
All the relevant files are at: '''M:\FE\PEPPo'''. These files also copied to opsmdaq0 at: '''/opt/idaq/HaiDong_PEPPo'''.
 +
 
 +
 
 +
 
 +
=='''TDC'''==
 +
 
 +
  CAEN v775
 +
  const int V775_ADD    = 0x1190
 +
 
 +
  From Coda file:
 +
  Full Scale (ns) = v775_getFSR() = 134 ns
 +
  Bin Resolution (ps) = (v775_getLSB()*1000.) = 34 ps/channel
 +
 
 +
  vxwrks@iocmdaq1 -> v775_printScaleInfo()
 +
  v775 => fullscale register =255 (0xff), LSB=0.034902 ns/chan, full scale=134.023529 ns, sliding Gate=1
 +
 
 +
  The TDC is operated in Common Start Mode: v775_setupCommonStart()
 +
 
 +
Reference: [[Media:V775_manual.pdf]]
 +
 
 +
 
 +
 
 +
=='''S1 and S2'''==
 +
 
 +
  S1: SIS3801 at addr 0xa40000
 +
  S2: SIS3801 at addr 0xa50000
 +
 
 +
Reference: [[Media:SIS3801_manual.pdf]]
 +
 
 +
 
 +
 
 +
=='''TID'''==
 +
 
 +
  A24 Address for TID Module (0x100000 for VME Slot 2)
 +
  const TRIG_ADDR      = 0x100000
 +
 
 +
Reference: [[Media:TImaster.pdf]]
 +
 
 +
 
 +
 
 +
=='''Trigger Prescale'''==
 +
 
 +
The input trigger can be prescaled by editing the crl file:
 +
  /* Front panel trigger prescale: 2^<arg> */
 +
  tidSetPrescale(0);
 +
 
  
  
 +
=='''cefdmp/xcefdmp'''==
 +
The event dump utility (cefdmp) can display, in a readable ASCII format, events from the data files.
  
== INT FADC ==
+
==== Syntax ====
 +
% cefdmp [filename] [-o object] [-t tag] [-u uniquetag] [-s start] [-e end] [-d dictionary] [-x]
 +
% xcefdmp [same]
  
 +
==== Options ====
 +
o specify the source object name (CODA component name)
 +
t select specified tag number or name (full path in event structure)
 +
u select specified unique tag, independent of location in the event
 +
s number of first record in file to dump
 +
e number of last record in file to dump
 +
d specify dictionary for obtaining tag names and titles
 +
x hex dump of integers (default is decimal)
  
  
== TDC ==
 
  
 +
[[Image:xcefdmp_screen1.jpg]]
  
 +
[[Image:xcefdmp_screen2.jpg]]
  
== S1 ==
 
  
  
 +
=='''cedit and dbedit'''==
 +
Use cedit and/or dbedit to modify CODA database.
  
== S2 ==
 
  
 +
[[Image:cedit_screen.jpg]]
  
 +
[[Image:dbedit_screen.jpg]]
  
== TID ==
+
=='''Issues and FAQ'''==
A24 Address for TID Module (0x100000 for VME Slot 2)
+
* RunNumber: if the run number in msql is different from the one in CODA cool database, coda doesn't work. Open dbedit => localhost => sessions and change the RunNumber to match the one in CODA cool database.
const TRIG_ADDR=0x100000
 

Latest revision as of 11:32, 2 June 2017

OPS Network

Mott DAQ Host:

         name      =>  opsmdaq0
         ip        =>   129.57.236.240

Mott DAQ SBC:

        name       =>  sbcmdaq0
        ip        =>   129.57.236.242 

Mott DAQ IOC:

        name       =>  iocmdaq1
        ip         =>   129.57.236.241

Other network information:

        name       =>  opsnet
        number     =>  129.57.236.0
        mask       =>  255.255.252.0
        cidr       =>  22
        hexmask    =>  0Xfffffc00
        broadcast  =>  129.57.239.255
        gateway    =>  129.57.236.1
        domain     =>  acc.jlab.org
        vlan       =>  5
        comment    =>  OPS


Power-Cycling Mott DAQ VME Crate

We do NOT have remote reset for this crate. We tried these options but none is working now:

  1. Use APC http://g0injreboot.acc.jlab.org but after power cycling the crate remains in power-safe mode.
  2. At one time, we used minicom to hard reboot the Mott DAQ VME crate. This service was discontinued.
  3. We will try the RS232 connection on the CAEN VME64X VME8200.


Mott DAQ sbcmdaq0

Upgraded from MVME6100/VxWorks to Intel/Linux VME SBC. For more information, please see: [1]

MVME 6100 was replaced with a Concurrent Technologies VX915.

Local Operating System (CentOS 5.10) is installed on a Compact Flash (4GB) that is mounted on the module.

All DAQ software resides on NFS mounted directories from opsmdaq0.

From the idaq home directory, softlinks were made to /opt/coda/sbcmdaq0/linuxvme (contains an up to date version of the JLab module software drivers) /opt/coda/sbcmdaq0/rol (CODA readout lists for Mott)

Non-DAQ group software drivers were also ported to Linux to minimize software changes to be done on the analysis and monitoring side. These include:

  • scalers (SIS3801, SIS3801.no_ring, intlib, scaser)
  • v775
  • v895
  • helicity

To support the scaler library framework, a new library was written to facilitate the movement of data between different processes (scaler server, scaler producer, CODA ROC): crateSharedMem

All of these new libraries are located (and used) in: /opt/coda/sbcmdaq0/linuxvme/

The Scaler server and sisProducer are launched after boot via boot scripts in (sbcmdaq0) /home/idaq/boot_scripts/ via entries in /etc/inittab

CODA Readout Lists used in the 6100 were updated into the newer "C" readout list framework. No more using makelist or writing .crl files.

Scaler libraries were then optimized to support DMA.

All Mott CODA configurations are now ready to go:

  1. Mott_Sample
  2. Mott_SemiInt
  3. PEPPo_Int
  4. Scalers

The source is available here: /opt/coda/sbcmdaq0/rol

To compile, must be on sbcmdaq0. Use the Makefile.

To access the Mott DAQ VME SBC:

 idaq@opsmdaq0 > ssh sbcmdaq0


Mott DAQ iocmdaq1

There are two ways to access the Mott DAQ ioc: 
  1. From an accelerator machine: telnet iocmdaq1
  2. From an accelerator machine: ioc_concole iocmdaq1. Here you need to enter a password to this cannot be done with the idaq account.
The startup file: idaq@opsmdaq0:/cs/op/iocs/iocmdaq1/startup
 # IOC: iocmdaq1
 # Location:
 shellPromptSet("vxwrks@iocmdaq1 -> ");
 # Add the DAQ Host
 hostAdd "opsmdaq0","129.57.236.240"
 # Mount the CODA Distribution
 nfsMount "opsmdaq0","/opt","/opt"
 # Load CODA software and Drivers for Mott system
 cd "/opt"
 < /opt/coda/boot/mott_roc1.boot


The CODA boot file: idaq@opsmdaq0:/opt/coda/boot/mott_roc1.boot
 # Boot file for CODA ROC 2.6.2
 # PowerPC version
 # Add Multicast Routes for cMsg support
 mRouteAdd("224.0.0.0","129.57.236.0",0xf0000000,0,0)
 # Load host table
 hostAdd("opsmdaq0.acc.jlab.org","129.57.236.240")
 # Setup environment to load coda_roc
 putenv "MSQL_TCP_HOST=opsmdaq0"
 putenv "EXPID=inj"
 putenv "TCL_LIBRARY=/opt/coda/2.6.2/common/lib/tcl7.4"
 putenv "ITCL_LIBRARY=/opt/coda/2.6.2/common/lib/itcl2.0"
 putenv "DP_LIBRARY=/opt/coda/2.6.2/common/lib/dp"
 putenv "SESSION=injuser"
 # Load Tempe DMA Library
 ld< /opt/coda/2.6.2/extensions/tempeDma/usrTempeDma.o
 usrVmeDmaConfig(2,3,0)
 # Load JLAB FADC library
 ld < /opt/coda/2.6.2/extensions/fadcV2/v2.0/fadcLib.o
 # Load cMsg Stuff
 cd "/opt/coda/2.6.2/cMsg/vxworks-ppc"
 ld< lib/libcmsgRegex.o
 ld< lib/libcmsg.o
 # New TI library
 ld < /opt/idaq/crl/tid/tidLib.o
 # Load the CODA Readout controller
 cd "/opt/coda/2.6.2/VXWORKSPPC/bin"
 ld < coda_roc_rc3.6
 ld < /opt/idaq/lib/v895/v895.o
 ld < /opt/idaq/lib/v775/v775.o
 ld < /opt/idaq/lib/JLabdiscr/vmeDSClib.o
 ld < /opt/idaq/lib/JLabdiscr/GUIDiscrim/vmetcpserver.o
 # Initialize the event counter
 ncnt = 0
 # global variable, needed for out-of-time scalers to inform CODA they're ready
 scaRunReady = 0
 scaNbError=0
 # global to control printouts of SIS3801
 scaDebug = 0
 # global variable, needed to tell scalers ROC is active
 rocActivate = 0
 # Helicity timing board globals
 vxhelclock=0
 vxheltsettle=0
 vxheltstable=0
 vxhelpattern=1
 vxheldelay=0
 vxhelfreq=0
 # Scaler libraries (on idaq)
 ld < /opt/idaq/scaler/intlib/5.5/scalIntLib.o
 ld < /opt/idaq/scaler/SIS3801/SIS3800.o
 ld < /opt/idaq/scaler/SIS3801/SIS3801.o
 ld < /opt/idaq/scaler/SIS3801.no_ring/SIS3801_noring.o
 sis3801Init(1);
 ld < /opt/idaq/scaler/scaser/scaser.o
 taskSpawn "scalServ",125,spTaskOptions,10000,bobServer
 initSIS()
 initISR_SIS()
 end_run_flag=0
 taskSpawn "SISProd",95,spTaskOptions,10000,SISProducer
 runStartClrSIS()
 # Helicity info gathering
 ld < /opt/idaq/helicity/sgethel.o
 taskSpawn "helinfoServ",127,spTaskOptions,10000,helServer
 # Spawn tasks
 taskSpawn ("ROC",200,8,250000,coda_roc,"","-s","inj","-objects","ROC1 ROC")
 sp main


CODA Files

CODA crl files are in: idaq@opsmdaq0: /opt/idaq/crl
Scalers.crl
Mott_Sample.crl
Mott_SemiInt.crl
PEPPo_Int.crl
To compile: makelist Mott_Sample.crl ppc
CODA scripts files are in: idaq@opsmdaq0: /opt/idaq/scripts


Summary of CODA Configurations

Name Readout Output Trigger
Scalers Scaler S1 (helicity gated), S2 (un-gated) /data/mott/Scalers_%d.dat Delayed nT_Settle
Mott_Sample Mott FADC (Mode 1), S1, S2, TDC /data/mott/Mott_Sample_%d.dat Mott Detector
Mott_SemiInt Mott FADC (Mode 7), S1, S2, TDC /data/mott/Mott_SemiInt_%d.dat Mott Detector
PEPPo_Int INT FADC, S1, S2 /data/compton/PEPPo_Int_%d.dat nT_Settle


Backup Data Files to SILO

Cron scripts are installed on the idaq account on opsmdaq0 to back up data and delete it from /data and /data1:

/opt/idaq/cron/cron_opsmdaq0

Do not attempted to copy, delete, move, or rename files. Never !

The scripts assume that data appears in /data*/DIR where DIR = "annihilation" or "compton" or "mott" Files must have the keywords "PEPPo" or "Scalers" or at least "dat". This avoids writing scratch files like root output. Do not start putting data in some new place or with new names. It won't be backed up to MSS if you do that.

The data are deleted from local disks if they have been written in duplicate with correct byte count to the MSS tape silo. The data stay on disk for an amount of time that is related to the amount of disk space is available. If lots of disk available, the data stay forever. If not much disk, the data are deleted aggressively.

 The data is copied to: /mss/accel/peppo/raw
The copying of data was disabled on January 3rd, 2014.
 - To list: crontab -l
 - To remove: crontab -r
 - Check again: crontab -l
 - To load: crontab cron_opsmdaq0 (in /opt/idaq/cron)


Mott FADC

 const FADC_ADDR       = 0x680000  # 12 bit fADC MOTT - Slot 7
 const FADCMODE        = 1 (Mott_Sample)
 const FADCMODE        = 7 (Mott_SemiInt)
 const FADCSLOT_Mott   = 7
 const TRSPLIT         = 0xeb13   # Address of fADC Signal Distribution Module
 CH1 - E LEFT     Range - 0.5 V  DAC_offset = 3300
 CH2 - E RIGHT          - 0.5 V  DAC_offset = 3300
 CH3 - E UP             - 0.5 V  DAC_offset = 3300
 CH4 - E DOWN           - 0.5 V  DAC_offset = 3300
 CH5 - dE LEFT          - 0.5 V  DAC_offset = 3300
 CH6 - dE RIGHT         - 0.5 V  DAC_offset = 3300
 CH7 - dE UP            - 0.5 V  DAC_offset = 3300
 CH8 - dE DOWN          - 0.5 V  DAC_offset = 3300
 CH9 - BFM              - 1.0 V  DAC_offset = 3300
 CH10 - Empty           - 1.0 V  DAC_offset = 3300
 CH11 - Mott Trigger    - 1.0 V  DAC_offset = 3300
 CH12 - Empty           - 1.0 V  DAC_offset = 3300
 CH13 - Delayed Hel     - 1.0 V  DAC_offset = 3300
 CH14 - T_Settle        - 1.0 V  DAC_offset = 3300
 CH15 - Pat Sync        - 1.0 V  DAC_offset = 3300
 CH16 - Pair Sync       - 1.0 V  DAC_offset = 3300
  • Reference: JLab Module Manuals [2]
  • Changed Mott_SemiInt to the FADC Mode 7 from Mode 3 -- Done on April 29, 2014. This mode provides:
  1. Pulse integral (sum of all 4ns samples over set threshold, up to 3 pulses per window)
  2. Pulse time (62.5 ps resolution)
  3. Pedestal average of 4 samples at beginning of window.
FADC Programmed Thresholds:
  1. Mott_Sample: Threshold = 0
  2. Mott_SemiInt:
 CH1 - E LEFT            Threshold = 600
 CH2 - E RIGHT           Threshold = 600
 CH3 - E UP              Threshold = 600
 CH4 - E DOWN            Threshold = 600
 CH5 - dE LEFT           Threshold = 600
 CH6 - dE RIGHT          Threshold = 600
 CH7 - dE UP             Threshold = 600
 CH8 - dE DOWN           Threshold = 600
 CH9 - BFM               Threshold = 1750
 CH10 - Empty            Threshold = 100
 CH11 - Mott Trigger     Threshold = 1000
 CH12 - Empty            Threshold = 100
 CH13 - Delayed Hel      Threshold = 10
 CH14 - T_Settle         Threshold = 10
 CH15 - Pat Sync         Threshold = 10
 CH16 - Pair Sync        Threshold = 10
Mott_Sample Settings:
 FADC_BLOCK_MODE = 1
 MODE            = 1
 PL              = 80    - Programmable Latency (100 ns to 8 µs)
 PTW             = 50    - Programmable Trigger Window (100 ns to 2 µs)
Mott_SemiInt Settings:
 FADC_BLOCK_MODE = 1
 MODE            = 7
 PL              = 80
 PTW             = 50
 NSB             = 5      - Number of Samples before the threshold crossing sample (TC) included in the pulse data set (integral)
 NSA             = 28     - Number of Samples after the threshold crossing sample (TC) included in the pulse data set (integral)
 NP              = 1      - Number of pulses to search for in PTW


INT FADC

 const FADC_ADDR       = 0xed0000  # 12 bit fADC Int - Slot 10         
 const FADCMODE        = 3 (Int_Int, special)
 const FADCSLOT_PEPPo3 = 10
 const TRSPLIT         = 0xea13   # Address of fADC Signal Distribution Module
 Range - 2.0 V  DAC_offset = 3300

Reference: Media:PEPPo-FADC.pdf

Reference: Media:PEPPo_Helicity_Trigger_FADC250.docx

Reference: Media:PEPPpoHelicityFirmware.pdf Media:PEPPpoHelicityFirmware.docx

All the relevant files are at: M:\FE\PEPPo. These files also copied to opsmdaq0 at: /opt/idaq/HaiDong_PEPPo.


TDC

 CAEN v775
 const int V775_ADD    = 0x1190
 From Coda file:
 Full Scale (ns) = v775_getFSR() = 134 ns
 Bin Resolution (ps) = (v775_getLSB()*1000.) = 34 ps/channel
 vxwrks@iocmdaq1 -> v775_printScaleInfo()
 v775 => fullscale register =255 (0xff), LSB=0.034902 ns/chan, full scale=134.023529 ns, sliding Gate=1
 The TDC is operated in Common Start Mode: v775_setupCommonStart()

Reference: Media:V775_manual.pdf


S1 and S2

 S1: SIS3801 at addr 0xa40000 
 S2: SIS3801 at addr 0xa50000

Reference: Media:SIS3801_manual.pdf


TID

 A24 Address for TID Module (0x100000 for VME Slot 2)
 const TRIG_ADDR       = 0x100000

Reference: Media:TImaster.pdf


Trigger Prescale

The input trigger can be prescaled by editing the crl file:
 /* Front panel trigger prescale: 2^<arg> */
 tidSetPrescale(0); 


cefdmp/xcefdmp

The event dump utility (cefdmp) can display, in a readable ASCII format, events from the data files.

Syntax

% cefdmp [filename] [-o object] [-t tag] [-u uniquetag] [-s start] [-e end] [-d dictionary] [-x] 
% xcefdmp [same] 

Options

o specify the source object name (CODA component name) 
t select specified tag number or name (full path in event structure) 
u select specified unique tag, independent of location in the event 
s number of first record in file to dump 
e number of last record in file to dump 
d specify dictionary for obtaining tag names and titles 
x hex dump of integers (default is decimal) 


Xcefdmp screen1.jpg

Xcefdmp screen2.jpg


cedit and dbedit

Use cedit and/or dbedit to modify CODA database.


Cedit screen.jpg

Dbedit screen.jpg

Issues and FAQ

  • RunNumber: if the run number in msql is different from the one in CODA cool database, coda doesn't work. Open dbedit => localhost => sessions and change the RunNumber to match the one in CODA cool database.