This note relates to Release 8.1 dated 1 Jan 2022 of the MIDAS NewGen Data Acquisition System. This software is based around a Web Browser for the GUI. This software release subset is for MIDAS FEBEX data acquisition using GSI FEBEX digitial acquisition modules. The firmware used by the FEBEX modules has been developed for the MiniBall Data Acquisition by STFC Daresbury Nuclear Physics Group. (1) It is assumed that you have a PC (provided by GSI) which has a Debian Linux OS and the PCI Express card and software needed for access to the FEBEX hardware reinstalled Having installed the hardware driver and connected the PC to the FEBEX crate you can test the installation. (2) Next download and install the MIDAS software for FEBEX Data Acquisition. There is a web page for the MIDAS data acquisition software - see http://npg.dl.ac.uk/MIDAS/MIDASNewGenDataAcquisition/download.html From here download the software http://npg.dl.ac.uk/MIDAS/MIDASNewGen_Core_010122.tgz which is common to all packages and http://npg.dl.ac.uk/MIDAS/MIDAS_Release/MIDASNewGen_FEBEX_010122.tgz which is specific for the FEBEX digitizers. It is recommended that you unpack these archives into the filespace of the ID to be used for running data acquisition. You should also perform this software install using the selected ID. The software does not require any special permissions (unless noted) and you will avoid problems caused by file permissions. You will create the directory MIDAS_010122 Then create a symbolic link from /MIDAS to this directory. This does need to be performed by root. In the future when you wish to install an updated version of the software you can repeat this procedure and simply change the symbolic link. Then if needed it is easy to revert to the previous version. You will find that these installation and operation documents are also in /MIDAS after the software installation. Also the documentation (User Guide) is available at http://npg.dl.ac.uk/MIDAS/MIDASNewGenDataAcquisition/base.html - This is a work in progress! Many GUI pages have a button "How to use this page" or similar. (3) Customize the installation The software uses the Linux system name [uname -n] in order that the installed software can be tailored for multiple applications. (a) cd /MIDAS/config/TclHttpd Here are a number of directories. Copy LIPC-1 create a custom directory named [uname -n] This direrctory contains a file startup.tcl which will start the MIDAS session for the FEBEX GUI. example LIPC-1/startup.tcl Setting BGColor "BlanchedAlmond" Setting TextColor "red" Setting ProjectName FEBEX Setting Option1Name STFC Setting Option1URL "stfc.ac.uk" Setting Option1Image stfc.jpg # Install required services package require FEBEXAccessClient if {![namespace exists ::FEBEX]} {namespace eval ::FEBEX {puts "created namespace ::FEBEX"}} if {![namespace exists ::febexU]} {namespace eval ::febexU {puts "created namespace ::febexU"}} set ::FEBEX::TestMode 0 set ::FEBEX::AccessTestMode 0 set z [catch {source [file join $env(MIDASBASE) TclHttpd tcl Common febex.registerdefinitions]} m] if {$z != 0} {puts "febex.registerdefinitions > $m"} global SpectrumServerHost set SpectrumServerHost LIPC-1 namespace eval febexU { # variable moduleList [list {0 1 0}] ;# list items => crateID linkID boardID # variable moduleID [first $moduleList] # variable crateID [first $moduleID] # variable linkID [second $moduleID] # variable boardID [third $moduleID] variable allcrates 0 variable alllinks 0 variable allboards 0 variable allchannels 0 } namespace eval DataAcquisition { variable PROJECT FEBEX variable ACQSERVERS set ACQSERVERS [list LIPC-1] variable ACQSERVER [first $ACQSERVERS] set ::DataAcquisition::EnableTape 1 } package require FEBEXAccessServer Setting DataBaseRoot "/MIDAS/DB" package require DataBaseAccessServer package require NetVarServer package require SigTaskServer package require MemSasServer package require TapeServer namespace eval $::DataAcquisition::PROJECT { variable DBRootName [file join EXPERIMENTS FEBEX] variable DBNodeBase LIPC-1 # variable DBNodeBase 2021Feb27-16.07.11 } package require FEBEXRunControl Setting Option8Name "Server Software Home Page" Setting Option8URL "http://npg.dl.ac.uk/MIDAS/download/WebServices.html" (b) Notes Lines starting with a # symbol are comments and are ignored by the software Essential customisations. Replace LIPC-1 with the name of the Linux system given to the FEBEX IPC crate set ::FEBEX::TestMode 0 set ::FEBEX::AccessTestMode 0 These are mentioned in the operation notes and can be used for Test purposes (running the software without actual FEBEX hardware) set ::DataAcquisition::EnableTape 1 -- This is required only if you are writting data to the MIDAS Storage Server - if not change 1 to 0 or remove package require TapeServer -- Can be omitted if the MIDAS Storage Server is not required (1) It is assumed that you have a PC (provided by GSI) which has a Debian Linux OS and the PCI Express card and software needed for access to the FEBEX hardware reinstalled Having installed the hardware driver and connected the PC to the FEBEX crate you can test the installation. (4) Load the MIDAS TclHttpd software. This is a web server containing the MIDAS servers needed. Start using either /MIDAS/Linux/startup/HTTPD@8015 (recommended), /MIDAS/Linux/startup/HTTPD or /MIDAS/TclHttpd/Linux64/TclHttpd-server The software is installed using a script from the directory /MIDAS/config/TclHttpd. This uses [uname -n] for customisation and selects an existing script. The script used is confirmed in the startup monitor output. /MIDAS/Linux/startup/HTTPD@8015 will remove any existing instance of the web server and then launch /MIDAS/TclHttpd/Linux64/TclHttpd-server which will select a startup script as noted above. Typical startup output is: tidy up tclsh8.5: no process found init.tcl /MIDAS/lib/tcl8.5 System identified is CPU x86_64; Platform is unix; OS is Linux and Version is 3.10.0-1127.18.2.el7.x86_64 Environment selected is CPU x64_64; Platform unix; OS Linux64 and Operating System Linux64 MIDASBASE = /MIDAS and MIDAS_LIBRARY = /MIDAS/TclHttpd/Linux64 PATH = /MIDAS/bin_Linux64:/MIDAS/TclHttpd/Linux64:/MIDAS/Linux/bin64:/usr/lib64/qt-3.3/bin:/home/npg/perl5/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/npg/.local/bin:/home/npg/bin loading /MIDAS/tcl/pkgIndex.tcl Setting up access for Common packages extended auto_path /MIDAS/TclTkpackages/tcllib/1.11 packages base64=2.4 md5=2.0.7 1.4.4 Setting up access for MIDAS SOAP packages Loading TclHttpd server packages Setting up access for MIDAS packages Computer Name = vplxc7.home; Temp Directory = /tmp/tcl2700 package limit is not available: can't find package limit Running with default file descriptor limit package setuid is not available: can't find package setuid Could not change to user 50 group 50: not owner /debug user "debug" password "jbmtrzjao7nu" httpd started on port 8015 Cannot use /MIDAS/config/TclHttpd/vplxc7.home@8015/startup.tcl Custom startup from /MIDAS/config/TclHttpd/vplxc7.home/startup.tcl FEBEXAccessClient provided created namespace ::FEBEX created namespace ::febexU loading registerdefinitions ModuleMenu 0; LinkMenu 0 1 2 3; BoardMenu 0 1 2 3 4 5 6 7 8 9; ChannelMenu 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 global - module = 0; link = 0; board = 0; channel = 0 ::FEBEX - module = 0; link = 0; board = 0; channel = 0 loaded registerdefinitions FEBEX Access package 1.0 /FEBEXAccessServer /DataBaseAccessServer loading NetVarServer1.0 /NetVarService /SigTaskService Loaded MemSasAccess /SpectrumService /TapeServer /DataAcquisitionControlServer DefineMessage unknown Run Control Server Implementation for FEBEX RunControl loaded loading Html/RunControl/implementation.tcl RunControl loaded loading Html/FEBEX/RunControl/implementation.tcl for namespace :: Options saved to EXPERIMENTS/FEBEX/Options/vplxc7.home Options restoring from EXPERIMENTS/FEBEX/vplxc7.home/2021Oct28-11.38.20 DB create Node EXPERIMENTS/FEBEX/Options/vplxc7.home Options restored from EXPERIMENTS/FEBEX/Options/vplxc7.home Options saved to EXPERIMENTS/FEBEX/Options/vplxc7.home ReadRegister failed: Name=NetVar.EXEC.ID; Code= 0x10004; Info= Register name does not exist Created UI registers ReadRegister failed: Name=NetVar.FEBEX_PexorEnable; Code= 0x10004; Info= Register name does not exist Created FEBEX UI registers FEBEX RunControl loaded Completed custom startup from /MIDAS/TclHttpd/Html/FEBEX/RunControl/stats.defn.tcl (5) Load the data acquisition program. Start using /MIDAS/Linux/startup/febex Note that any existing instance of the DA program is removed. #!/bin/csh -f # umask 0 if (! $?MIDASBASE) setenv MIDASBASE /MIDAS echo tidy up killall ${MIDASBASE}/Data_Acq/bin/Linux64/FEBEXExecV1 setenv PATH ${MIDASBASE}/Linux/bin64:${MIDASBASE}/Linux/bin:${PATH} setenv LD_LIBRARY_PATH ${MIDASBASE}/Linux/lib64:${MIDASBASE}/lib_Linux64 setenv MIDAS_MEMSAS_PORT 0 # # define netints and access registers # echo "Defining NetVars..." netint HasBeenConfigured 0 # netstring TS_Server "lyserv" netstring TS_Server "localhost" netint Output_BufferSize 64 # note TDR format netint Format_Option 4 # netint Format_Option 3 netint Xfer_Option 3 netint Xfer_NoBlock 2 netint Xfer_Overlap 0 netint Xfer_Priority 0 netint DACQ_TxInit 1 netint DACQ_StatsTime 5 netint DACQ_PushEnable 60 netint DACQ_FlushEnable 60 netint DACQ_PollTicks 10000 netint FEBEX_PexorEnable 1 netint FEBEX_Data_In_Enable 0 netint FEBEX_Data_Out_Enable 0 netstring FEBEX_DataBase "/MIDAS/Linux/startup/FEBEXData" netstring FEBEX_DataInFile "f0.dat" netstring FEBEX_DataOutFile "OutDec24" # format = 0 => original MBS (HS) format # format = 1 => JL format netint FEBEX_DataFormat 1 netint FEBEX_Do_DataRead 1 netint FEBEX_Do_DataFormat 1 echo "Loading data acquisition program..." nice ${MIDASBASE}/Data_Acq/bin/Linux64/FEBEXExecV1 # # sleep 100000000 Typical startup output is: tidy up /MIDAS/Data_Acq/bin/Linux64/FEBEXExecV1: no process found Defining NetVars... Loading data acquisition program... FEBEX Data Acquisition Program Release 1 Build Dec 31 2021 17:17:56 starting Built without pthreads Creating NetVars Output buffer length = 65504; format option = 4; transfer option = 3 EB transfer option = 3 NetVars created and initialised Data Acquisition task has PID 3070 Statistics thread created Stat/Rate creation thread created Heartbeat thread created Installing signal handlers Done FEBEX_init febex_init_connection 1 0 0 FEBEX_DataBase /MIDAS/Linux/startup/FEBEXData: FEBEX_DataIn_File f0.dat: FEBEX_DataOutFile OutDec24: 0, SFP id: 0 slaves 1 0, SFP id: 1 slaves 0 0, SFP id: 2 slaves 0 0, SFP id: 3 slaves 0 Completed FEBEX_init_connection Heartbeat thread starting Stat/Rate creation thread starting Statistics thread starting FEBEX Data Acquisition now all ready to start SIGBUS, SIGSEGV and SIGPIPE traps setup (6) Load the MIDAS Data Storage Server (if required) Start using /MIDAS/Linux/startup/TapeServer echo "Tidy up" killall -s9 master killall -s9 stats killall -s9 driver killall -s9 linkTCP echo "Starting Tape Server" if (! $?MIDASBASE) setenv MIDASBASE /MIDAS if (! $?MIDASTSBASE) setenv MIDASTSBASE ${MIDASBASE}/TapeServer/Linux64 setenv MIDASTSBASE ${MIDASBASE}/config/TS_10205 cd ${MIDASBASE}/TapeServer/Linux64 ${MIDASBASE}/TapeServer/Linux64/master & sleep 1000000 # echo startup complete # The Configuration file used is /MIDAS/config/TS_10205/TS_configuration (see environment variable MIDASTSBASE above) #device configuration information # any line starting with a # is a comment and is ignored stats ./stats # devices available - list ends with a null line or line starting with a & # format class_name device_name driver_task_path_name # class_name MUST be one of dlt, exabyte, scsitape, sink # driver_task_path_name normally is omitted #dlt /dev/nst0 ./driver file /dev/file/0 ./driver sink /dev/null/0 ./driver & #data link configuration information - list end with a null line # format link_task_path_name ./linkTCP & #program options - list end with a null line msg_reporting_level 0x0180fff8 # use 0x0080fff8 to enable msg logging msg_logging_level 0xfff8 tapeserver_options 0 # use 0x0080fff8 to enable msg logging # default for following is 16Kbytes - both MUST be the same at present data_buffer_size 64 tape_block_size 64 disc_file_size 2000 # file_path_base /TapeData & #end of information Note that the option file_path_base should be tailored to your system. /TapeData can be a NFS mount point to a location in a disc storage array. Typical startup output is: Tidy up master(1825): Operation not permitted Starting Tape Server [1] 3766 MIDAS Tape Server: Message logger not contacted. MIDAS Tape Server: MIDAS Tape Server Build Feb 4 2021 11:39:45 MIDAS Tape Server: Unable to change scheduling priority - Permission denied MIDAS Tape Server: Using default startup MIDAS Tape Server: Configuration: UDP port = 10205, SHM key=10205. MIDAS Tape Server: File mapped object /SHM_10205 of size 1331104 created MIDAS Tape Server: Shared memory ID is 3 MIDAS Tape Server: Shared memory segment located at address 7f8e4977a000. MIDAS Tape Server: Configuration file used - /MIDAS/config/TS_10205/TS_configuration MIDAS Tape Server: Stats task ./stats MIDAS Tape Server: Using device file /dev/file/0 ./driver MIDAS Tape Server: Using device sink /dev/null/0 ./driver MIDAS Tape Server: Data link ./linkTCP MIDAS Tape Server: Message reporting level = 0x180fff8 MIDAS Tape Server: Message logging level = 0xfff8 MIDAS Tape Server: Tape Server Options = 0x2 MIDAS Tape Server: File device path base = /TapeData MIDAS Tape Server: Data buffer size = 65536 MIDAS Tape Server: Tape block size = 65536 MIDAS Tape Server: File mapped object /SHM_110205 of size 4195880 created MIDAS Tape Server: Shared memory ID is 3 MIDAS Tape Server: Shared memory segment located at address 7f8e482be000. MIDAS Tape Server: File mapped object /SHM_210205 of size 3100 created MIDAS Tape Server: Shared memory ID is 3 MIDAS Tape Server: Shared memory segment located at address 7f8e498ee000. MIDAS Tape Server: Capabilities restored. MIDAS Tape Server: Master global area initialised. MIDAS Tape Server: Stats task has pid 3768 MIDAS Tape Server: Driver process for /dev/file/0 has pid 3769 MIDAS Tape Server: Driver process for /dev/null/0 has pid 3770 MIDAS Tape Server: Link task 0 has pid 3771 MIDAS Tape Server: Starting the RPC interface MIDAS Tape Server: Created RPC Program 28000205 Version 4 on UDP port 10205. MIDAS Tape Server: Entering server loop MIDAS Tape Server: MIDAS Tape Server now available on UDP port 10205. MIDAS Data Link (3771): Message logger not contacted. MIDAS Data Link (3771): MIDAS Tape Data Link Build Feb 4 2021 MIDAS Data Link (3771): Started with args 10205 MIDAS Tape Driver (3770): Message logger not contacted. MIDAS Tape Driver (3770): MIDAS Tape Driver Build Feb 4 2021 MIDAS Tape Driver (3770): Started with args 1 10205 MIDAS Tape Driver (3770): Configuration: driver=1, key=10205. MIDAS Data Link (3771): Configuration: SHM key=10205, TCP port = 10305, Data Stream = 1 MIDAS Data Link (3771): File mapped object /SHM_10205 of size 1331104 created MIDAS Tape Driver (3770): File mapped object /SHM_10205 of size 1331104 created MIDAS Tape Driver (3770): Shared memory ID is 3 MIDAS Tape Driver (3770): Shared memory segment located at address 7fea8bf39000. MIDAS Data Link (3771): Shared memory ID is 3 MIDAS Data Link (3771): Shared memory segment located at address 7ff4ce6ec000. MIDAS Data Link (3771): Starting the network interface MIDAS Tape Driver (3770): Using device /dev/null/0 of type sink. MIDAS Data Link (3771): TCP socket receive buffer was 87380 - now 425984 MIDAS Data Link (3771): TCP socket send buffer was 16384 - now 425984 MIDAS Data Link (3771): MIDAS Data Link thread 0 using TCP port 10305. MIDAS Data Link (3771): Entering server loop MIDAS Data Link (3771): thread 0 listening on port 10305 MIDAS Tape Driver (3769): Message logger not contacted. MIDAS Tape Driver (3769): MIDAS Tape Driver Build Feb 4 2021 MIDAS Tape Driver (3769): Started with args 0 10205 MIDAS Tape Driver (3769): Configuration: driver=0, key=10205. MIDAS Tape Driver (3769): File mapped object /SHM_10205 of size 1331104 created MIDAS Tape Driver (3769): Shared memory ID is 3 MIDAS Tape Driver (3769): Shared memory segment located at address 7f253769c000. MIDAS Tape Driver (3769): Using device /dev/file/0 of type file. MIDAS Tape Statistics: Message logger not contacted. MIDAS Tape Statistics: MIDAS Tape Statistics Build Feb 4 2021 MIDAS Tape Statistics: Started with args 10205 MIDAS Tape Statistics: Configuration: SHM key=10205 MIDAS Tape Statistics: File mapped object /SHM_10205 of size 1331104 created MIDAS Tape Statistics: Shared memory ID is 3 MIDAS Tape Statistics: Shared memory segment located at address 7fe219f88000. Create the directory /TapeData and ensure it is writable by the data acquisition ID. The software is now ready to go. Using a Web Browser use a URL to LIPC-1:8015