E. Matias Canadian Light Source June 2009 Presentation to -
NSLS II EFD Division CLS Beamline Controls
Slide 2
The CLS Current System EPICS Beamline Controls Next Step EPICS
& ScienceStudio
Slide 3
Where is Saskatoon?
Slide 4
What are the CLS Objectives? 170.88 m circumference 2.9 GeV DBA
lattice with 12-fold period Nominal Tune: x = 10.22 y = 3.26 E loss
per turn: > 0.876 MeV Bend magnet radiation: c = 1.6 E c = 7.6
keV x = 18.1 nmrad Damping times: x = 2.4 ms, y = 3.8 ms, E = 2.7
ms ~10 mm bunch length
Slide 5
Phase 1 (operation): Total of 7 scientific and 2 diagnostics
beamlines. Phase 2 (commissioning): Total of 7 additional beamlines
and building expansion for medical imaging. Phase 3 (pre-design):
Total of 7 additional beamlines and building expansion.
Slide 6
The CLS Current System EPICS Beamline Controls Next Step EPICS
& ScienceStudio
Slide 7
EPICS Detectors Cameras etc. Modbus TCP/IP GPIB RS-232 Channel
Access Protocol IOC State Machine Engine CA Single Board Computer
CA Operator Workstation User Applications Touch Panels CA
Telemecanique Momentum PLC VME IOC CA
Beamline Visualization As Map - Raster scan with fluorescence
spectroscopy of a pine needle contaminated with arsenic. The
technique allows multiple elements to be detected simultaneously at
each point of the raster. These images show distributions of
arsenic, iron, and manganese, respectively, near the tip. The
highest intensity displays in red, lowest in blue. - Custom on-line
plotting application scripted in CERN Root, with data stream from
the CLS data acquisition application.(G. Wright, R. Igarashi, K.
Chang-Yong, N. Chen) Fe Map
Slide 10
Traditional Beamline Visualization Cross section views of the
beam spot intensity distribution for varying degrees of
monochromator detuning (50-80%). (Only one image shown). (G.
Wright, R. Igarashi, K. Chang-Yong, N. Chen)
Slide 11
Slide 12
Fill Monitor (in Single Bunch)
Slide 13
Fill Pattern Monitor (Normal)
Slide 14
Matlab Sometimes used for prototyping (taking into account
single threaded limitations)
Slide 15
Structure GUI (EDM, Qt, Root) Scan and Data Management
Libraries EPICS PV (Abstract PVs) EPICS Low Level (Motor and
Detector PVs) EPICS Drivers (vendor drivers)
The CLS Current System EPICS Beamline Controls Next Step EPICS
& ScienceStudio
Slide 18
Scientific American May 2008 Science 2.0 The Risk and Reward of
Web-Based Research --------------------------------- Our real
mission isnt to publish journals but to facilitate scientific
communication Timo Hannay Head of Web Publishing at Nature
Publishing Group
Slide 19
What Is the Web 2.0? In plain English . Automating tedious
tasks using web technology Tools to help people and software
collaborate
Slide 20
20 Team: People and Orgs Remote Control User Services System
Deployment Integration System Architecture System Requirements
Testing Data Analysis/Grid Computing User Office Software
Scientific Workflow Engines
Slide 21
21 Team: People and Orgs Dionisio Medrano Dylan Maxwell Dong
Liu Elder Matias Daron Chabot (now NSLS) Chris Armstrong John Haley
Jinhui Qin Nathaniel Sherry (student) Mike Bauer Stewart McIntyre
Marina Suominen Fuller Yuhong Yan Zahid Anwar (student)
Slide 22
Requirements New User Office Functionality Proposal submission
Peer review User Feedback Tracking Experiment Management User
Training/ Safety Testing Remote Beamline Access Integration with
grid data-storage Grid computing
Slide 23
System Architecture Web Application Beamline Control Module DB
SAN JMSCA VESPERS HTTP 1.VESPERS Beamline 2.EPICS control system
3.Beamline Control Module (BCM) 4.Web Application 5.Database 6.File
Storage 7.Web Interface
Slide 24
VESPERS Beamline VESPERS Very Sensitive Elemental and
Structural Probe Employing Radiation from a Synchrotron A bending
magnet beamline on sector 6 at the Canadian Light Source
synchrotron in Saskatoon, Saskatchewan. A hard x-ray microprobe
with an energy range of 6 to 30keV. Techniques: X-Ray Fluorescence
(XRF) & X-Ray Diffraction (XRD) Web Application Beamline
Control Module DB SAN JMSCA VESPERS HTTP
Slide 25
EPICS Low-level Control System EPICS Experimental Physics and
Industrial Control System The standard control system at the CLS.
EPICS consists of a network of Input-Output Controls (IOCs) which
are connected to directly to devices. An IOC provides many Process
Variables (PVs) which relate to either an input or output from a
device and have a unique name. Channel Access (CA) is used to read
or write to any PV without knowing which IOC provides the PV. More
than 50,000 PVs in the CLS control system. Web Application Beamline
Control Module DB SAN JMSCA VESPERS HTTP
Slide 26
Beamline Control Module (BCM) The BCM provides a high-level
interface to the low-level control system (EPICS). Logical and
physical separation of business logic and control logic. Virtual
device abstraction that provides independence from low-level
control system. Virtual devices can be logically organized into a
device hierarchy. Basic devices can be combined to build more
functional devices. Communication with external applications using
two message queues (ActiveMQ). Web Application Beamline Control
Module DB SAN JMSCA VESPERS HTTP
Slide 27
Web Application A J2EE Servlet application that provides a
web-based interface Science Studio. Tools: Spring (MVC), iBATIS
(ORM), JSecurity (Apache Ki), Apache Tomcat Divided into two parts:
the Core application and the VESPERS beamline application. Core
application is responsible for providing access to the business
objects. VESPERS application is responsible for remote control of
the VESPERS beamline. Web Application Beamline Control Module DB
SAN JMSCA VESPERS HTTP
Slide 28
Database Metadata associated with the operation of a remote
controlled beamline and the organization of experimental data
collected on that beamline. A project is the top level
organizational unit and is associated with a project team. A
session defines a period of time allocated to a project team to
conduct experiments. An experiment relates a sample and the
technique being applied to that sample. A scan records the location
of the acquired experimental data. Web Application Beamline Control
Module DB SAN JMSCA VESPERS HTTP
Slide 29
Experimental Data Storage Experimental data is stored at the
CLS. Common directory structure shared with other beamlines. A
large data storage facility is now operational at the University of
Saskatchewan as part of WestGrid. Web Application Beamline Control
Module DB SAN JMSCA VESPERS HTTP
Slide 30
VESPERS Web Interface Rich web interface to Science Studio and
the VESPERS beamline. Designed to be used over commodity broadband
internet. Developed for the Firefox web browser without any
additional plugins or extensions. Known to work with other
browsers, but requires the Canvas HTML tag. AJAX is used for the
VESPERS interface to provide device values in pseudo real time.
ExtJS, a JavaScript framework, provides many advanced GUI elements.
Web Application Beamline Control Module DB SAN JMSCA VESPERS
HTTP
Slide 31
Slide 32
Beamline Setup
Slide 33
Experiment Setup
Slide 34
XRF (X-Ray Fluorescence)
Slide 35
Beamline Hutch Cameras
Slide 36
Experimental Data Viewer
Slide 37
Slide 38
ScienceStudio
Slide 39
Scanning
Slide 40
X-Ray Fluorescence (XRF): Reveals Elemental Composition
Characteristic Element Lines Selected and Mapped Over a 2D Scan
Area S: K Cr: K & Cr: K Fe: K & Fe: K Ni: K & Ni: K 2D
Maps Generated for Selected Elemental Lines
Slide 41
X-Ray Diffraction (XRD): Reveals Structural Information Peak
Fitting and Indexing of Image Set to Create a Grain Orientation Map
Peak Search Old IDL Programme Matched Peak New C Programme Matched
Peak New C Programme Expected Peak The XRD Indexing programme
examines the locations of peaks in an image in order to determine
the kind of lattice structure the samples constituent atoms are
arranged in. Shown here are the results of an older indexing
programme written in IDL, and the new indexing programme, written
in C. The new indexing programme is proving to be more versatile,
and more reliable than the old programme, often indexing sets of
data that the old programme failed with. Grain Orientations
Indexing Process
Slide 42
User Training Module
Slide 43
Slide 44
User Office Workflow Example Prototype Implementation 1. CLS
issues a call for proposals and gives deadline 2. Beamline users
submit proposals 3. User Office administrator ends registration or
extends deadline 4. User Office administrator assigns proposals to
user office reviewers 5. Reviewers look at proposals and rank them
6. User Office looks at ranking and chooses the proposals to accept
7. Accepted proposals contact persons are notified 8. Beamline User
completes training (web service) 9. After training is completed
(simulated by a delay) the CLS is notified