16
Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Embed Size (px)

Citation preview

Page 1: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul ChuFRIB Controls Group Leader (Acting)

XAL Recent Development

Page 2: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

XAL Introduction and features

XAL software management

Open XAL status

XAL setup

Summary

Outline

, Slide 2

Page 3: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

XAL in high-level application infrastructure

Accelerator Control

, Slide 3

XAL and its apps

Page 4: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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

What XAL can offer?

, Slide 4

Page 5: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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.

XAL Online Model

, Slide 5

Page 6: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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

XAL Utility Packages

, Slide 6

Page 7: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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

Services and Applications

, Slide 7

Page 8: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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

Scripting Interface to XAL

, Slide 8

Jython# read the acceleratoracc_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()

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 acceleratorpause(1); % for virtual acceleratorxpos(i) = bpm.getXAvg;ypos(i) = bpm.getYAvg;field = field * 1.015; % increment field value

end

% Plot resultsplot(fld, ypos)

Page 9: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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)

XAL Software Management

, Slide 9

Page 10: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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

Open XAL Goals (T. Pelaia)

, Slide 10

Page 11: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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/

Open XAL Completed Work (T. Pelaia)

, Slide 11

Page 12: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

Due Date Progress Task

Oct. 31, 2010 100% Project Skeleton

Dec. 31, 2010 100% Develop Website

Feb. 15, 2011 100% Application Framework

Apr. 30, 2011 100% Online Model

Aug. 31, 2011 25% Lattice Generator

Dec. 31, 2011 40% JSON Package

Dec. 31, 2011 80% Common Tools

Dec. 31, 2012 0% Test Suites

Dec. 31, 2012 0% Common Services

Dec. 31, 2012 5% Common Applications

Roadmap Summary (T. Pelaia)

, Slide 12

Page 13: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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.

Improvement Ideas

, Slide 13

Page 14: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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

XAL Setup

, Slide 14

Page 15: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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

Summary

, Slide 15

Page 16: Paul Chu FRIB Controls Group Leader (Acting) XAL Recent Development

Paul Chu, XAL, 14 Jun 2011

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’.

Additional Information

, Slide 16