Presentation is loading. Please wait.

Presentation is loading. Please wait.

Office of Science U.S. Department of Energy “Traditional” Tools for Beamline Applications Mark Rivers University of Chicago October 16, 2008.

Similar presentations


Presentation on theme: "Office of Science U.S. Department of Energy “Traditional” Tools for Beamline Applications Mark Rivers University of Chicago October 16, 2008."— Presentation transcript:

1 Office of Science U.S. Department of Energy “Traditional” Tools for Beamline Applications Mark Rivers University of Chicago October 16, 2008

2 2 Beamline applications are different from accelerator controls: Data collection is usually the goal, rather than just control Typical data collection involves Change something (usually move 1 or more motors) Wait for change to complete Trigger detectors Wait for detectors to be done Read detectors Overview

3 3 No one higher-level tool dominates for beamline control This is mostly a natural consequence of the wide variety of experiments performed on synchrotron beamlines, e.g. Protein crystallography – nearly unchanged setup and data collection X-ray scattering experiment: each one different detector, collection scheme, sample environment, etc. Among the solutions in use: sscan record with only medm, scan_see, and save_data sscan record with IDL or Python client on top SPEC controlling EPICS motor, scaler and mca records BluIce (protein crystallography) GDA (Diamond) Many other site-specific and application-specific solutions Overview

4 4 Simple scans A one-dimensional scan: –Do NPTS times: Set conditionse.g., move motors; wait for completion Trigger detectorse.g., start scaler; wait for completion Acquire dataread detector signals; store in arrays –Write data to disk

5 5...Simple scans Multidimensional scan: –Outer-loop scan’s detector trigger executes inner-loop scan. –saveData monitors a set of sscan records, determines scan dimension when scan starts, and writes data as it is acquired. –No limit to the number of scan dimensions. inner-loop scan outer-loop scan

6 6 Scan features 0-4 positioners, 0-4 detector triggers, 0-70 detector signals –Positioner and readback values are of type double –Detector values are of type float Acquisition from scalar and/or array PV's –Array PV’s acquire.NPTS elements Number of data points limited only by IOC memory –Standard max. is 2000 (x i,y i ) points per scan dimension –Can increase to ~ EPICS_CA_MAX_ARRAY_BYTES / 8 Detector/client wait, data-storage wait –Can wait for multiple data-acquisition clients –Only one data-storage client Pause/resume, abort –Data from aborted scans are written to disk Double buffered: writes 1D acquired data after the scan is finished –Can write during next 1D scan

7 7 …Scan features saveData writes XDR-format (“.mda") files to disk. –Files can be read on any type of computer A positioner can have private scan parameters (scanparm record). –Load preset scan parameters with one mouse click –Useful for alignment After-scan actions include move to peak, valley, +/-edge. –Can, e.g., track a moving peak through a series of scans scanparm record + after-scan action = automated 1-D alignment.

8 8 IDL or Python clients for real-time (CA) or post-scan (MDA file) viewing EPICS sscan record

9 9 Sufficient for commissioning Next step: add a client to the front-end which hides the sscan record from the user, but uses the sscan record because it is flexible and can be used to scan anything and read anything EPICS sscan record Matt Newville’s “escan” for EXAFS

10 10 Commercial software (Certified Scientific Software) X-ray diffraction control and data acquisition Works on Unix and Linux platforms Basically a scripting language with device drivers Supports numerous diffraction geometries with built-in commands and predefined macros Easy to add user macros for specific controls EPICS friendly: built-in channel access interface to control EPICS- based hardware. It “knows about” EPICS motor and scaler records, and provides simple interface to CA. Used at many synchrotrons around the world; sizable user base Overview of spec IOC Motors Detector Power Supply Scaler spec LAN

11 11 spec Installations at the APS ESRF uses SPEC heavily APS has a site license for 50 “seats” spec is in use at 22 APS sectors/CATs

12 12 spec pros and cons Pros: Understands the “orientation matrix”, i.e. the relationship of a crystals orientation to the motors in a goniometer. Complex geometries codes exist for holding variables constant (e.g. angle of incidence) with overconstrained geometries. Commercial package with good support Many SPEC macros have been written over the years, so many users are big fans of it For x-ray scattering experiments it remains the best tool in spite of its age – but it really needs to be replaced (e.g. GDA Toolkit?) Cons: Old and idiosyncratic scripting language, not nearly as good as Python or other more recent languages SPEC includes many hardware drivers for motor controllers, detectors, etc., but these are typically not used in an EPICS installation One-person company, long-term support doubtful

13 13 GM/CA CAT Control system: BluIce-EPICS MOTIVATION: Preserve commonly praised user interface of SSRL BluIce, but make it efficiently working with EPICS hardware. Sergey Stepanov Oleg Markov GMCA CAT, APS

14 14 Distributed Control System Server (DCSS) Architecture of the original SSRL BluIce User Interface Clients (BluIce) Distributed Hardware Servers (DHS) DHS DCSS The original BluIce is 3-layer system with socket communications between the layers. The DCSS is a central “coordinator” that is supposed to know everything about the beamline status. The GUI is written in Tcl/Tk and the rest in C/C++.

15 15 BluIce-EPICS architecture: final design EPICS IOC(s) GUI-3 GUI-2 Motion MCA Scaler Shutter Embedded backend controllers for EPICS I/O GUI-1 PV mySQL initialization channel access  EPICS DHS merged with DCSS into a single C++ backend controller  Furthermore the combined controller merged with the GUI and socket calls from the GUI converted into function calls (the calls format was preserved)  Each GUI is standalone MEDM-like EPICS client  Initialization through mySQL and exchange between different GUI instances via EPICS PVs

16 16 BluIce-EPICS GUI core tabs Older tabs are in Tcl/Tk, newer tabs are in Java. The plan is to convert all tabs into Java.

17 17 BluIce-EPICS: outsourcing complex controls to helpers All essential beamline operations being moved out of BluIce Rack of helpers Frame proc. engine Fluoresc.scans server Point & click server Robot server Beam alignment Fluor.detector tune Frame audit Big energy move Sample centering Collimator In/Out GUI-3 GUI-2 Embedded backend controllers for EPICS I/O GUI-1 EPICS IOC(s) channel access Helpers include SNL-like servers and external scripts that interact with BluIce via PVs. The advantage of such approach is that each helper is an independent module that can be written in any language without knowledge of the main BluIce application. This widens base of developers. Currently helpers are written in SNL, C, Java, Perl, and Tck/Tk.


Download ppt "Office of Science U.S. Department of Energy “Traditional” Tools for Beamline Applications Mark Rivers University of Chicago October 16, 2008."

Similar presentations


Ads by Google