Table of Contents

Overview

The FACET facility is controlled by a combination of the VMS-based SCP control system, and EPICS. EPICS controls are centered in the new experimental region in LI20, and include these subsystems: profile monitor, collimator/motion, bunch length monitor, wire scanner and event. Magnet, bpm and toroid subsystems in the new LI20 region are controlled by the SCP. A single EPICS controlled profile monitor will eventually reside in LI10.
All other FACET controls are SCP-based. 

This document is a basic overview FACET control system physics development guide.

For complete information, detailed instructions and examples please refer to the "MATLAB Programmer's Guide for FACET physicists" programming_guide_matlab_facet.pdf:


I. Logging into the FACET control system network

The FACET EPICS control system resides on its own MCC-based private network, parallel to and separate from the LCLS network.  The FACET server that will be used for physics work is:

To log into the FACET network from a linux terminal session:

an fyi: the FACET and LCLS directory structures have a parallel naming convention:


II. FACET edm displays: facethome

facethome is the toplevel edm display for the FACET accelerator. It is similar to lclshome, a grid showing areas and subsystems, with clickability into the various displays.

To run facethome from a terminal session on the facet network:

To run facethome from a an MCC opi:


III. SCP

To run a SCP from a terminal session window:

To run a SCP from facethome:

Example: displaying a Design TWISS plot


IV. Matlab

For a complete overview, detailed instructions and examples please see the "MATLAB Programmer's Guide for FACET physicists"

Environment setup
After you log onto a Linux machine using the fphysics account, you'll need to customize the environment for matlab. Once Mike Z. has set up your user directory under fphysics as described in II. above, add these commands to your /home/fphysics/userid/ENVS file, and they will be automatically invoked every time you log in. Note: All strings are case-sensitive.

Starting matlab

Directories

getSystem() function
Within a matlab script you can use the getSystem function to determine the accelerator system defined in the current working environment. This is useful for writing scripts that can be used for multiple accelerator systems, with conditional actions depending on accelerator.

\[system,accelerator\] = getSystem();

Return values are:

FACET

system = SYS1, accelerator = FACET

LCLS

system = SYS0, accelerator = LCLS

NLCTA

system = SYS4, accelerator = NLCTA

CVS
All shared matlab scripts are stored in the version control system, CVS. LCLS and FACET matlab scripts share their CVS repository, so there are many LCLS-specific scripts to be found in the toolbox and src directories, alongside the FACET and so-called "accelerator-agnostic" versions. For much more info see the Programmer's Guide.


V. BSA: Beam Synchronous Acquisition

For a complete overview, detailed instructions and examples please see the "MATLAB Programmer's Guide for FACET physicists"

Here is a short description:

A LCLS event system has been setup to read devices synchronous with beam crossing, such as BPMS and toroids. FACET beam synchronous acquisition will interface with both EPICS and the VMS-based SCP. Implementation of this interface is currently in process. The BSA system will be usable from within Matlab. Note that this is not implemented for image data collection, which is described in a separate section of the Programmer's Guide.

Basically, the steps for using BSA are:


VI. AIDA: Accelerator Integrated Data Access

http://www.slac.stanford.edu/grp/cd/soft/aida/

For a complete overview, detailed instructions and examples please see the "MATLAB Programmer's Guide for FACET physicists"

Here is a short excerpt:

To obtain control system names and values, AIDA is accessible from the linux command line, via aidaWeb https://seal.slac.stanford.edu/aidaweb, through matlab and other language interfaces.

For FACET, the AIDA interface will provide SLC model data, .... (BPM? etc.?)

Basically, to get data from AIDA, use the function
aidaget(aida_name, type, params)


VII. Useful links

labCA commands

http://www.slac.stanford.edu/~strauman/labca/manual/node2.html

labCA tutorial

https://confluence.slac.stanford.edu/download/attachments/37130/labca_presentation.pdf

AIDA main page

http://www.slac.stanford.edu/grp/cd/soft/aida

AIDA web

https://seal.slac.stanford.edu/aidaweb

EPICS Home Page

http://epics.aps.anl.gov/epics/

CVS commands

http://www.cvsnt.org/wiki/CvsCommand

CVS repository

http://www.slac.stanford.edu/cgi-wrap/cvsweb/matlab/toolbox/?cvsroot=LCLS

Device database (control system names)

https://oraweb.slac.stanford.edu/apex/slacprod/f?p=116