LCLS Controls:  Running XAL via Launcher … and more


XAL has been tested at SLAC running from Linux RHEL. The following instructions run XAL from the LCLS reference afs area, /afs/slac/g/lcls/xal/xaldev.

 

Note: the xal environment setup has changed since the original writing of this document. This document has been updated with modified paths and instructions.  If you have already run xal or xalLauncher, please take the following steps in order to remove any existing preferences (default file paths) for xal:

 

> cd ~/.java/.userPrefs

> rm –r gov

 

Now follow the instructions below to configure and run xal.

 

- Environment setup

1) Place “source /afs/slac/g/lcls/epics/config/epicsReset.<csh or bash>” in your .cshrc, .bashrc,or .login, in order to have access to our lcls environment variables and paths. (This will reset any already set envs like PEPII or SPEAR: reset all paths)

 

Alternatively, you can “source /afs/slac/g/lcls/epics/config/epicsSetup.<csh or bash>” if you don’t want any existing paths to reset (less commonly used).

 

2) If you don’t have a linux workstation, from a tera term (Windows) or xterm,

> ssh -X<linux host>

 

Note that some of the noric linux hosts tested already have the ports we are using for CA server and repeater in use by other processes. Our lcls development host,lcls-dev, has the assigned CA ports available; however it is in the “InternetFree Zone” (IFZ) and cannot make the proper SNS RDB connections required by some xal applications which use pvlogger.

 

- Run xal

3) Run the script “xal” in order to execute the xal Launcher application which can launch all other xal applications.

Note that the path for script xal, /afs/slac/g/lcls/xal/script, is in $PATH if you have sourced either of the files in 1) above.

 

> xal

 

 

4) If you don’t see any applications loaded into the Launcher,

 

Edit | Preferences on the Launcher and navigate to:

/afs/slac/g/lcls/xal/script/applauncher/default.launch

Click “Make Default”, “Close”

File | Exit out of Launcher, then relaunch it:

> xal

 

5) Double click on any application in the Launcher in order to launch it.

 

6) Launch the ApplicationViewer from the Launcher in order to view all the applications running! You may also Force Quit any application from the ApplicationViewer.

 

7) When you are done running, please always exit out of all launched applications and File |Quit the Launcher.

 

 

- Various xal application prompts

 

When running the virtual accelerator double click on virtual accelerator in Launcher-

 

1.   Set the default path to the accelerator file:

 

Accelerator | Load Default Accelerator

In “Set the Default Optics” dialog, browse to:

/afs/slac/g/lcls/xal/xaldev/xal_xmls/main.xal (or any other desired)

Click “Make Default”, “Close”

 

After establishing the accelerator file, now you can choose any sequence via Accelerator | Sequence menu.

 

2.   To navigate to accelerator / probe files:

 

Click “Probe File…” and navigate to:

/afs/slac/g/lcls/xal/xaldev/xal_xmls, then choose one that matches the Accelerator | Sequences selected above. (For ex, if MEBT was chosen as the sequence, choose “MebtEntrance-adapt-envelope.probe)

 

3.   Click “Start VA” and set the default path to the portable CA server script: The first time, after removing preferences (blue text above), you’ll get a prompt to enter the path to the PCAS launch script. First change Files of Type: to “All Files”. Then “Browse” to:

 

/afs/slac/g/lcls/tools/script/sns_pcasRun (select “All files” in the dialog in order to view)

“OK”

  

Notes:

·       Only start one virtual accelerator on any one given linux host. Make sure there is no other virtual accelerator in ApplicationViewer prior to launching.

 

·       Unfortunately, the console window is not viewable when the virtual accelerator (VA) is started from the Launcher. To see the console window (to make sure you have the correct CA connectivity), you can run virtual accelerator (or any app, for that matter that has a script in $XAL/script/ dir ) from outside the Launcher by typing “virtualaccelerator” ($XAL/script is in $PATH)

 

 

Other prompts that may occur for xal apps:

To connect to the SNS RDB when prompted via “Connection Dictionary” dialog, “Browse” to:

 

/afs/slac/g/lcls/xal/config/global_db_prod.properties, and

“Make Default” to eliminate further prompting.

“Close”

 

Also, some of the SNS wirescan data files from the SNS website are here:

 

/afs/slac/g/lcls/xal/work/output/wirescandata/*.txt

The data files in this ..work/output directory can be used as input to both the wireanalysis and the aoc applications.

 

In the wireanalysis application you choose the Add New Wirescan File button to load a data file.

 

In the aoc application, you need to first load the Accelerator, then choose the Beam Line(MEBT or CCL), then choose Mode | Offline.  In the off-line mode, the 'Acquire WS data' button will bring up a file chooser dialog where you can choose the data file you want. You must choose a data file from the Beam Line section you chose earlier (the data files in ...work/output are from either MEBT or CCL1). If the data file is from the wrong beam-line there will be an error reading the file. Choose a file starting with MEBT_ or CCL_corresponding to your Beamline choice.

 

- Xal application preferences

Some of the default directories and filenames established in the above prompts are kept in java preference files – these can be found (when running on linux hosts), here:

~/.java/.userPrefs/gov/sns/

 

For example, the preference that points to the global_db.properties file is here:

~/.java/.userPrefs/gov/sns/tools/database/

 

If you ever want to remove all of these preferences in order to establish new preferences,

> cd ~

> \rm –r .java/.userPrefs/gov

  

 

 


LCLS Controls | EPICS at SLAC| SLAC Computing | SLAC Networking | SLAC Home

Contact: Debbie Rogind
Last Modified:  Jan  31, 2006