Logistics

Time: Thursday 14th Feb, 1.30pm
Place: Palisades conference room,
Building 280 B rm 162, marked "BABAR Conf" on map 1.

Agenda

1.30 - 2.30 LabCa Till Straumann. Basically chapter 2 of 2
2.30 - 3.15 Beam acquisition, image management using lca, Aida 3. Mike Zelazny,
Greg White
Break
3.30 - 4.30 LCLS Matlab software environment (CVS, Matlab EPICS variables,
launching, error logging) Mike Zelazny
4.30 - 5.00 Questions and Wrap up

Attendees are:

perazzo@slac.stanford.edu,
bionta1@llnl.gov,
ott2@llnl.gov,
hauriege1@llnl.gov,
drury2@llnl.gov,
friedrich1@llnl.gov,
gardner36@llnl.gov,
gxh@slac.stanford.edu,
zelazny@slac.stanford.edu,
strauman@slac.stanford.edu,
greg@slac.stanford.edu

References:

1 Meeting Room Map.
http://www2.slac.stanford.edu/maps/slacarea.html#meetingRoom

2 Matlab Programmers' Guide for LCLS Physicists
http://confluence.slac.stanford.edu/download/attachments/37130/programming_guide_matlab.pdf?version=1 (TinyURL: http://tinyurl.com/23yoqj)

3 labca labca_presentation.pdf

4 Accelerator Independent Data Access (AIDA) system
http://www.slac.stanford.edu/grp/cd/soft/aida/

5 Above references are collected here:
http://confluence.slac.stanford.edu/display/ACCSOFT/MATLAB

Notes & Minutes

The following are some notes from the meeting.

labCa

labCa is a tool that's used to get and put EPICS control system values directly from within Matlab or SciLab.

The slides from Till's talk on labCa are given in attachment labca_presentation.pdf.

Accessing the LCLS Control System

To run LCLS control ssytem tools, you must make 2 hops if beginning on a SLAC network (the first is to a "gateway" machine). You can only access this gateway from a SLAC IP, so if you're outside SLAC, either VPN, Citrix etc, or login first to a public SLAC AFS node like Tersk.

Eg, login in to Tersk with you SLAC username. Then SSH tunnel first to lcls-prod02 and then to lcls-srv01 using the physics login name:

ssh -Y -l<slac-username> lcls-prod02

then

ssh -Y -lphysics lcls-srv01

When asked what user you are, on login, if you're not in the list, answer 0.

CVS

CVS is accessible on the Web at www.slac.stanford.edu/cgi-wrap/cvsweb
matlab scripts are in the LCLS repository, in the module matlab/toolbox.

The CVS ROOT URL for the LCLS software repository is this:
:ext:<username>@tersk09.slac.stanford.edu:/afs/slac/g/lcls/cvs
Note that you will need a SLAC "AFS" username and password for access.

Glossary

Mike described the following terms, on the whiteboard.

PV Process Variable
IOC - Input/Output Controller (a front end computer)
Soft/IOC - a host computer that runs processes that compute or store values and makes the results available as PVs. Ie, a "fake" IOC that doesn't do control as such.
Archiver - An EPICS client - retrieves and displays the historical values of PVs
EDM Epics Display manager - a graphical user interface builder for PV displays
StripTool - a client that displays the running values of a PV
LabCA - Lab Channel Access; a tool used in matlab or Scilab to interact with EPICS.
EVG/EVR - Event Generator/Event Receiver. EVG synchronized with PG&E cycle, to send a message including the pulse-id, at approx ~360HZ, to each Event Receiver. At LLNL most applications requ. only 10Hz operation.

We run EPICS (the basic control system

Comments

  • There were a number of questions revolving around whether Matlab would be fast enough to process at a rate comparable with the "shot" or "beam" rate. In general, matlab scripts should not be written that assume processing synchronous to beam rate, esp if > 1Hz.
  • There is a mechanism called "monitor" in EPICS, which is supported by labCA, which allows you to be informed when a an EPICS PV changes value. It should not be assumed that the rate at which such a monitored PV in Matlab, can be processed within matlab, at >1Hz.
  • "Can I put to any PV, or will something stop me?"
    Ans: maybe. There is a mechanism to stop unauthorized write ("Channel Access Security"), but it may or may not be configured. See SL.
  • How should we create new names for use exclusively by Matlab?
    Note, the so called "matlab PVs" do not contain values read from devices in the control system, they are a "persistence" mechanism, for storing the results of a matlab computation. This is only a very small subset (~200) of the 1000s of PVs in the control system.
    Ans: Talk to Mike and Steve to create a PV, Mike will create the matlab PV here.
  • Is there a directory of PVs?
    Ans: See https://oraweb.slac.stanford.edu/apex/slacprod/f?p=116 for a list of EPICS PVs specifically. You will need your "SLAC" (aka "AFS") username and password to access APEX. The concatenation of the Primary:Ioc Loc:Unit gives you the PV names. Additionally, since the LCLS control system is composed in fact of an EPICS side, and a legacy non EPICS control system named SLC, the actual union of all names of devices is given by EPICS PVs and SLC device names. There is a system that knows all these names, Aida, but the PV names have a syntax that include a trailing '//VAL' - see the 'List Names' function of AidaWeb at https://seal.slac.stanford.edu/aidaweb/. You must be inside the slac network to use AidaWeb.
  • How do we get the Pulse-id of a PV?
    Ans: Only those PVs whose IOC has an Event Receiver (EVR) have pulse-id associated with them. This is not systematically enforced, but it should be true that all PV's whose IOC has an EVR will have this. To get the pulse-id, use lcaTs2PulseId(timestamp), where timestamp is the time stamp returned by lcaGet.
    Presently, there is no facility to "put" a timestamp to a PV through lca.

Profile Monitor data

See profileMonitor.edm as an example of an EDM screen that displays a profile. We have found that it can do ~1Hz for a 1392x1040 pixels at 16bits per pixel, which is ~2Mbytes/second (the actual data is only 12 bits deep).

See ImaegMan.m for example of matlab beam profile image processing. This finds the beam and centers the image, and does 6 simple fits as well, and also runs about once per sec.

Followup

  • SL/MZ should provide a list of the most commonly/likely used PVs.
  • Send LLNL the ImageMan user's guide. ImageMan is the utility GUI for acquiring and processing camera images.
  • SL to add fake pulse-id to LLNL beam synchronous PVs.
  • SL to create fake loggin interface "Err" (or the real Err with changed sink (so not logging to cmlog but say a file or screen).
  • No labels