XAL Setup HOWTO for Linux-x86 at SLAC
·
LCLS AFS
Environment Setup
·
System
requirements:
1. J2SE 1.5 ($JAVAVER is set in /afs/slac/g/lcls/epics/config/epicsSetup.<shell>, sourced from /afs/slac/g/lcls/epics/config/epicsReset.<shell>)
/afs/ slac/g/lcls/epics/config/epicsSetup.<shell>.
·
Installing the SNS_CAS portable channel
access server for the Virtual Accelerator application
1. SNS_PCAS is installed in /afs/slac/g/lcls/epics/extensions/src/SNS_PCAS. The binary executable is installed in afs/slac/g/lcls/epics/extensions/bin/$EPICS_HOST_ARCH/sns_cas (from a change to the Makefile)
2. This executable is run programmatically by the XAL virtualaccelerator application using the sns_cas.exe script in its own directory (xaldev/gov/sns/apps/virtualaccelerator). The virtualaccelerator java source uses the following command line: sns_cas.exe start “filename” where the “filename” is the file created by the virtualaccelerator applications after the user has chosen an accelerator sequence. The file is a list of PVs the sns_cas must create .
#!/bin/bash
if [ $1 = 'start' ]
then
# $EPICS/extensions/bin/$EPICS_HOST_ARCH is
in path, so:
sns_cas -d2
-s0 -f=$2 -fout=pv_name.out
fi
if [ $1 = 'kill' ]
then
pkill
-u $USER sns_cas
fi
2. To build, from xaldev root directory, type ‘ant jar-ext’to re-pack all the external JAR files used by XAL; creates xal.jar.
3. Type ‘ant’ to build XAL frame work.
4. Type ‘ant build-services’ to build all XAL service modules.
5. Type ‘ant build-apps’ to build all applications (alternatively, you can build each application from its own directorywith ant). There are errors in several applications so it is necessary to build each app separately - I have only built the virtual accelerator at this point
6. Ready to run applications.
Note: You can type ‘ant help’ from the xaldev root dir to get a quick on-line help for many other available options.
·
Running
XAL application:
Refer to the
instructions in Running
XAL via applauncher
Alternatively,
1. To run an application such as orbit display, type ‘java –jar$XAL_HOME/build/jar/apps/orbitdisplay.jar’.
2. Some applications don’t have $CLASSPATH properly set in their JAR manifest. If this is the case, set $CLASSPATH to include the xal.jar and the application’s JAR file, and launch the application in the regular Java fashion (java gov.sns.apps…).
3. For SNS virtualaccelerator, the machine configuration and on-line model initialization files are located in the xaldev/xal_xmls directory.
4. To set up the default accelerator (for a user account), one can run the optics switcher application ‘java –jar $XAL_HOME/build/jar/apps/opticsswitcher.jar’.
Note: Need to allocate more memory (~100MB) for Java VM of running on-line model with hundreds of devices (e.g. ‘java –Xmx120m –jar …’ for 120MB of VM memory).
Contact: Diane Fairley or Debbie Rogind