Toy IOC Experiments, hierarchical EPICS database A side product of "V4" discussions with: Matthias Clausen, Bob Dalesio, Marty Kraimer, Steve Lewis. Kay-Uwe.

Slides:



Advertisements
Similar presentations
Make This work with EPICS! 2006
Advertisements

Control System Studio (CSS) Data Access Layer (DAL) Kay Kasemir, Xihui Chen July 2009.
PvData,pvAccess,pvIOC,pvService Status EPICS Meeting June 2011 NSRRC,Hsinchu, Taiwan Marty Kraimer, Guobao Shen, and Matej Sekoranja.
EPICS Channel Access Overview 2006
Status of VDCT Mark Pleško, Matej Šekoranja, John Maclean EPICS Meeting – Japan, 2004.
EPICS Architecture Version 3 Channel Access Client (CAC) Connection Data Transfers WAN/LAN/Local Connection Data Transfers Channel Access Server (CAS)
SNS Integrated Control System Running IOC Core on Windows and Linux Dave Thompson Wim Blokland Ernest Williams.
Channel Access Protocol Andrew Johnson Computer Scientist, AES Controls Group.
16 - Nov. 2000EPICS Workshop Oak Ridge1 Epics to TINE translator Matthias Clausen, DESY Hamburg Phil Duval, DESY Hamburg Zoltan Kakucs, DESY Hamburg.
V4 – Executive Summary 1.Provide online add/delete of I/O to support continuous operation. 2.Provide redundant control of remote I/O to support improved.
14 Nov 2000G3/FlexIO/PLC5/VSIOD8 Carl Lionberger 1 EPICS Support for G3/FlexIO/PLC5/VSIOD8 Carl Lionberger Group3™ optical-fiber-connected I/O AB FlexIO™
Dirk Zimoch, EPICS Meeting April 2007, Hamburg Siemens S7 PLC Communication.
The Soft-IOC Based Alarm Handler – an Operations View Pam Gurd October 31, 2007.
–Streamline / organize Improve readability of code Decrease code volume/line count Simplify mechanisms Improve maintainability & clarity Decrease development.
Agenda Adaptation of existing open-source control systems from compact accelerators to large scale facilities.
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.
JavaIOC Marty Kraimer EPICS Collaboration Meeting ICALEPCS October
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.
Channel Archiver Stats & Problems Kay Kasemir, Greg Lawson, Jeff Patton Presented by Xiaosong Geng (ORNL/SNS) March 2008.
Channel Archiver Introduction 2006
1 1999/Ph 514: State Notation Language EPICS State Notation Language (SNL) Ned D. Arnold APS.
EPICS Overview 2006 O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 2 What is EPICS?
Imperial College Tracker Slow Control & Monitoring.
1 Experimental Physics and Industrial Control System (EPICS) Database Bob Dalesio, May 31,2010.
Experimental Physics and Industrial Control System (EPICS) Database Bob Dalesio, June 27,2001.
EPICS devSNMP Extensions Euan Troup, CSIRO Australia Telescope National Facility ASKAP Project Paul Wild Observatory.
Ralph Lange: OPC Gateway (Device Support) OPC Gateway (Device Support) Ralph Lange – EPICS Collaboration Meeting March SSRF.
Dec 8-10, 2004EPICS Collaboration Meeting – Tokai, Japan MicroIOC: A Simple Robust Platform for Integrating Devices Mark Pleško
JavaIOC EPICS Meeting SSRF March Presented by: Marty Kraimer.
Running EPICS on NI CompactRIO Initial Experience Eric Björklund (LA-UR )
Making LabVIEW look like an IOC Kay-Uwe Kasemir, LANL May 2002.
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.
ORNL is managed by UT-Battelle for the US Department of Energy EPICS Automation Kay Kasemir, SNS/ORNL June 2014.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
General Time Update David Thompson Epics Collaboration Meeting June 14, 2006.
Experience Running Embedded EPICS on NI CompactRIO Eric Björklund Dolores Baros Scott Baily.
SNS Alarm System Status Curtis Dunn Control System Suite/Eclipse Frameworks Workshop EPICS Collaboration Meeting June 12-16, 2006.
Stepper Motor Control, PLC vs VME Herb Strong, Pam Gurd Spallation Neutron Source Oak Ridge National Laboratory October 17, 2007.
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.
Managed by UT-Battelle for the Department of Energy CSS Update Matthias Clausen, Helge Rickens, Jan Hatje and DESY Delphy Armstrong, Xihui Chen,
EPICS EPICS Limitations Bob Dalesio Marty Kraimer.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays - done for rsrv in 3.14 Channel access priorities - planned to.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
At the SNS Kay Kasemir, Xiaosong Geng, Dave Purcell ORNL/SNS March 2008.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
1. LabVIEW and EPICS Workshop EPICS Collaboration Meeting Fall 2011.
Channel Access Client Coding 2006
EPICS Development for the ASKAP Design Enhancements Program ASTRONOMY AND SPACE SCIENCE Craig Haskins 18 th October 2015 EPICS User Meeting – Melbourne.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays Channel access priorities Portable server replacement of rsrv.
ROCS Web Based Reporting Tool Using SNS Relational Database By Katia Danilova, Ernest L. Williams Jr. Control Systems group, ASD, SNS.
Applications Kay Kasemir ORNL/SNS Using Information and pictures from Matthias Clausen, Jan Hatje, and Helge Rickens (DESY) October 2007.
B. Dalesio, N. Arnold, M. Kraimer, E. Norum, A. Johnson EPICS Collaboration Meeting December 8-10, 2004 Roadmap for IOC.
EPICS and LabVIEW Tony Vento, National Instruments
1 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Flow of Control Marty Kraimer APS.
XAL based PV Browser Jeff Patton, Chris Fowlkes EPICS Collaboration Meeting – RDB SIG June 12, 2006.
Managed by UT-Battelle for the Department of Energy Kay Kasemir Jan Experimental Physics and Industrial Control System.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
SNS Control System Slide 1, 4/19/2002 EPICS Interlock Experience Kay-Uwe Kasemir, Los Alamos National Laboratory Presented at the EPICS Collaboration Meeting.
Channel Access Security 2006 O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 2 Channel Access Security  The IOC Application.
1 1999/Ph 514: Lab #2 : IOC Database EPICS Lab #2 IOC Database.
Using COTS Hardware with EPICS Through LabVIEW – A Status Report EPICS Collaboration Meeting Fall 2011.
JavaIOC Overview and Update
Andrew Johnson and Eric Norum AES Controls Group, Argonne
LCLS-II 2K Cold Box Controls Design Review
Banafsheh Hajinasab Based on presentation by K. Strnisa, Cosylab
What is “Control System” or “Framework”?
Presentation transcript:

Toy IOC Experiments, hierarchical EPICS database A side product of "V4" discussions with: Matthias Clausen, Bob Dalesio, Marty Kraimer, Steve Lewis. Kay-Uwe Kasemir, June 2006

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 2 DOE Semi-annual Review, May 2-3, 2006 The Toy IOC  IOC to try V4 ideas.  Java  Jython as Shell  Reads Databases, processes Records  Uses Java Introspection to  locate Record implementations  locate Link Handlers (Constant, Database, CA V3, File, Random).  handle Data (Scalar Double, String, Boolean, Enum).

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 3 DOE Semi-annual Review, May 2-3, 2006 Analog Input Records, Links  Constant (and "PINI"): true 3.14  Read numbers from a file: true example/data.dat  Database links, which can ‘process’ their source/target ("PP"): 1.0 second data.value

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 4 DOE Semi-annual Review, May 2-3, 2006 Analog Input Records, Links  Read a CA3 link, process when link updates ("CP"):  Type ‘ca3’ or ‘database’ needs to be explicit. fred  Read random number "device", proc. when link updates ("I/O Intr"): 1.0

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 5 DOE Semi-annual Review, May 2-3, 2006 String Record  String records can use the same links, converting data to string if necessary: 1.0 second example/data.dat copy data.value random 10.0  Forward links as usual.  More than one is allowed.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 6 DOE Semi-annual Review, May 2-3, 2006 Calc Record Ramp Up 1.0 second counter.value 1.0 v + uno Counts  CALC inputs  have user-defined names  have no arbitrary limit to their number.  Strings in general  no arbitrary length limits for record name, description, units,..

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 7 DOE Semi-annual Review, May 2-3, 2006 A Link is a Link  On the API level, "Link" is an interface:  read,  write,  add/remove State and Value listeners.  The CALC record reads or monitors links  Any link type allowed.  No need for intermediate AI records to read from "device". 1.0 second example/data.dat 1.0 v + n

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 8 DOE Semi-annual Review, May 2-3, 2006 Records and their Fields, Channels and their Properties  EPICS currently distinguishes between  Channel "fred == fred.VAL" with Properties { value, status, severity, stamp, units, …} and  Record "fred" with Fields { VAL, STAT, SEVR, TIME, EGU, … }  Mapping of Fields to Properties  Almost only makes sense for channel "*.VAL".  Is hidden in record support code.  Experience from EPICS training and questions:  Causes a lot of confusion.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 9 DOE Semi-annual Review, May 2-3, 2006 Why not Channel=Record, Prop.=Field?…  Record provides a list of properties.  Properties allow read/write/monitor.  A client who wants DBR_TIME_DOUBLE asks for { "status", "severity", "time", "value" }.  Subscribers get whatever changes.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 10 DOE Semi-annual Review, May 2-3, 2006 "Water Heater" from EPICS Training  Implemented as Toy IOC Database:  Prop. & Integral Controller  …  … "error_sum" … "output" …  Water Heater & Water Tank Temperature Simulation  … "temperature" …  ‘Push’ data into V3 soft-IOC for e.g. StripTool  "ao" records … R3.14 Soft IOC, CA Server Toy IOC: Record Logic, CA3 Client

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 11 DOE Semi-annual Review, May 2-3, 2006 So far so good  Quite similar to V3.  What else could one do?  What do others do?

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 12 DOE Semi-annual Review, May 2-3, 2006 What’s the difference between…  Tango, ACS, DOOCS, NIF, RHIC, CDEV, …. and EPICS?  EPICS  "IOC" Application Framework: Database, Sequencer.  Channel Access: Generic, flat list of channels.  "The Rest"  More DIY front-end coding, using C/C++/Java libs.  Network protocol: OO Interfaces to "Device" Objects.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 13 DOE Semi-annual Review, May 2-3, 2006 Front-end Computer: * Time critical control loops, interlocks, … * Provide network access Where do EPICS or "The Rest" excel? Analog & Digital I/O VME, PCI, Ethernet, USB, … DSP, FPGAPLC, "Intelligent" Instrument Mid-level Control: * Less time critical control loops * Informational summaries * Operator convenience sequences Ethernet High-level Control: * Physics Experiments Operator Interface

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 14 DOE Semi-annual Review, May 2-3, 2006 What EPICS V3 does very well…  EPICS Database handles scheduling, I/O, conversion, smoothing, limits, and network updates for simple devices (VME register, ADC/DAC channel): record(ai, "temp") { SCAN"1 second" DTYP"XY ADC" INP"#C2 S3" LINR"typeKdegC" EGU "deg C" HIGH"40.0" SMOO"0.5" MDEL"0.01" … }  Database configuration instead of C/C++/Java code creation avoids many pitfalls.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 15 DOE Semi-annual Review, May 2-3, 2006 What EPICS V3 does less well…  Data on FPGA, DSP, PLC, Intelligent Device already has its own units, limits, conversion parameters, alarms.  How to map those to fields of an ai or ao record?  Often, you don’t, and spread the data across many records: ai "value", mbbi "status", ao "low_limit", …  Do custom record types help?  Are there record types "Pump", "Valve", "BPM"?  Record type creation is hard, the results are rarely shared.  PID, ePID, cPID, a few "Magnet" records.  Lack of structure above PV level:  A PV is just a named number.  No way to find the "status" PV for a "value" PV, or the "setpoint" for a "readback".

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 16 DOE Semi-annual Review, May 2-3, 2006 What is "The Rest" up to?  Object-Oriented "Device" interfaces instead of PVs  MagnetPS: current setpoint, current readback, on/off status, ‘on’ command, ‘off’ command.  CurrentLimitedRampingMagnetPS: MagnetPS + current limit, current ramp rate.  Advantages:  OPIs can auto-configure based on the device type.  Higher-level applications: Command-completion, compile and run-time type safety.  Physics Applications can search for "all BPMs in sector 7" (A name server as well as device type issue).

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 17 DOE Semi-annual Review, May 2-3, 2006 Issues with "The Rest"  Limited IOC development support:  Network library, maybe a code skeleton generator, but below that it’s do-it-yourself C/C++/Java code.  Lack of runtime database means  Possibility of bugs related to scanning, threading.  More difficult to understand somebody else’s application, since one can’t peek into known records.  No runtime changes unless anticipated in your custom code.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 18 DOE Semi-annual Review, May 2-3, 2006 Can one have it all?  A runtime database?  "Devices" on the network?  Simplified creation of new record types?

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 19 DOE Semi-annual Review, May 2-3, 2006 Create New Record Types?  Problem with PID, ePID, cPID, Magnet record:  There’s typically something inside that you don’t like.  C/C++ Code. Hard to modify by "IOC database" person.  Compare: LEGO  You hardly want to create new LEGO blocks.  The simpler the blocks, the better.  Important: They can be combined.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 20 DOE Semi-annual Review, May 2-3, 2006 Idea: Simpler Records…  Make existing records simpler  BO with ‘HIGH’  remove from BO, have separate DELAY record.  CALCOUT  2 CALC, new CONDITION record, AO.  MOTOR, PID, …  a whole bunch of records.  … but allow combination of those simple records.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 21 DOE Semi-annual Review, May 2-3, 2006 Condition Record 1.0 second toggle.value 1.0-v toggle.value yes no  Compare to CALCOUT  More obvious, yet in principle more versatile.  Current implementation only "if true", "if false"; no "on change", "on transition to 0" etc. as in CALCOUT.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 22 DOE Semi-annual Review, May 2-3, 2006 Simpler … But With Hierarchy  We usually have hierarchy in the  Underlying problem,  RDB structures used to create EPICS database,  Naming Standards,  Capfast or now also VDCT schematics.  Yet EPICS records are flattened?  Why not keep the records hierarchical?  Database view, accessible at runtime, better matches the problem/RDB/naming/schematics.  Eases the mapping to "devices" seen on the network.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 23 DOE Semi-annual Review, May 2-3, 2006 Device Record Device Test 1.0 second example/data.dat tics setpoint.value tocs  Record type "device" contains other (sub-)records.  Records process as usual, "device" really only a namespace.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 24 DOE Semi-annual Review, May 2-3, 2006 IOC Shell View (Jython) >>> ioc.loadRecords("example/device101.xml") >>> ioc.start() >>> ioc.ls() ’thingy' >>> ioc.ls('thingy') 'thingy' : [scan, initial_process, description, process_active, debug, time, status, forward, /setpoint, /readback] >>> ioc.ls('thingy/readback') 'thingy/readback' : [input, value, units, scan, initial_process, description, process_active, debug, time, status, forward] >>> ioc.get('thingy/readback.value') ’thingy/readback.value' = 10.0

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 25 DOE Semi-annual Review, May 2-3, 2006 Hierarchy  Current implementation: File System idea for Names. /thingy /setpoint.value,.units, … /readback.value,.units, …  On the network, this could map to a "device" with properties "setpoint" and "readback"  May need added "device class" description, so database can assert that a "device record" indeed provides all properties which clients expect.  Still: Properties for the "device" on the network provided by records, not custom C/C++/Java code.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 26 DOE Semi-annual Review, May 2-3, 2006 Motor Example  Device record with  Command, position, limit switches, …  Reads commands from file.  Simulates stepper motor.  Sends certain values via "ao" record to a V3 soft IOC for StripTool plot.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 27 DOE Semi-annual Review, May 2-3, 2006 IOC Shell for Motor Example >>> lsR() motor +-- motor/command +-- input +-- value +-- units +-- description motor/limit_switches motor/limit_switches/low +-- input +-- calc +-- value +-- units motor/limit_switches/high...

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 28 DOE Semi-annual Review, May 2-3, 2006 IOC Shell for Motor Example… >>> ls('motor') 'motor' : [scan, initial_process, description, process_active, debug, time, status, forward, /command, /state, /limit_switches, /new_state, /position, /ca3_pusher] >>> cd('motor/position') >>> ls() 'motor/position' : [input, calc, value, units, scan, initial_process, description, process_active, debug, time, status, forward] >>> get('time', 'status', 'value', 'units') 'motor/position.time' = 2006/06/06 16:42: 'motor/position.status' = ok 'motor/position.value' = 'motor/position.units' = mm

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 29 DOE Semi-annual Review, May 2-3, 2006 Summary  Toy IOC  Java platform (with Eclipse IDE) to try V4 ideas.  Record Types  can be simpler (no BO.HIGH, no CALCOUT, no PID …),  combining the simpler records gives same functionality.  Record Hierarchy  Often better maps problem, schematics, RDB, … to the EPICS database.  Basis for mapping EPICS database to "devices" on the network as now used by everything but EPICS.

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 30 DOE Semi-annual Review, May 2-3, 2006

O AK R IDGE N ATIONAL L ABORATORY U. S. D EPARTMENT OF E NERGY 31 DOE Semi-annual Review, May 2-3, 2006 More Ideas  Processing a "Device" record currently does nothing  Unless one makes its point to e.g. one of the records inside the device...  "Device" record has no meaningful properties of its own  Could add input and output ports which map to properties of embedded records: setpoint …  Mapping to "device" on network could be restricted to ports, while remaining sub-records stay ‘private’. On the other hand, EPICS V3 does well with making everything network-accessible…