XAL Recent Development Paul Chu FRIB Controls Group Leader (Acting)
Outline XAL Introduction and features XAL software management Open XAL status XAL setup Summary Paul Chu, XAL, 14 Jun 2011
Accelerator Control XAL in high-level application infrastructure XAL and its apps Paul Chu, XAL, 14 Jun 2011
What XAL can offer? Written in Java (multi-platform support) A hierarchical view of an accelerator Quick physics modeling tool A common look-and-feel graphical user interface (GUI) Use EPICS CA But in principle can support other control system with a proper adapter. Oracle database adapter Many other utility packages Re-use as much as possible Paul Chu, XAL, 14 Jun 2011
XAL Online Model Single Particle Tracking Algorithm. Adaptive Envelope Tracking Algorithm. Space charge code. Phase space coordinates, Twiss parameters, R-matrix for each modeling element. SNS version based on Trace-3D. LCLS version based on MAD8. Support DESIGN, EXTANT (live), and ‘what-if’ modes. SLAC version has solenoid, T-cav. TRIUMF needs electrostatic devices. Paul Chu, XAL, 14 Jun 2011
XAL Utility Packages Optimization Data plotting package In-memory database Can dump to XML Math utility GUI framework Common look-and-feel No need to go through some detail GUI programming Paul Chu, XAL, 14 Jun 2011
Services and Applications PVLogger service Can take machine snapshot with time correlation Online model supports PVLogger snapshot replay Knobs Model GUI Can do orbit difference, i.e. comparison Orbit Correction 1D/2D Scan Virtual Accelerator General purpose PV display, aka Z-plot Orbit Display with beam synchronous acquisition buffer display Many other apps Many “apps” are callable API Paul Chu, XAL, 14 Jun 2011
Scripting Interface to XAL Scripting interfaces are available with Jython (www.jython.org) and Matlab No glue code, or extra compile steps etc needed!!! Mix XAL java classes seamlessly with scripting language Providing simple code examples. Coding up on-the-fly experiments. http://www.sns.gov/APGroup/appProg/xal/scripts/jythonScripts.html MatLab % scan the first quad % monitor beam positions in the last MEBT BPM for i =1:10 fld(i) = field; quad.setField(field); va_chan.putVal(1); % for virtual accelerator pause(1); % for virtual accelerator xpos(i) = bpm.getXAvg; ypos(i) = bpm.getYAvg; field = field * 1.015; % increment field value end % Plot results plot(fld, ypos) Jython # read the accelerator acc_xml = "file:./sns.xal" acc = XmlDataSource.parseUrlAt(acc_xml, 0) # get the some primary sequences from the accelerator mebt = acc.getSequence("MEBT") dtl1 = acc.getSequence("DTL1") dtl2 = acc.getSequence("DTL2") print " There are ", mebt.getAllNodes().size(), "nodes in the sequence", mebt.getId() Paul Chu, XAL, 14 Jun 2011
XAL Software Management Open Source Open XAL – SourceForge, Git Multi-lab collaboration A good community support behind it Labs presently using XAL: SNS, SLAC/LCLS, KEK (part), J-PARC (linac), BNL/NSLS-II, CSNS, MSU, GANIL/Spiral-2… Ant build for easy deployment Can also build with your favorite IDE LCLS specific code in separate package which depends on XAL (LCLS own branch) Paul Chu, XAL, 14 Jun 2011
Open XAL Goals (T. Pelaia) Support collaboration Manage project on Source Forge Make XAL easier to port General cleanup Improve the online model Reduce overhead for adding new device types Modernize code and eliminate obsolete code Paul Chu, XAL, 14 Jun 2011
Open XAL Completed Work (T. Pelaia) Project skeleton with more powerful, zero configuration build architecture Application framework ported and modernized New online model implemented Git repository to ease collaboration and site customization Website with plan, roadmap and documentation http://xaldev.sourceforge.net/ Paul Chu, XAL, 14 Jun 2011
Roadmap Summary (T. Pelaia) Due Date Progress Task Oct. 31, 2010 100% Project Skeleton Dec. 31, 2010 Develop Website Feb. 15, 2011 Application Framework Apr. 30, 2011 Online Model Aug. 31, 2011 25% Lattice Generator Dec. 31, 2011 40% JSON Package 80% Common Tools Dec. 31, 2012 0% Test Suites Common Services 5% Common Applications Paul Chu, XAL, 14 Jun 2011
Improvement Ideas Some multi-function apps are too heavy. Need to improve performance and robustness. Go service oriented. Service runs continuously Reduce initialization overhead Avoid heavy computation in individual application Better exception/error handling, message logging Easy for quick prototyping/experiment setup Separate XAL/SNS GUI from the package. Paul Chu, XAL, 14 Jun 2011
XAL Setup A repository to store everything It is easier if source code modification necessary Your schedule is not controlled by somebody else (Optional) Need a database to hold input (configuration) data. Modification to SMF/online model If some devices which is not currently supported by XAL. Not trivial but doable Understanding the system Learn XAL. JCA (Java Channel Access) expertise Get used to XAL It’s not as difficult as you might have thought Paul Chu, XAL, 14 Jun 2011
Summary XAL has a lot of features Several labs are using or evaluating XAL Even EPICS Archiver Viewer is based on XAL But, it’s not perfect. Still a lot of work to do Need your help, suggestion Paul Chu, XAL, 14 Jun 2011
Additional Information XAL in SourceForge Source code XAL workshop slides It’s called ‘Open XAL’ now Mailing list USPAS XAL course material https://wiki.ornl.gov/sites/xaldocs/default.aspx XAL API (JavaDOC) can be generated from ‘ant javadoc-xal’. Paul Chu, XAL, 14 Jun 2011