Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Login:
    • Bring up a linux terminal window:
      • from an MCC OPI or linux box click the terminal icon on the desktop
      • from Windows use Secure CRT or XWin-32
    • Log into mcclogin with your afs account:
      ssh mcclogin
    • From mcclogin, log into facet-srv01 as the fphysics account
      ssh fphysics@facet-srv01

THE NEXT SECTION IS OBSOLETE AND WILL BE UPDATED:

    • When prompted, enter your user number assigned by Mike (or 0 if you don't have one.)
    • With a personal setup by Mike, you are now in /home/fphysics/userid (e.g. /home/fphysics/fred)
    • With the generic login setup, you are now in /home/fphysics

...

  • LCLS top-level directory: /usr/local/lcls
  • FACET top-level directory: /usr/local/facet

#top

...

II. FACET edm displays: facethome

...

  • If you want the full GUI development environment, type
    matlab
  • If you want to run applications only and/or do some basic scripting (recommended), type
    matlab -nodesktop -nosplash
    This starts the fully working command-line version that requires much less resources.

Production directories

  • tested matlab scripts that are shared can be found here:
    /usr/local/facet/tools/matlab/toolbox
  • matlab scripts developed by the FACET software engineering group are here:
    /usr/local/facet/tools/matlab/src

...

  • .

...

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

Return values are:

FACET

system = SYS1, accelerator = FACET

LCLS

system = SYS0, accelerator = LCLS

NLCTA

system = SYS4, accelerator = NLCTA

CVS

  • For instructions and examples see the Programmer's Guide.
  • 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.
  • Please note: to release a matlab script to production (i.e. to copy the completed and tested version into /usr/local/facet/tools/matlab/toolbox) you need to cvs commit your changes, and then use the cvs2prod command.
    In the same directory where you are developing and testing script newScript.m, enter this:
    cvs2prod newScript.m

basic flow for working with matlab scripts and CVS

  • if you haven't already, cvs checkout the matlab toolbox directory into your working area (/home/fphysics/fred)
    cd /home/fphysics/fred (if you're fred!)
    cvs co matlab/toolbox
  • cd into the toolbox directory
    cd matlab/toolbox
  • to get the latest CVS-ed copy of a script, use cvs update:
    cvs update myScript.m
    or to get the latest CVS-ed copies of all the scripts:
    cvs update
  • work on a new script, or an existing script
  • test thoroughly until your work is ready for primetime
  • cvs add any new scripts you've created
    cvs add myScript.m
  • cvs commit scripts that you have added or changed
    cvs commit myScript.m
  • release new/changed scripts to the production directory (/usr/local/facet/tools/matlab/toolbox)
    cvs2prod myScript.m

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.

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

Return values are:

FACET

system = SYS1, accelerator = FACET

LCLS

system = SYS0, accelerator = LCLS

NLCTA

system = SYS4, accelerator = NLCTA

Matlab support PVs
A set of Matlab support PVs for FACET are available from the matlab support soft IOCs, with the naming convention
SIOC:SYS1:ML0x:<type><n>

...