Search/Navigation:
Related:
SLAC/EPP
/HPS Public
Jefferson Lab/Hall B
/HPS Run Wiki
S30XL-LESA/LDMX
...
...
These notes are from an installation by Pelle and Hovanes on hpstracker machine in group C at SLAC.
The epics setup for HPS has been checked installation is to run on the zed board but is developed mainly on the hps tracker machine in group C.
The development is based from the standard epics_example at:
/home/tracker/pelle/epics/example
and is currently on SVN:
svn://svn.freehep.org/hps/epics/trunk
NOTE: I should fix the SVN so that I can commit our SVT code separately from the IOC code which enables the transition between the arm and intel environments to be smooth. Right now I only checked out the interesting folders (src and db stuff) into the hpstracker and work on those ignoring the setup scripts that was originally checked in from the arm setup on the zed board.
Setup EPICS environment (part of the DAQ setup script):
$ cd /u1/software/software_new
$ source setup_env.csh
Go to the IOC base directory:
$ cd /home/tracker/pelle/epics/example/
the hvCaenApp. There are many dependencies since it contains support to control different types of hardware.
Started on hpstracker with this
$ rpm -qa
net-snmp-libs-5.3.2.2-20.el5
net-snmp-libs-5.3.2.2-20.el5
Install needed net-snmp devel libraries.
Copy epics layer snmp-nscl-1.0.RC6.tgz from jlab machine to /u1/packages
Install net-snmp SNMP layer manually, not found by yum, in /u1/packages/net-snmp
Problem building /u1/packages/support/snmp-nscl-1.0.RC6.
Had to manually include the net-snmp files in snmpApp/src/Makefile by changing
USR_CFLAGS += `net-snmp-config --cflags`
to
USR_INCLUDES += -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -I. -I/u1/packages/net-snmp/builds/net-snmp-5.7.2.1/include
Note that this means that the other cflags are are not given to the compiler but it seems to work. Not clear why this workaround was needed.
In order to compile the needed libraries we needed to add re2c. Get it from the epel repo rpm copied from Hovanes:
epel-release-5-4.noarch.rpm
sudo rpm -ivh epel-release-5-4.noarch.rpm
sudo yum install re2c
Now install the support libraries in /u1/packages/support/.
Install these in order, updating the configure/RELEASE information to my installation for each one:
drwxrwxr-x 10 tracker 55 4096 Aug 13 07:42 ipac-2.11/
drwxr-xr-x 12 tracker root 4096 Aug 13 07:50 seq-2.1.12/
drwxrwsr-x 24 tracker 204 4096 Aug 13 07:55 asyn4-21/
drwxrwxr-x 8 tracker 104 4096 Aug 13 07:58 busy-1-6/
drwxrwxr-x 8 tracker 104 4096 Aug 13 08:00 sscan-2-9/
drwxrwxr-x 10 tracker 104 4096 Aug 13 08:03 std-3-2/
drwxrwxr-x 10 tracker 104 4096 Aug 13 08:04 autosave-5-1/
drwxrwxr-x 9 tracker 104 4096 Aug 13 08:06 calc-3-2/
There are two device drivers that needs to be installed. Copy this two App drivers from jlab.
LVMPODApp.tgz
HVCAENx527App.tgz
Install these in: $ cd /home/tracker/pelle/epics/example/iocBoot/iocmyexampleApp
$./st.cmd
This should run the epics IOC and you should see output to the screen where it queries the socket for information. Depending on the debug level (see below) there might be lots of output here. If there is no control server running or it's not configured properly (see below) you should see it retrying to connect.
Power the FEB
Start the control server and GUI
$ cd /u1/software/software_new
$ source setup_env.csh
$ ./bin/frontEndTestGui &
If the IOC is running (if not start it) you should see that the IOC now gets information from the control server.
NOTE: if you don't see a connection you might need to change the TCP/IP settings (see below).
Setting up for editing or running the SVT slow control GUIs
Setup MEDM environment (part of the DAQ setup script):
$ cd /u1/software/software_new
$ source setup_env.csh
Go to the SVT MEDM directory:
drivers
Add to drivers/configure/RELEASE
IPAC=$(EPICS_SUPPORT)/ipac-2.11
SEQ=$(EPICS_SUPPORT)/seq-2.1.12
ASYN=$(EPICS_SUPPORT)/asyn4-21
BUSY=$(EPICS_SUPPORT)/busy-1-6
SSCAN=$(EPICS_SUPPORT)/sscan-2-9
STD=$(EPICS_SUPPORT)/std-3-2
AUTOSAVE=$(EPICS_SUPPORT)/autosave-5-1
CALC=$(EPICS_SUPPORT)/calc-3-2
Untar and compile LVMPODApp.tgz
Untar HVCAENx527App.tgz
To install HVCAENx527App.tgz we need to add support for caen. Copy binaries caen.tgz from Hovanes to /u1/packages/caen.
Go into the drivers/HVCAENx527App/src/ and update Makefile with:
hscaenet_DIR += /u1/packages/caen/sy1527/lib/linux-x86_64
caenhvwrapper_DIR += /u1/packages/caen/sy1527/lib/linux-x86_64
Compile HVCAENx527App
Now copy the hvCaenApp to did in parallel to my App: $ /home/tracker/pelle/epics/medm_hps
This directory is also in SVN at
svn://svn.freehep.org/hps/epics/trunk/medm_hps
...
example/hvCaenApp
Update the pelle/epics/example/configure/RELEASE file in my example by adding:
EPICS_SUPPORT=/u1/packages/support
DEVSNMP=$(EPICS_SUPPORT)/snmp-nscl-1.0.RC6
IPAC=$(EPICS_SUPPORT)/ipac-2.11
SEQ=$(EPICS_SUPPORT)/seq-2.1.12
ASYN=$(EPICS_SUPPORT)/asyn4-21
BUSY=$(EPICS_SUPPORT)/busy-1-6
SSCAN=$(EPICS_SUPPORT)/sscan-2-9
STD=$(EPICS_SUPPORT)/std-3-2
AUTOSAVE=$(EPICS_SUPPORT)/autosave-5-1
CALC=$(EPICS_SUPPORT)/calc-3-2
EPICS_DRIVERS=/home/tracker/pelle/epics/drivers
do make clean; make in pelle/epics/example
Then go into hvCaenApp/src/Makefile and change:
#USR_INCLUDES += -I/apps/Trolltech/Qt/include/
to
USR_INCLUDES += -I$(QTDIR)/include
#hscaenet_DIR += $(CLAS)/clon/src/caen/CAENHVControlSoftware-1.1.2/lib
#caenhvwrapper_DIR += $(CLAS)/clon/src/caen/CAENHVControlSoftware-1.1.2/lib
#QtSql_DIR += /apps/Trolltech/Qt/lib/
to
hscaenet_DIR += /u1/packages/caen/sy1527/lib/linux-x86_64
caenhvwrapper_DIR += /u1/packages/caen/sy1527/lib/linux-x86_64
QtSql_DIR += $(QTDIR)/lib
Note, need QT 4.7, failed on QtSql for default QT-3.3
Need to set new env variable to compile:
setenv EPICSB_DRIVERS
...
var mySubDebug 0
Compiling source and DB
$ cd /home/tracker/pelle/epics/example/myexampleApp
$ make
Interesting files for development:
EPICS Db: /home/tracker/pelle/epics/example/myexampleApp/Db/
dbSVT.db: controls the polling from the control server
dbFebTemp.db: FEB temperature records
dbHybLV.db: hybrid low voltage records
dbHybT.db: hybrid temperature recordsdrivers
Compile hvCaenApp
Got compiler error and had to change casting issue on this compiler in src/DetChannelsWaveform.cc.
That fixed it.
Create the configure file using a dummy example (there is a way to do this without creating a complete example but this works):
makeBaseApp.pl -b $EPICS_BASE -t example
Edit configure/RELEASE by adding:
EPICS_SUPPORT=/u1/packages/support
DEVSNMP=$(EPICS_SUPPORT)/snmp-nscl-1.0.RC6
Then compile: make clean; make
Make a new IOC directory for the hvCaen App from /home/tracker/pelle/epics/example/myexampleApp/src/dbSubExample.c: contains backend code for parsing and delegating communication with the control server.
client_util.c: Utility functions to communicate with control server and parsing/creating of xml strings
makeBaseApp.pl -b $EPICS_BASE -t ioc -i (name: iochvCaen)
cd iocBoot/iochvCaen/
copy svt-voltage.cmd there and run it.
For now it fails because MPOD defined in the sqlite db file is not connected.
After loading svt-voltage.cmf should have MPOD variables:
B1-1-TOP:X
Label explanation:
B1-1-TOP:912 -> slot 9 channel 12 in MPOD
B1-1-TOP is the label for the crate.
There is also channels labeled according to hps for FEB and HV power which is what is used for control in GUIs and what not.