Software Installation

In these instructions replace [MIDASBASE] with the base of your software installation (default is /MIDAS). Set the environment variable MIDASBASE to [MIDASBASE].

See the document Installation of the MIDAS Web Services applications which contains full information for downloading and installating the various software services

Download a complete archive of the MIDAS directory containing all the software needed from here
It is recommended that you unpack this archive (tar -zcf ) 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_DigitalDataAcq_25Jul14
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.



NOTE
====
   The software was installed and tested on a Linux workstation named nnlxp1
   In the directories /MIDAS/config/TclHttpd   and  /MIDAS/DB/EXPERIMENTS/CAEN/Options
    change nnlxp1 to the output from uname -n (or /bin/hostname) on your workstation

You will need to install CAEN drivers for your hardware interface and at least one CAEN library.
These can be obtained from the CAEN website; however you will find the current versions in /MIDAS/CAEN.
The PCI driver for the hardware interface is A2818Drv-1.17
The essential library is CAENVMELib-2.41
Also the library CAENComm is required if you need to use the CAEN utility for upgrading module firmware.

You will find that a script for loading the hardware driver suitable for use at boot time is in /MIDAS/Linux/startup/caen.

Having installed the hardware driver and connected the workstation to the VME crate you can test the installation
Go to /MIDAS/CAEN/Test and run a.out
Look for CAENVME_Init connected to V2718
./a.out -a 32100000 will also perform some VME accesses to a digitizer via VME with base address 0x32100000

Load the MIDAS TclHttpd software. This is a web server containing the MIDAS servers needed. Start using either /MIDAS/Linux/startup/HTTPD or /MIDAS/TclHttpd/Linux64/TclHttpd-server
Typical startup output is:



[npg@nnlxp1 ~]$ /MIDAS/Linux/startup/HTTPD
tidy up
tclsh8.5: no process killed
System identified is CPU x86_64; Platform is unix; OS is Linux and Version is 2.6.32-431.20.3.el6.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:/usr/local/bin:/usr/bin:/bin
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 "r06opzeie4kp"
httpd started on port 8015

Cannot use /MIDAS/config/TclHttpd/nnlxp1@8015/startup.tcl
Custom startup from /MIDAS/config/TclHttpd/nnlxp1/startup.tcl
CAENVME software release 2.41.0
/VMEAccessServer
/DataBaseAccessServer
/NetVarService
/SigTaskService
Loaded MemSasAccess
/SpectrumService
/TapeServer
loading tcl/CAENRunControl.tcl for namespace ::
/DataAcquisitionControlServer
DefineMessage unknown
Run Control Server Implementation for CAEN
RunControl loaded
loading Html/RunControl/implementation.tcl for namespace ::
CAEN RunControl loaded
loading Html/CAEN/RunControl/implementation.tcl for namespace ::
RunControl loaded /MIDAS/TclHttpd/Html/CAEN/RunControl/sys.V1724.tcl
RunControl loaded /MIDAS/TclHttpd/Html/CAEN/RunControl/sys.DT5780.tcl
RunControl loaded /MIDAS/TclHttpd/Html/CAEN/RunControl/sys.V1720.tcl
loading sys.V1740.tcl
RunControl loaded /MIDAS/TclHttpd/Html/CAEN/RunControl/sys.V1740.tcl
loading sys.V1751.tcl
RunControl loaded /MIDAS/TclHttpd/Html/CAEN/RunControl/sys.V1751.tcl
ReadRegister failed: Name=NetVar.EXEC.ID; Code= 0x10004; Info= Register name does not exist
created SigTask registers 0 0  0 0
Created UI registers
Set_V1724_Options
Set_DT5780_Options
Set_V1720_Options
Set_V1740_Options
Set_V1751_Options
CAEN RunControl loaded
Completed custom startup from /MIDAS/TclHttpd/Html/CAEN/RunControl/stats.defn.tcl

Load the data acquisition program. Start using /MIDAS/Linux/startup/EXEC
Typical startup output is:




[npg@nnlxp1 startup]$ /MIDAS/Linux/startup/EXEC
tidy up
Defining NetVars...
Loading data acquisition program...

CAEN Data Acquisition Program Release 6.200614 starting

Built without pthreads

Creating NetVars
Output buffer length = 65504; format option = 3; transfer option = 3
NetVars created and initialised
Data Acquisition task has PID 18506
Statistics thread created
Stat/Rate creation thread created
Heartbeat thread created
Installing signal handlers
Done
CAENVME_SwRelease returns code 0
CAENVME software release 2.41.0
Stat/Rate creation thread starting
Heartbeat thread starting
Statistics thread starting
SemStart: semaphores initialised OK
CAEN setup complete
Spectra table initialised
2D Spectra table initialised
Data Acquisition using storge server localhost on port 0
Initialising communication with storage server
Setting Transfer Block Size 65536
Setting Transfer Mode 3
Setting Overlap Mode 0
Setting Blocking Mode 0
Setting nice 0
TCP transfer library version 3.12
TCP socket send buffer was 16384 - now 249856
TCP socket receive buffer was 87380 - now 249856
TCP socket created OK - now connecting to localhost port 10305
Connected to localhost port 10305
CAEN Data Acquisition now all ready to start
SIGBUS, SIGSEGV and SIGPIPE traps setup

Load the MIDAS tape server Start using /MIDAS/Linux/startup/TapeServer
Typical startup output is:




[npg@nnlxp1 ~]$ /MIDAS/Linux/startup/TapeServer
Tidy up
master(10424): Operation not permitted
MIDAS Tape Server: MIDAS Tape Server terminating.
MIDAS Tape Driver (18570): Received TERM signal; exiting.
MIDAS Tape Driver (18571): Received TERM signal; exiting.
MIDAS Data Link (18572): Received TERM signal; exiting.
Starting Tape Server
[1] 18579
MIDAS Tape Server: Message logger not contacted.
MIDAS Tape Server: MIDAS Tape Server Build February 14 2014
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 7f07b0893000.
MIDAS Tape Server: Configuration file used - /MIDAS/TapeServer/Linux64/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 = 0x6
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 7f07b0492000.
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 7f07b09fc000.
MIDAS Tape Server: Capabilities restored.
MIDAS Tape Server: Master global area initialised.
MIDAS Tape Server: Stats task has pid 18581
MIDAS Tape Server: Driver process for /dev/file/0 has pid 18582
MIDAS Tape Server: Driver process for /dev/null/0 has pid 18583
MIDAS Tape Server: Link task 0 has pid 18584
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 Tape Statistics: Message logger not contacted.
MIDAS Tape Statistics: MIDAS Tape Statistics Build February 14 2014
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 7fcd36275000.
MIDAS Tape Driver (18583): Message logger not contacted.
MIDAS Tape Driver (18583): MIDAS Tape Driver Build February 14 2014
MIDAS Tape Driver (18583): Started with args 1 10205
MIDAS Tape Driver (18583): Configuration: driver=1, key=10205.
MIDAS Tape Driver (18583): File mapped object /SHM_10205 of size 1331104 created
MIDAS Tape Driver (18583): Shared memory ID is 3
MIDAS Tape Driver (18583): Shared memory segment located at address 7f99ec449000.
MIDAS Tape Driver (18583): Using device /dev/null/0 of type sink.
MIDAS Data Link (18584): Message logger not contacted.
MIDAS Data Link (18584): MIDAS Tape Data Link Build February 14 2014
MIDAS Data Link (18584): Started with args 10205      
MIDAS Data Link (18584): Configuration: SHM key=10205, TCP port = 10305
MIDAS Data Link (18584): File mapped object /SHM_10205 of size 1331104 created
MIDAS Data Link (18584): Shared memory ID is 3
MIDAS Data Link (18584): Shared memory segment located at address 7f842ba91000.
MIDAS Data Link (18584): Starting the network interface
MIDAS Data Link (18584): TCP socket receive buffer was 87380 - now 249856
MIDAS Data Link (18584): TCP socket send buffer was 16384 - now 249856
MIDAS Tape Driver (18582): Message logger not contacted.
MIDAS Tape Driver (18582): MIDAS Tape Driver Build February 14 2014
MIDAS Data Link (18584): MIDAS Data Link thread 0 using TCP port 10305.
MIDAS Data Link (18584): Entering server loop
MIDAS Tape Driver (18582): Started with args 0 10205
MIDAS Data Link (18584): thread 0 listening on port 10305
MIDAS Tape Driver (18582): Configuration: driver=0, key=10205.
MIDAS Tape Driver (18582): File mapped object /SHM_10205 of size 1331104 created
MIDAS Tape Driver (18582): Shared memory ID is 3
MIDAS Tape Driver (18582): Shared memory segment located at address 7ffa7a39b000.
MIDAS Tape Driver (18582): Using device /dev/file/0 of type file.

Create the directory /TapeData and ensure it is writable by the data acquisition ID.

V Pucknell; STFC; Daresbury Lab   updated 27 July 2014