SNS Beamline Experiment Control (Future) Xihui Chen, Kay Kasemir 4/15/2013.

Slides:



Advertisements
Similar presentations
Managed by UT-Battelle for the Department of Energy Best Ever Archive Utility, Yet (BEAUtY) Kay Kasemir April 2013.
Advertisements

Control System Studio (CSS)
Managed by UT-Battelle for the Department of Energy Xihui Chen, Kay Kasemir ORNL/SNS April 2013 at IHEP Control System Studio Setup - Hierarchical.
ORNL is managed by UT-Battelle for the US Department of Energy Control System Studio: First Steps Kay Kasemir ORNL/SNS June 2014.
Managed by UT-Battelle for the Department of Energy Kay Kasemir, Xihui Chen ORNL/SNS April, 2013 Getting Started with CSS.
ORNL is managed by UT-Battelle for the US Department of Energy EPICS V4 for SNS Neutron Data Kay Kasemir Oct
Best Ever Alarm System Toolkit Kay Kasemir, Xihui Chen, Katia Danilova SNS/ORNL April, 2013.
Controls and Monitoring Implementation Plan J. Leaver 03/06/2009.
Diane Fairley High Level October 24-28, 2005 High Level Physics Applications LCLS Week / FAC October 24-28, 2005.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Jan Control System Studio Training - Alarm System Use.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS April 2013 Control System Studio Training - Alarm System Use.
8/21/2015J-PARC1 Data Management Machine / Application State Data.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS April 2013 Control System Studio Training - Workspaces, Shared.
Control System Studio (CSS)‏ Kunal Shroff EPICS Training Meeting 07/10/2010.
Scan System Kay Kasemir, Xihui Chen Jan Managed by UT-Battelle for the U.S. Department of Energy Automated Experiment Control “Scan” should be.
Scan System: Experiment Automation Kay Kasemir, Xihui Chen RAL EPICS Meeting, May 2013.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS 2012, April at SLAC Control System Studio - Introduction.
Managed by UT-Battelle for the Department of Energy Kay Kasemir, Ph.D. ORNL/SNS July 2011 at Control System Studio - CSS - Overview.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Jan Control System Studio Training - Web OPI.
Magnetic Field Measurement System as Part of a Software Family Jerzy M. Nogiec Joe DiMarco Fermilab.
STAC usage at Diamond Richard Fearn Software Engineer.
All rights reserved, property and © CAD Computer GmbH & Co.KG 2009 Cover page.
Specview 32 Release 2.5 Enhancements
Making LabVIEW look like an IOC Kay-Uwe Kasemir, LANL May 2002.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Oct EPICS Meeting, PAL, Korea Control System Studio Training.
Control System Studio (CSS) Overview Kay Kasemir, July 2009.
The CSS Scan System Kay-Uwe Kasemir SNS/ORNL Dec
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Feb Material copied from the IOC Application Developer's.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Jan Control System Studio Training - Archive System Setup.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Oct EPICS Meeting, PAL, Korea Control System Studio Training.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Jan Control System Studio, CSS Overview.
Final Review of ITER PBS 45 CODAC – PART 1 – 14 th, 15 th and 16 th of January CadarachePage 1 FINAL DESIGN REVIEW OF ITER PBS 45 CODAC – PART 1.
EPICS for Neutron Scattering Beam Lines Steven Hartman EPICS Meeting, 2 May 2013.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS With slides from Xihui Chen May 2014 Control System Studio Training.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Jan Control System Studio Training - Development Setup.
CMS pixel data quality monitoring Petra Merkel, Purdue University For the CMS Pixel DQM Group Vertex 2008, Sweden.
CSS – Control System Studio
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS 2011, October at CEA Saclay, France Control System Studio.
Managed by UT-Battelle for the Department of Energy Kay Kasemir, Xihui Chen ORNL/SNS April Control System Studio Training - Development.
Managed by UT-Battelle for the Department of Energy CSS Update Matthias Clausen, Helge Rickens, Jan Hatje and DESY Delphy Armstrong, Xihui Chen,
WebOPI -Bring BOY OPI to the Web and Mobile Xihui Chen, Kay Kasemir Spring 2012 EPICS Meeting.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS 2012, January 9-12 at NSRRC, Taiwan Control System Studio Training.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS 2011, October at CEA Saclay, France Control System Studio.
A simple Desktop DAQ for U2F readout Ulf jörnmark Physics Dept. Lund Status and plans.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS April 2013 Control System Studio, CSS Overview.
Connecting LabVIEW to EPICS network
Things that we offer Controls Software Team Web-based tools development Xihui Chen, Katia Danilova, Kay Kasemir, Dave Purcell.
Jan Hatje, DESY CSS – Control System Studio EPICS collaboration meeting CSS – Control System Studio Update EPICS collaboration meeting 2008 Shanghai.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS A lot of material from Nadine Utzel, ITER and BOY online help.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS 2012, January 9-12 at NSRRC, Taiwan Control System Studio Training.
TDAQ Experience in the BNL Liquid Argon Calorimeter Test Facility Denis Oliveira Damazio (BNL), George Redlinger (BNL).
Applications Kay Kasemir ORNL/SNS Using Information and pictures from Matthias Clausen, Jan Hatje, and Helge Rickens (DESY) October 2007.
EPICS and LabVIEW Tony Vento, National Instruments
Channel Archiver Overview Jan Channel Archiver Channel Access client Stores samples in disk files Design target: handle values/sec Documentation,
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS May 2014 Control System Studio Training - Hierarchical Preferences.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS 2012, April at SLAC Control System Studio Training - Alarm System.
Scan System Update Kay Kasemir, May Managed by UT-Battelle for the U.S. Department of Energy Scan Server Sample Environment Equipments Sample Environment.
ORNL is managed by UT-Battelle for the US Department of Energy EPICS on SNS Instruments Matt Pearson SNS ORNL 18 th - 22 nd May 2015.
Implementation and Testing of RDB Channel Archiver with MySQL Richard Ma, DePauw University Supervisor: Richard Farnsworth, Argonne National Laboratory.
ORNL is managed by UT-Battelle for the US Department of Energy Status Report: Data Acquisition and Instrument Controls for the Spallation Neutron Source.
Best Ever Alarm System Toolkit Kay Kasemir, Xihui Chen, Katia Danilova, SNS/ORNL ICALEPCS 2009, Kobe, Japan, Oct 2009.
BOY, A Modern Graphical Operator Interface Editor and Runtime Xihui Chen, Kay Kasemir RAD Control Group.
Introduction to Control System Studio (CSS) Kay Kasemir, Kunal Shroff EPICS Fall Collaboration Meeting, October 2011 PSI.
Windows Server 2003 { First Steps and Administration} Benedikt Riedel MCSE + Messaging
ORNL is managed by UT-Battelle for the US Department of Energy ADnED Handling V4 Neutron Event Data Matt Pearson SNS ORNL 18 th -22 nd May 2015.
Control System Studio (CSS)
NICOS – IBEX Interactions
Presentation transcript:

SNS Beamline Experiment Control (Future) Xihui Chen, Kay Kasemir 4/15/2013

2Managed by UT-Battelle for the U.S. Department of Energy Overall Picture Sample Environment Equipments Sample Environment Detector Instrument Events Aggregator Translation Service Mantid Neutron Count, Histogram,.. Service Neutron Count, Histogram,.. Service Data Stream GUI: CSS EPICS IOCs Scan Server Channel Access Experiment Control

3Managed by UT-Battelle for the U.S. Department of Energy Building blocks MotorCameraICPMisc. Scan Server Archive Engine BOY Data Browser Scan UIAutosave IOCs Services User Interface Alarm UI Pydev, Git … Alarm Server Statistic Server Only choose the blocks that you need to build your own experiment control system

4Managed by UT-Battelle for the U.S. Department of Energy A real example at imaging beamline Raw 2D image Integrated Motor Controls Constant monitoring of data acquisition progress with estimate of duration of a 2D (kinetic) and 3D (CT) scans 2D and 3D scans options Direct access to data

5Managed by UT-Battelle for the U.S. Department of Energy Automated Experiment Control – Scan System “Scan” should be easy and robust Graphical: … or script: Monitor, pause, resume, abort Open Shutter Wait for certain beam charge to accumulate Step motor X += 1 Step motor X += 1 X < 10 ? No Yes Set motor X = 0 Close Shutter A scan example

6Managed by UT-Battelle for the U.S. Department of Energy Why not EPICS Sequencer? − Compile, link, … − No GUI − No progress, pause, resume − Can do anything Excellent for “permanent” automation, not for changing scan scenarios

7Managed by UT-Battelle for the U.S. Department of Energy Why not Scripts (Python, Jython, Scala, …)? − No progress, pause, resume − Can do most anything − Lost of Control − Difficult − Error prone − Missing of common Scan functions − Error checking and handling − Simulation “Works”, but…

8Managed by UT-Battelle for the U.S. Department of Energy APS “Scan Engine” Claude Saunders, Mitch McCuiston, Brian Tieman, Tim Mooney “Scan Engine” executes submitted scans Scan = List of robust commands  “Loop” command  Pause, Resume  CSS PV instead of new PV layer  Tight CSS GUI integration AND basic script access

9Managed by UT-Battelle for the U.S. Department of Energy Scan Commands Set – Set device (PV) to a value. – Optional wait for read-back, same or other PV, with timeout. Wait – Wait until a device (PV) reaches a certain value. Support condition: >, =, <=, increment-by, decrease-by. Optional timeout. Loop – Command that performs a loop, optional read-back and timeout. Log – Log data for plot in addition to variables used by Set, Wait, Loop Delay – Delay for a certain time. Discouraged. Use Wait. Script – Execute jython code. Use with care. Custom commands can be added via Eclipse extension points.

10Managed by UT-Battelle for the U.S. Department of Energy Experiment Control for EPICS Sample Environment Equipments Sample Environment Equipment GUI: CSS Jython, Matlab, … GUI: CSS Jython, Matlab, … EPICS IOCs Channel Access Scan Server A scan Client side: Assemble scan Submit scan Monitor scan Scan Server: Keep the queue of Scans Execute Scans

11Managed by UT-Battelle for the U.S. Department of Energy Scan Server CSS/Eclipse ‘headless’ application ‘PV’: EPICS, simulated Telnet interface: Status, pause, resume, … Java RMI interface: Submit, status, pause, resume, get data, … – Scans transferred in XML format – RMI = Java, Jython, Matlab, Scala, JRuby, … RESTful web interface

12Managed by UT-Battelle for the U.S. Department of Energy Scan Client Can be anything as long as it can talk to Scan Server using the provided interfaces – CSS – Matlab – Python – LabVIEW – Web browser – …

13Managed by UT-Battelle for the U.S. Department of Energy BOY Example 1. Configure 2. Start 3. Monitor

14Managed by UT-Battelle for the U.S. Department of Energy Tabular OPI

15Managed by UT-Battelle for the U.S. Department of Energy Scan Monitor List Scans on Server – Idle: To be executed next – Running: With progress report – Finished, Failed: Past runs

16Managed by UT-Battelle for the U.S. Department of Energy Scan Plot Plot variables used by scan Get data from Running or Finished scans

17Managed by UT-Battelle for the U.S. Department of Energy Scan Editor Add commands Set parameters Open, save “Undo” Drag/drop commands or PV names (also as XML text) Device PVs (or alias) can be picked from beamline-specific configuration

18Managed by UT-Battelle for the U.S. Department of Energy Simulation Mode Simulated PV changes Estimates times

19Managed by UT-Battelle for the U.S. Department of Energy Monitor, Adjust Live Scan Active Command Scan Info Adjust properties of live scan Adjust properties of live scan

20Managed by UT-Battelle for the U.S. Department of Energy Scripted Scan … or use ‘vi’, shell: from scan_client import * help(scan) scan('Demo', ('xpos', 1, 10)) Jython editor, debugger Jython console

21Managed by UT-Battelle for the U.S. Department of Energy Matlab Create Scan Monitor Analyze (maybe submit follow- up scan) Analyze (maybe submit follow- up scan)

22Managed by UT-Battelle for the U.S. Department of Energy Performance Command Execution – commands/second: Delay 0 sec, Set w/o read- back – 4500 commands/second: Set w/ read-back, Loop Download scan into Editor – commands: 1 second – commands: 15 seconds Stability – Continuously running for two months so far.

23Managed by UT-Battelle for the U.S. Department of Energy Web Interface Development

24Managed by UT-Battelle for the U.S. Department of Energy Beamline Setup Network Version Control, Issue Tracking, Wiki Directory Layout IOC Control

25Managed by UT-Battelle for the U.S. Department of Energy Network Beam lines are as autonomous as possible – Beam line X cannot read/write beam line Y Instrument hall coordinator, SNS/HFIR personnel, visitors on ORNL network can read most beam line information – For any beam line World may be able to read some beam line information Limited, controlled write access from ORNL network – ssh access for config, maintainance – Selected actions may be allowed via web server

26Managed by UT-Battelle for the U.S. Department of Energy Server

27Managed by UT-Battelle for the U.S. Department of Energy Version Control - Git Distributed Version Control System Lighting Fast Easy and powerful in branching and merging Nice CSS Integration – Commit – Pull/Push – Compare

28Managed by UT-Battelle for the U.S. Department of Energy Git Repositories Shared repositories – epics Including base, support modules, extensions – css Including CSS, ScanServer, Archive Engine, Alarm Server, settings.ini – share Including shared OPI files, scan files, images... Beamline specific repositories – bl1 bl1 related IOC applications, configuration files, OPI files, scan files… – bl2 – bl3 – …

29Managed by UT-Battelle for the U.S. Department of Energy wiki and issue tracking Trac – – Integrated wiki, issue tracking system for software development – Integrate with git to browse source, tracking changes… – Open source project

30Managed by UT-Battelle for the U.S. Department of Energy wiki Allow all members to edit/browse document online

31Managed by UT-Battelle for the U.S. Department of Energy Issue Tracking Each issue is a ticket – Owner – Type – Status

32Managed by UT-Battelle for the U.S. Department of Energy Browse Source Browse source in repositories

33Managed by UT-Battelle for the U.S. Department of Energy Tracking Source Changes

34Managed by UT-Battelle for the U.S. Department of Energy Directory Layout A unified directory layout on every beamline – /home/controls/ Root of all (slow) controls files – /home/controls/{beamline}/ Beam-line-specific EPICS, CSS and OPI files – /home/controls/share/ Shared operator interface files – /home/controls/css/ CSS binaries, shared CSS configuration files – /home/controls/epics/ EPICS base, device support, extensions – /home/controls/var/ Variable area for EPICS IOCs (autosave files,...)

35Managed by UT-Battelle for the U.S. Department of Energy Directory Layout IOC applications Beamline specific environment setup file General epics environment setup file Support modules, such as areaDetector, motor records Extensions, such as ca gateway, ImageJ… Beamline specific CSS, scan server settings, startup scripts… Beamline specific configuration file

36Managed by UT-Battelle for the U.S. Department of Energy Environment setup Common setup - epics/R /setup.profile Beamline specific setup – bl99/setup.profile export EPICS_BASE=${EPICS}/base … export EPICS_HOST_ARCH=`"${EPICS_BASE}"/startup/EpicsHostArch.pl` … export JAVA_HOME=/usr/lib/jvm/java sun.x86_64 export PATH="${JAVA_HOME}/bin:$PATH" … umask 0002 … #source common setup source /home/controls/epics/R /setup.profile #specific IP address for each beamline export EPICS_CA_ADDR_LIST=" “ export EPICS_CAS_INTF_ADDR_LIST=" “ …

37Managed by UT-Battelle for the U.S. Department of Energy Beamline Configuration file – bl1/beamline.xml Required (soft) IOCs – Used by separate tools to start/stop as required Scan System Aliases – Available within scans Simulation Info – Slew rates DAQ info – Which channels to log with neutron data?

38Managed by UT-Battelle for the U.S. Department of Energy Soft IOC control –iocs.py Multiple soft IOCs on server, we need to – Start, Stop IOCs – Check IOCs Status – Connect to IOC console $ iocs.py -h Usage: iocs.py [options] status | update | start | stop | console | log {IOC name} Options: -h, --help show this help message and exit -c CONFIG_FILE Configuration file (default: beamline.xml) Command: status - Display status for all IOCs update - Assert that all 'active' IOCs are started, others stopped start - Start all IOCs that are not running stop - Stop all IOCs that are found running console - Open telnet connection to IOC's console (requires specific IOC name) log - Dump the IOC console log Command is applied to all IOCs unless specific IOCs are listed

39Managed by UT-Battelle for the U.S. Department of Energy Example setup can be downloaded from