...
Panel | |
---|---|
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.
...
- document is attached to this page
- click the paperclip near the upper lefthand corner of the screen, beneath the Confluence man logo
- click programming_guide_matlab_facet.pdf to view it
- also in /usr/local/facet/tools/matlab/programming_guide_matlab_facet.pdf
Anchor | ||||
---|---|---|---|---|
|
...
I. Logging into the FACET control system
...
The FACET EPICS control system resides on its own MCC-based a private network, parallel to and separate from the LCLS network. The FACET server that will be used for physics work is:
- facet-srv01
To log into the FACET network FACET server from a linux terminal session:
- Obtain a unix account if you don't have one already: http://www2.slac.stanford.edu/comp/slacwide/account/account.html
- Account setup :
- Please send Ken Brobeck an e-mail request that includes your unix username (with a cc: to your supervisor) to:
- add your unix ssh key to the fphysics account
- add your username to controls software unix groups to enable CVS access
- Your afs unix account must be added to the FACET and fphysics groups. Contact Ken Brobeck (x2558).
- Please send Ken Brobeck an e-mail request that includes your unix username (with a cc: to your supervisor) to:
- Login:
- Bring up a linux terminal window:
- from an MCC OPI or linux box click the terminal icon on the desktop
orOPI (MCC Control Room Workstation)- Click on taskbar icon "Facet Konsole"
- This will automatically log you into fphysics on facet-srv01
- On the OPI's the background color will be a light yellow to differentiate between LCLS and FACET
- On the OPI's the background color will be a light yellow to differentiate between LCLS and FACET
- From Linux (konsole/xterm), Windows (Secure CRT or XWin32) from Windows use Secure CRT or XWin-32
- Log into mcclogin with your unix account:
- ssh mcclogin
- From mcclogin, log into facet-srv01 as the fphysics account
- ssh fphysics@facet-srv01
- ssh fphysics@facet-srv01
- Log into mcclogin with your unix account:
- from an MCC OPI or linux box click the terminal icon on the desktop
- Enter the number corresponding to your username from the list. If you are not in the username list yet and would like be, then:
- enter 0 (for None). You will end up in directory /home/fphysics.
- mkdir username (username is your Unix login username)
- logout (log out to reset the list)
- log Log back in, as above:
ssh fphysics@facet-srv01 - Enter the number corresponding to your username
- You should now be in /home/fphysics/username (e.g. /home/fphysics/fred)
- Your environment should now be set up to run and develop matlab scripts.
- Bring up a linux terminal window:
- Optional: if you want to customized your environment further
- Create file /home/fphysics/username/ENVS
- ENVS will be sourced every time you log in
...
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.
...
- click the facethome icon on the display
...
III. SCP
SLC system principals principles and development documents:
The different kinds of Mode in the SCP http://www.slac.stanford.edu/%7Egreg/modes.html
Facet model preparation http://www.slac.stanford.edu/~mdw/FACET/doc/OnlineModel.txt
SLAC Online Modelling Programmers Guide http://www-mcc.slac.stanford.edu/%7Egreg/model_overall_pg.html
...
To run a SCP from a terminal session window:
- you will need obtain a VMS account and userid on MCC . To get one, please contact Ken Brobeck (x2558)if you don't have one already: https://slacspace.slac.stanford.edu/SITES/CONTROLS/Pages/MCCComputerAccount.aspx
- from your unix from your afs account on mcclogin, log into mcc and run the scp:
ssh mcc
scp xt userid (e.g. scp xt fred)
...
An example: displaying a Design TWISS plot from the SCP:
...
Anchor | ||||
---|---|---|---|---|
|
IV. Matlab
For detailed instructions on developing matlab scripts, and examples, please see the "MATLAB Programmer's Guide for FACET physicists", attached to this Confluence page.
...
Development environment note
Once you have done cvs checkout matlab/toolbox, the next time you login to facet-srv01 (as fphysics - see above #login section) your matlab working directory /home/fphysics/yourusername/matlab/toolbox will be prepended to the MATLABPATH environment variable. This means that when you (logged in as your username) run a script you're developing, your version will run instead of over the one in production.
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(); Wiki Markup
Return values are:
FACET | system = SYS1, accelerator = FACET |
LCLS | system = SYS0, accelerator = LCLS |
NLCTA | system = SYS4, accelerator = NLCTA |
...
Example display of Matlab support AO PVs:
CODE Examples
to be added shortly
- Buffered Data Acquisition example script:
- log into facet-srv01 as fphysics
- have a look at Mike Zelazny's script:
/usr/local/facet/tools/matlab/toolbox/EPICS_SLC_buffAcq_Example.m
EPICS PV visibility
- On the FACET network, PVs hosted by all FACET IOCs are available.
- In addition, LCLS PVs are available read-only via a PV gateway, which is configured in the default FACET epics setup. For more information see: https://confluence.slac.stanford.edu/display/ACCSOFT/LCLS+and+FACET+production+PV+gateways
#top
...
V. BSA: Beam Synchronous Acquisition - CURRENTLY UNDER CONSTRUCTION FOR FACET
For a complete overview, detailed instructions and examples please see the "MATLAB Programmer's Guide for FACET physicists", attached to this Confluence page.
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:
- Reserve an event definition
- Change default parameters
- Start data acquisition
- Release event definition
Examples
to be added shortly
more coming...
...
VI. AIDA: Accelerator Integrated Data Access - CURRENTLY UNDER CONSTRUCTION FOR FACET
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", attached to this Confluence page.
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.
Basically, to get data from AIDA, use the function
aidaget(aida_name, type, params)
- aida_name is the AIDA control system name, following the pattern <device>//<attribute>
- type (optional case-insensitive string)
- params (optional parameter=value pairs)
...
list of data sources
- see Individual Service Data Users Guides on [http://www.slac.stanford.edu/grp/cd/soft/aida/ ]
command line tools
- aidalist: [http://www.slac.stanford.edu/grp/cd/soft/aida/aida_ug.html#What ]
- aidaget, aidaset: [https://confluence.slac.stanford.edu/display/ACCSOFT/AIDA+Command-line+tools ]
matlab
- using aida in matlab programs: [http://www.slac.stanford.edu/grp/cd/soft/aida/aida_matlab.html ]
SLC Buffered Data Service
web interface
- AidaWeb: [https://confluence/display/ACCSOFT/AidaWeb+Help ]
...
VII. FAQs
Q: How do I log onto the channel access network?
A: While shared accounts are used, the command is:
ssh fphysics@facet-srv01
If that hangs, then ssh into mcclogin first:
ssh mcclogin
...
Q: I'm not listed when I "set_profile", what do I do?
A: Press "0" for none, then create your profile with:
cd /home/fphysics
mkdir <your afs unix username>
log out of fphysics, and log back in. You should be listed.
Q: How do I release to production?
A: To make software available for general use, you will use the cvs2prod utility. See above #matlab "basic flow" section abovve
cvs2prod
...
Q: Where are the Matlab data files?
A: (on facet-srv01) ls -als $MATLABDATAFILES
(on mcclogin) ls -als ls /mccfs2/u1/facet/matlab
(from SLAC web browsers) http://mccas0.slac.stanford.edu/u1/facet
Q: I'm totally lost, what do I do?
A: Call Jingchen Zhou x4661
...
VIII. 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 | |
AIDA web | |
EPICS Home Page | |
CVS commands | |
FACET model preparation | |
The different kinds of Mode in the SCP | |
SLAC Online Modelling Programmers Guide | http://www-mcc.slac.stanford.edu/%7Egreg/model_overall_pg.html |
CVS repository | http://www.slac.stanford.edu/cgi-wrap/cvsweb/matlab/toolbox/?cvsroot=LCLS |
Device database (control system names) | |
SCP POOP | |
SCP BUG |
...
IX. Edit the Developers Guide
Please feel free to modify/correct/add to this document
- Click the "Log In" link in the upper right-hand corner to the left of the Search box.
- Enter your Unix username and password
- Click the Edit link (pencil) beneath the Search box
- Edit in the Rich Text Editor, or click the Wiki Markup tab to edit in the Markup language.
- Markup syntax guide: https://wiki.ucar.edu/renderer/notationhelp.action
- Be sure and click the Preview tab before saving to make sure your changes look ok
- Click the "Save" button to publish your changes.