ORNL is managed by UT-Battelle for the US Department of Energy EPICS Automation Kay Kasemir, SNS/ORNL June 2014.

Slides:



Advertisements
Similar presentations
EPICS Channel Access Overview 2006
Advertisements

Lecture 11: Operating System Services. What is an Operating System? An operating system is an event driven program which acts as an interface between.
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.
Advanced EPICS Training, Dirk Zimoch 2008 Channel Access in Matlab.
Final Year Project Progress January 2007 By Daire O’Neill 4EE.
SNS Beamline Experiment Control (Future) Xihui Chen, Kay Kasemir 4/15/2013.
ORNL is managed by UT-Battelle for the US Department of Energy EPICS V4 for SNS Neutron Data Kay Kasemir Oct
Tracker Controls MICE Controls and Monitoring Workshop September 25, 2005 A. Bross.
Course Map The Java Programming Language Basics Object-Oriented Programming Exception Handling Graphical User Interfaces and Applets Multithreading Communications.
Managed by UT-Battelle for the Department of Energy Kay Kasemir Sept EPICS EtherIP Driver.
Department of Computer Science 1 CSS 496 Business Process Re-engineering for BS(CS)
Department of Computer Science 1 CSS 496 Business Process Re-engineering for BS(CS)
INTRUSION DETECTION SYSTEMS Tristan Walters Rayce West.
EtherIP Driver Kay Kasemir, July 2009.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS April 2013 Control System Studio Training - Alarm System Use.
Control System Studio (CSS)‏ Kunal Shroff EPICS Training Meeting 07/10/2010.
ORNL is managed by UT-Battelle for the US Department of Energy EPICS State Notation Language (SNL), “Sequencer” Kay Kasemir, SNS/ORNL Many slides from.
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.
1 1999/Ph 514: State Notation Language EPICS State Notation Language (SNL) Ned D. Arnold APS.
ORNL is managed by UT-Battelle for the US Department of Energy Control System Studio: Overview Kay Kasemir, SNS/ORNL June 2014.
Control System Studio: An Integrated Toolset Kay Kasemir, ORNL/SNS CS-Studio, 2014 FRIB1.
Managed by UT-Battelle for the Department of Energy EPICS Database … in 1 hour?! Kay Kasemir, SNS/ORNL Many slides from Andrew Johnson, APS/ANL, Jan
BROOKHAVEN SCIENCE ASSOCIATES High level applications and EPICS control GUOBAO SHEN NSLS-II, Control Group May 4 th, 2009.
EPICS Overview 25 August 2009 Matt Boyes EPICS Overview Lecture 1 Matt Boyes.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Feb EPICS ’Stream’ Device Support.
‘ActiveX’ CA Server (… and Client) Oct Kay-Uwe Kasemir, LANL.
Making LabVIEW look like an IOC Kay-Uwe Kasemir, LANL May 2002.
10/20/2015J-PARC1 Control Room Accelerator Physics Channel Access – Connection to Hardware Through EPICS Getting Information directly from the Control.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Oct EPICS Meeting, PAL, Korea Control System Studio Training.
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 Oct EPICS Meeting, PAL, Korea Control System Studio Training.
Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1.
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.
Integrating EPICS and LabVIEW on Windows using DCOM Freddie Akeroyd ISIS Computing Group.
Managed by UT-Battelle for the Department of Energy EPICS Sequencer Kay Kasemir, SNS/ORNL Many slides from Andrew Johnson, APS/ANL Feb
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
O PERATING S YSTEM. What is an Operating System? An operating system is an event driven program which acts as an interface between a user of a computer,
1. LabVIEW and EPICS Workshop EPICS Collaboration Meeting Fall 2011.
Managed by UT-Battelle for the Department of Energy EPICS Database Kay Kasemir, SNS/ORNL Many slides from Andrew Johnson, APS/ANL Sept
Connecting LabVIEW to EPICS network
1 Channel Access Concepts – IHEP EPICS Training – K.F – Aug EPICS Channel Access Concepts Kazuro Furukawa, KEK (Bob Dalesio, LANL)
1 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Flow of Control Marty Kraimer APS.
Managed by UT-Battelle for the Department of Energy Kay Kasemir Jan Experimental Physics and Industrial Control System.
EPICS Records J. Frederick Bartlett Fermilab June 1,1999.
The use of EPICS as a C&I tool for the RFQ accelerator facility at Necsa Mr M. Matabane.
SNS Control System Slide 1, 4/19/2002 EPICS Interlock Experience Kay-Uwe Kasemir, Los Alamos National Laboratory Presented at the EPICS Collaboration Meeting.
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.
ICS WP3 – Software Core Components Suzanne Gysin Work Package Lead November 25, 2014.
ORNL is managed by UT-Battelle for the US Department of Energy Status Report: Data Acquisition and Instrument Controls for the Spallation Neutron Source.
Sockets A popular API for client-server interaction.
BOY, A Modern Graphical Operator Interface Editor and Runtime Xihui Chen, Kay Kasemir RAD Control Group.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC , the State of Michigan.
Using COTS Hardware with EPICS Through LabVIEW – A Status Report EPICS Collaboration Meeting Fall 2011.
Michael Thomas and Conlog.
Michael Thomas and Conlog.
Plan to use EPICS in home security service
Lecture 1: Operating System Services
Laboratorio per dottorandi 2017 Particle Accelerators Control System
Integration of Blu-Ice into
EPICS: Experimental Physics and Industrial Control System
EPICS APPLICATION DEVELOPMENT
The Lua Chunk Vault, an enhancement to epics base
Presentation transcript:

ORNL is managed by UT-Battelle for the US Department of Energy EPICS Automation Kay Kasemir, SNS/ORNL June 2014

2 Control System.. should support automated control. How can EPICS do this?

3 Monitoring, Supervisory Control IOC record(ai, “sensor”) { field(DTYP, “SensorXYZ”) field(INP, signal2”) field(SCAN, “1 second”).. record(ao, “voltage”) { field(DTYP, “PowerSupplyABC”) field(OUT, signal4”) field(SCAN, “Passive”).. IOC record(ai, “sensor”) { field(DTYP, “SensorXYZ”) field(INP, signal2”) field(SCAN, “1 second”).. record(ao, “voltage”) { field(DTYP, “PowerSupplyABC”) field(OUT, signal4”) field(SCAN, “Passive”).. User Interface Channel Access ‘monitor’ Channel Access ‘put’

4 Automation via Records on IOC IOC record(ai, “sensor”) { field(DTYP, “SensorXYZ”) field(INP, signal2”) field(SCAN, “1 second”).. record(calcout, “control_voltage”) { field(INPA, “sensor CP”) field(CALC, “A<10?5:0”) field(OUT, “voltage PP”) } record(ao, “voltage”) { field(DTYP, “PowerSupplyABC”) field(OUT, signal4”) field(SCAN, “Passive”).. IOC record(ai, “sensor”) { field(DTYP, “SensorXYZ”) field(INP, signal2”) field(SCAN, “1 second”).. record(calcout, “control_voltage”) { field(INPA, “sensor CP”) field(CALC, “A<10?5:0”) field(OUT, “voltage PP”) } record(ao, “voltage”) { field(DTYP, “PowerSupplyABC”) field(OUT, signal4”) field(SCAN, “Passive”).. Data flow driven, periodic, steady-state control: 1.Read inputs 2.Compute desired outputs calc, calcout records 3.Write outputs

5 Distribute Records onto different IOCs IOC record(calcout, “control_voltage”) { field(INPA, “sensor MS CP”) field(CALC, “A<10?5:0”) field(OUT, “voltage PP”) field(IVOA, “Don’t drive outputs”) } IOC record(calcout, “control_voltage”) { field(INPA, “sensor MS CP”) field(CALC, “A<10?5:0”) field(OUT, “voltage PP”) field(IVOA, “Don’t drive outputs”) } IOC record(ai, “sensor”) { field(DTYP, “SensorXYZ”) field(INP, signal2”) field(SCAN, “1 second”).. record(ao, “voltage”) { field(DTYP, “PowerSupplyABC”) field(OUT, signal4”) field(SCAN, “Passive”).. IOC record(ai, “sensor”) { field(DTYP, “SensorXYZ”) field(INP, signal2”) field(SCAN, “1 second”).. record(ao, “voltage”) { field(DTYP, “PowerSupplyABC”) field(OUT, signal4”) field(SCAN, “Passive”).. Channel Access Almost no additional work! Anticipate network issues; see ‘MS’, ‘IVOA’

6 Automation via State Machine IOC record(ai, “sensor”) { field(DTYP, “SensorXYZ”) field(INP, signal2”) field(SCAN, “1 second”).. record(ao, “voltage”) { field(DTYP, “PowerSupplyABC”) field(OUT, signal4”) field(SCAN, “Passive”).. IOC record(ai, “sensor”) { field(DTYP, “SensorXYZ”) field(INP, signal2”) field(SCAN, “1 second”).. record(ao, “voltage”) { field(DTYP, “PowerSupplyABC”) field(OUT, signal4”) field(SCAN, “Passive”).. “Sequencer”, “State Notation Language”: Event driven, on-demand, stateful Start Low reading High reading sensor > 5 Set voltage to … Sensor < 5 Set voltage to …

7 Automation via Scripts IOC record(ai, “sensor”) record(ao, “voltage”) IOC record(ai, “sensor”) record(ao, “voltage”) #!/usr/bin/env python from epics import caget, caput import time while True: sensor = caget(“sensor”) voltage = 5 if sensor < 10 else 0 caput(“voltage”, voltage) time.sleep(1.0) #!/usr/bin/env python from epics import caget, caput import time while True: sensor = caget(“sensor”) voltage = 5 if sensor < 10 else 0 caput(“voltage”, voltage) time.sleep(1.0) Channel Access Tempting, but –Error Handling? –caget? Monitor! –caput? Connect once, then re-use the connection! –Handle disconnects, re-connects Should have ‘console’, run under procServ –IOC has shell; Calc record has CALC, SCAN, INPA,.. Long-term maintenance of “Fred’s script”?

8 IOC record(ai, “sensor”) record(ao, “voltage”) IOC record(ai, “sensor”) record(ao, “voltage”) Channel Access CSS ‘BOY’ Examples: Check allowed values –What if other CA client writes to PV? Use DRVH, DRVL, calc records,.. to perform check on IOC Start threads for automation scripts –What if users open multiple user interfaces? –What if GUI crashes (which is more likely than IOC)? Keep user interface as just that! Automation via User Interface

9 Automation with EPICS Records –Steady-data, data flow driven operations –Continuous: Read input, compute, write output –Limited conditional processing: calcout.OOPT State Notation Language –On-demand, event driven –Stateful: In State X, if Y happens,.. Scripts –Useful for “I need this just once, but I need it now” –Permanent “Python IOCs” require effort similar to IOCs