JavaIOC EPICS Meeting SSRF March 12-14 2008 Presented by: Marty Kraimer.

Slides:



Advertisements
Similar presentations
JavaIOC Overview and Update EPICS Seminar/Workshop Raja Ramanna Centre For Advanced Technology Indore India January Presented by: Marty Kraimer.
Advertisements

1 1999/Ph 514: Channel Access Concepts EPICS Channel Access Concepts Bob Dalesio LANL.
PvData,pvAccess,pvIOC,pvService Status EPICS Meeting June 2011 NSRRC,Hsinchu, Taiwan Marty Kraimer, Guobao Shen, and Matej Sekoranja.
EPICS Base R and beyond Andrew Johnson Computer Scientist, AES Controls Group.
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)
PvData,pvAccess,javaIOC,pvService Status EPICS Meeting Aix-en-Provence, France Marty Kraimer, Guobao Shen, and Matej Sekoranja.
Pete Owens MICE Controls & Monitoring Workshop 25th September 2006 MICE Control and Monitoring: General Architecture Subsystem Integration User Interface.
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.
Abeans Application Framework and Widgets Running with EPICS EPICS Workshop, Berlin, May 2002 M.Plesko on behalf of KGB Team J. Stefan Institute and Cosylab.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
EPICS Meeting, APS, June 14 th 2006 MCS-8 The 8 axes motion control system Rok Šabjan
Agenda Adaptation of existing open-source control systems from compact accelerators to large scale facilities.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
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
1 1999/Ph 514: State Notation Language EPICS State Notation Language (SNL) Ned D. Arnold APS.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
SNS Integrated Control System EPICS Collaboration Meeting SNS Machine Protection System SNS Timing System Coles Sibley xxxx/vlb.
ICS – Software Engineering Group 1 The SNS General Time Timestamp Driver Sheng Peng & David Thompson.
Imperial College Tracker Slow Control & Monitoring.
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
Dec 8-10, 2004EPICS Collaboration Meeting – Tokai, Japan MicroIOC: A Simple Robust Platform for Integrating Devices Mark Pleško
JavaIOC Status EPICS Meeting Vancouver May Presented by : Marty Kraimer Contributions by: Matej Sekoranja(cosyLab), Shen Guobao(BNL), Sheng Peng.
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.
1/15 G. Manduchi EPICS Collaboration Meeting, Aix-en-Provence, Spring 2010 INTEGRATION OF EPICS AND MDSplus G. Manduchi, A. Luchetta, C. Taliercio, R.
JavaIOC Status EPICS Meeting ICALEPCS2009 Kobe Japan Marty Kraimer And Matej Sekoranja.
New Features in EPICS V4 Release 4.4 EPICS Meeting 2014, CEA, October 2014 Marty Kraimer, Matej Sekoranja.
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.
1 EPICS Linux Based IOC Support EPICS Meeting at BESSY May 2002 Marty Kraimer.
Jožef Stefan Institute Oct. 8-9, 2005ACS 2005 Workshop Comparison of EPICS and ACS M. Plesko – JSI and Cosylab, in collaboration with Phil Duval, DESY.
Automated Testing Presentation to EPICS Collaboration Meeting DESY Paul Gibbons PhD Diamond Light Source Ltd.
Integrating EPICS and LabVIEW on Windows using DCOM Freddie Akeroyd ISIS Computing Group.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
ICALEPCS (Geneva, Switzerland, October, 2005) Visual DCT’s Latest Hits Jaka Bobnar Matej Sekoranja, Igor Verstovsek.
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.
Reliability/ Secure IOC / Outlook M. Clausen / DESY 1 CA-Put Logging BurtSave Warm Reboot Matthias Clausen DESY/ MKS.
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.
07/10/2007 VDCT Status Update EPICS Collaboration, October 2007 Knoxville, Tennessee
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
1. LabVIEW and EPICS Workshop EPICS Collaboration Meeting Fall 2011.
EPICS Development for the ASKAP Design Enhancements Program ASTRONOMY AND SPACE SCIENCE Craig Haskins 18 th October 2015 EPICS User Meeting – Melbourne.
Source Controller software Ianos Schmidt The University of Iowa.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays Channel access priorities Portable server replacement of rsrv.
Argonne National Laboratory is managed by The University of Chicago for the U.S. Department of Energy ICALEPCS 2005: EPICS Workshop EPICS V4 : Runtime.
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
PROGRAMMING PRE- AND POSTCONDITIONS, INVARIANTS AND METHOD CONTRACTS B MODULE 2: SOFTWARE SYSTEMS 13 NOVEMBER 2013.
B. Dalesio, N. Arnold, M. Kraimer, E. Norum, A. Johnson EPICS Collaboration Meeting December 8-10, 2004 Roadmap for IOC.
PvaPy: Python API for EPICS PV Access Siniša Veseli Scientific Software Engineering & Data Management Advanced Photon Source EPICS Meeting October 2015.
1 Channel Access Concepts – IHEP EPICS Training – K.F – Aug EPICS Channel Access Concepts Kazuro Furukawa, KEK (Bob Dalesio, LANL)
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.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
16th Oct 08 Tom Cobb - Python at DLS 1 Uses of Python at Diamond Light Source.
Software tools for digital LLRF system integration at CERN 04/11/2015 LLRF15, Software tools2 Andy Butterworth Tom Levens, Andrey Pashnin, Anthony Rey.
Monitoring Dynamic IOC Installations Using the alive Record Dohn Arms Beamline Controls & Data Acquisition Group Advanced Photon Source.
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.
JavaIOC Overview and Update
SLAC USA Marty Kraimer and Matej Sekoranja
pvData,pvAccess,pvIOC,pvService Overview and Status EPICS Meeting
pvData,pvAccess,pvIOC,pvService Overview and Status EPICS Meeting
Operating Systems : Overview
Operating Systems : Overview
Channel Access Concepts
pvData,pvAccess,pvIOC,pvService Overview and Status EPICS Meeting
Channel Access Concepts
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

JavaIOC EPICS Meeting SSRF March Presented by: Marty Kraimer

Overview JavaIOC – What is it. Features. What is implemented. What is missing. Example of Implementing a “Device”  positioner record.

March EPICS Meeting SSRF3 JavaIOC – What Is It? IOC - Input/Output Controller Has a “smart” real time database  Record instances can be processed.  Records can be accessed via Channel Access.  Records can link to hardware, other records, etc. Has functionality like an EPICS IOC but  Structured data  Better Array data  Generic Support  Written in Java

March EPICS Meeting SSRF4 Features PV (Process Variable) Database DBD - Database Definition Database DB – Runtime Database of record instances XML Parsers for DBD and DB Record Processing and Monitoring Record Scanning: Periodic and Event Channel Access Generic structure/recordTypes and support

March EPICS Meeting SSRF5 PV Database Field types  Primitive: all Java primitives except char boolean, byte, short, int, long, float, double  string: implemented as a Java String  structure: has fields. Each field can be any type  array: has elementType which can be any type Complex Structures fully supported Introspection and Data interfaces: Provide access to any field.

March EPICS Meeting SSRF6 PV Introspection Introspection Interfaces, i.e. no data  Field: Methods: getType, getFieldName,...  Array: extends Field: Method: getElementType  Structure: extends Field Methods: getFields, getStructureName FieldFactory  Implements introspection interfaces  Can be extended but probably not necessary

March EPICS Meeting SSRF7 PV Data Interfaces PVField: Base for data: Methods: getField,...  PVBoolean,...,PVString : Methods: get,put  PVArray: Base for array data interfaces PVBooleanArray,...,PVArrayArray : Methods get,put  PVStructure provides access to a structure.  PVRecord provides access to a record instance. PVDataFactory  Default implementation.  Any PVField can be replaced. Often useful ConvertFactory: Convert between data types

March EPICS Meeting SSRF8 org.epics.ioc.pv Self Contained Java package for PV Data Can be used for purposes other than JavaIOC Database  Example: Channel Access Local and EPICS client use PVData  It is designed to be used for other purposes. Via structures it could support  Vector/Matrix Data  Image Data  etc.

March EPICS Meeting SSRF9 XML Parsers DBD - Database Definitions  structure  recordType - A top level structure  create – defines factory that replaces default data implementation.  support – defines a factory that implements support for a field. DB – Database of record Instances Macro Substitution and Include supported for both DBD and DB

March EPICS Meeting SSRF10 DB Database and Record Processing DB Database provides  Record Locking – A record instance can be locked.  Ability to monitor puts to any field of a record instance.  Register and locate support for record and fields of a record. Record Processing  Coordinates processing of a record instance.  Both synchronous and asynchronous processing are supported.  Each instance can have at most one record processor. A record can be self processed. Simulates multiple processors. Get and Put support  Can process after put. Also supported by EPICS.  Can process before get. Not supported by EPICS.  Can put, then process, then get. Not supported by EPICS.

March EPICS Meeting SSRF11 Record Processing A record instance is basic process unit  It is locked during any processing or I/O  RecordProcess is master. It calls support for record instance.  Support modules implement semantics  ANY field can optionally have support  Record instance must have support

March EPICS Meeting SSRF12 Record Scanning Scan  Types: passive, periodic, event  Priority Uses Java priorities  Threads created as required Periodic  Arbitrary rate: minRate,deltaRate Event  Based on eventName  Replaces EPICS event and I/O Inter

March EPICS Meeting SSRF13 Support Implements Record Processing Semantics Each record instance has support Each field can optionally have support Support can call other support Support provided with javaIOC is as generic as possible  During initialization looks for required fields and support  If required fields not found then does not start Example: generic – support for a structure or array  Calls support for each sub field that has support  Each support must finish before next is called  Supports a recordType or a structure or an array of arrays or structures

March EPICS Meeting SSRF14 Channel Access Local: Within javaIOC Server: Channel Access Client javaIOC Database  Any field that is primitive or array of primitive.  Support for all DBR types.  Support for process, getProcess, and putProcess Client: javaIOC EPICS IOC or CAS  Support for all EPICS data types.  Support for DBR types, i.e. Can get display, control, alarm, etc.  Link support for javaIOC records. Both Server and Client implemented via JCA/CAJ.  Cosylab extended JCA/CAJ to support CA Server as well as Client  Matej Sekoranja from Cosylab implemented the javaIOC Server. Currently no full javaIOC Channel Access, e.g. No support for structures.

March EPICS Meeting SSRF15 PV Naming for CA Server EPICS pvname is.field JavaIOC is.name.name....{options}  name can be field name or a property  Some examples example.value example (same as example.value) example.value.display.limit.low powerSupply.power.value psArray.supply[0].power.value Options are of the form name=value. Currently only  getProcess=true and putProcess=true  Examples using EPICS base ca utilities caget example.value{getProcess=true} camonitor psArray[1].power caput powerSupply.power{putProcess=true} 10.0

March EPICS Meeting SSRF16 Swtshell Shell for javaIOC GUI shell for javaIOC implemented via Eclipse SWT. My most important tool for testing javaIOC.  Before Channel Access support only convenient way to test.  Still very usefull. GUI part should be remote.  Not until full Channel Access Support for javaIOC Next slide shows appearance.

March EPICS Meeting SSRF17

March EPICS Meeting SSRF18 Implemented PV (Process Variable) Database XML Parsers: DBD and Record Instance Record Processing/Scanning/Monitoring Channel Access  Channel Access Local  EPICS CA Server  EPICS CA Client Generic record/structures and support PortDriver – JavaIOC implementation of ASYN Support SWTSHELL: GUI iocshell

March EPICS Meeting SSRF19 Not Implemented Replacement for EPICS calc support. Replacement for EPICS sequencer. Channel Access  JavaIOC client JavaIOC server  Full Introspection and structure support VDCT: Visual Database Configuration Tool Access security Error logging ??? Lots to do!! BUT – It is ready for at least soft IOC Support.

March EPICS Meeting SSRF20 Device Record Example: Positioner Positioner Requirements  Coordinate the movement of a set of motors  A movement consists of Start all motors. Monitor motors for movement When all motors have stopped finish processing. Example Usage – Xray beam line  Scan Sample – repeat following until done. Move sample to new position Take data  Positioner coordinates two steps. Design must also support a single motor

March EPICS Meeting SSRF21 Structure and enum Definition For MotorCommand <field name = "choices" type = "array" elementType = "string" default = "idle stop move monitor jog reset" /> public enum MotorCommand { idle,stop,move,monitor,jog,reset }  structure definition Commands can be issued via Channel Access  For EPICS V3 Channel Access the field appears as a DBR_ENUM  enum definition for use by code  This talk mostly about move and monitor

March EPICS Meeting SSRF22 Structure and enum Definition For MotorMonitorCommand <field name = "choices" type = "array" elementType = "string" default = "idle monitor" /> public enum MotorMonitorCommand { idle,monitor } Structure Definition  Commands can be issued via Channel Access  For EPICS V3 Channel Access the field appears as a DBR_ENUM Enum definition for use by code.

March EPICS Meeting SSRF23 Monitor Not Compatible With Other Commands All commands except monitor start some action Monitor (get current position) must be done repeatedly until motors stop Solution: Two record instances Record type positioner – Has an array of embeded motors  Motor is both a structure and a recordType The structure is embeded in positioner The recordType is for single motor Record type motorMonitor  Has link to a positioner or motor record  Action for a putProcess to command.monitor Monitor linked record until not moving Finish processing

March EPICS Meeting SSRF24 Positioner vs synAPPS SynAPPS (Beam line Control Software used by many EPICS facilities)  Has table record which is positioner  It links to motor or other records. Positioner record encapsulates all motors within a single record  Makes sense when motors only used for positioning  The user thinks of the positioner as a single device that happens to have components

March EPICS Meeting SSRF25 Typical Client Usage Assume  A three motor positioner named P and a motorMonitor named M  To start movement the client does a put to a field named command Put P.command move PutProcess M.command monitor To make a move to a new position the client:  put P.axis[0].move value  put P.axis[0].speed value ... same for axis[1] and axis[2]  Put P.command move  putProcess M.command monitor The operation does not complete until all motors have stopped moving.

March EPICS Meeting SSRF26 Additional Requirements Support multiple types of motor Generic Support  Motor Support should be usable for purposes other than in a positioner For maintainability, monitoring, and diagnosis it must be possible to access each motor individually.

March EPICS Meeting SSRF27 Design: Five Support Modules The five Support Modules are:  motorMonitor  positioner  motor  Hardware Specific Motor Support  PortDriver MotorMonitor is generic and supports a recordType positioner is generic and supports a recordType motor  Is generic.  It can support a record or a structure impeded in another record. Hardware Specific Motor Support and portDriver: next slide

March EPICS Meeting SSRF28 Hardware Specific Motor Support Hardware Specific Motor Support and portDriver  Must be created for each different type of motor/controller  Example is for a Hytec8601 which is an Industry Pack four axis motor controller.  Supports an embeded structure. For example a field in a motor record or structure. PortDriver for Hytec8601  Coordinates access to the four axis controller

March EPICS Meeting SSRF29 motorMonitorRecord.xml <field name = "priority" type = "structure" structureName = "scanPriority" /> <field name = "command" type = "structure" structureName = "motorMonitorCommand" supportName = "motorMonitor" /> <field name = "monitor" type = "structure" structureName = "monitor" /> <field name = "alarm" type = "structure" structureName = "alarm"/> <field name = "timeStamp" type = "structure" structureName = "timeStamp"/> <support name = "motorMonitor" factoryName = "org.epics.ioc.sbirDemo.MotorMonitorFactory" />

March EPICS Meeting SSRF30 MotorMonitor Support The linked record must have following two fields:  command which must be a motorCommand structure  moving which must have type boolean. motorMonitor spawns a thread that monitors the linked record  The thread is only active while the linked record is moving.  Monitoring is done be issuing a put, process, get to the linked record The put is a monitor command to the linked record The process waits until the linked record completes the monitor The get reads the moving field from the linked record When a putProcess to command is issued  Sets moving true.  Activates the monitor thread  When the monitor thread detects that the linked record is not moving Sets moving false and command to idle Completes processing.

March EPICS Meeting SSRF31 Design: Five Support Levels The five levels are:  motorMonitor  positioner  motor  Hardware Specific Motor Support  PortDriver motorMonitor is generic and supports a recordType positioner is generic and supports a recordType motor  Is generic.  It can support a record or a structure impeded in a positioner. Hardware Specific Motor Support and portDriver

March EPICS Meeting SSRF32 positionerRecord.xml <field name = "command" type = "structure" structureName = "motorCommand" supportName = "positioner" /> <field name = "alarm" type = "structure" structureName = "alarm"/> <field name = "timeStamp" type = "structure" structureName = "timeStamp"/> <support name = "positioner" factoryName = "org.epics.ioc.sbirDemo.PositionerFactory" />

March EPICS Meeting SSRF33 positioner Support Each element of the array field axis must be a structure that has the fields  command which must be a motorCommand structure command must have Support MotorSupport  moving which must have type boolean. positioner monitors it’s command field  When a command is issued, it issues the same command to each axis.  It’s process method just waits for the command to complete  NOTE: A move command completes when the move has started NOT when the move completes  Any command except monitor sets moving true if not already true  When a monitor command is given A monitor command is issued to each axis After each axis has completed the monitor  The moving field of each axis is read  If any axis is moving the positioner is moving.

March EPICS Meeting SSRF34 Design: Five Support Levels The five levels are:  motorMonitor  positioner  motor  Hardware Specific Motor Support  PortDriver motorMonitor is generic and supports a recordType positioner is generic and supports a recordType motor  Is generic.  It can support a record or a structure impeded in a positioner. Hardware Specific Motor Support and portDriver

March EPICS Meeting SSRF35 motorCommon.xml <field name = "command" type = "structure" structureName = "motorCommand" supportName = "motor" /> <field name = "move" type = "structure" structureName = "double" /> <field name = "speed" type = "structure" structureName = "double" /> <field name = "display" type = "structure" structureName = "display" />

March EPICS Meeting SSRF36 motorRecord.xml

March EPICS Meeting SSRF37 Structure double <field name = "control" type = "structure" structureName = “control” /> Is used for fields speed and move  Structure control has fields limit.low and limit.high  Attempting to set a value outside the limits causes an alarm  Note that Motor Support and HYTEC8601 Support do not have to check the limits. There is generic support that enforces the limits.

March EPICS Meeting SSRF38 Generic Motor Support The field motor is a hardware specific structure The structure must have a field named command  command must be a motorCommand structure  command must have Support MotorSupport Units  Generic motor support uses engineering units  Hardware specific motor support does what it wants  display.limit.low and display.limit.high are engUnitsLow and endUnitsHigh  motor support calls motorSupport.setEngUnits When motor support receives a command the same command is given to hardware specific support. When speed is modified motorSupport.setSpeed is called. When move is modified motorSupport.setMove is called.

March EPICS Meeting SSRF39 MotorSupport Interface interface MotorSupport extends Support{ void setSpeed(double speed); void setMove(double distance); double getPosition(); boolean isMoving(); boolean command(MotorCommand command); void setEngUnits(double engLow,double engHigh); } Implemented by Motor Support  Called by positioner  For now positioner only calls command. Could do more. Implemented by Hardware Specific Motor Support  Called by Motor Support  Converts from Engineering Units to Steps.

March EPICS Meeting SSRF40 Design: Five Support Levels The five levels are:  motorMonitor  positioner  motor  Hardware Specific Motor Support  PortDriver motorMonitor is generic and supports a recordType positioner is generic and supports a recordType motor  Is generic.  It can support a record or a structure impeded in a positioner. Hardware Specific Motor Support and portDriver

March EPICS Meeting SSRF41 Design: Hardware Level Support portDriver - Hytec8601Driver  Implements interface HYTEC8601 which is called by supportHYTEC8601  Uses JNI because linux driver requires ioctl file commands.  PortDriver synchronizes access to 8601, which is a four axis controller. Hardware Specific Motor Support – HYTEC8601 Support  Understands commands for Hytec8601  Structure for configuration and low level commands  Implements MotorSupport which is called by motor support

March EPICS Meeting SSRF42 PortDriver Interface HYTEC8601 public interface HYTEC8601 { void setStartSpeed(short speed); short getStartSpeed(); void setAcceleration(short acceleration); short getAcceleration(); void setSpeed(short velocity); short getSpeed(); void setSteps(int steps); int getSteps(); void setPosition(int position); int getPosition(); short getCSR(); void setCSR(short value); void start(byte value); }

March EPICS Meeting SSRF43 Structure Definition for HYTEC8601 <field name = "io" type = "structure" structureName = "pdrvSupport" /> <field name = "command" type = "structure" structureName = "motorCommand" /> <field name = "direction" type = "structure" structureName = "motorDirection" />

March EPICS Meeting SSRF44 Comments about Hardware Specific Design Can be used by generic motor support The hardware specific structure allows low level access  Generic tools, e.g. Edm, can access hardware specific details  Needed for maintenance and diagnosis.

March EPICS Meeting SSRF45 Positioner Record Instance

March EPICS Meeting SSRF46 Record Instance Continued ${name}  Above is motorCommandTemplateDB.xml  hytec8601TemplateDB.xml is too long to show on one slide