10/20/2015J-PARC1 Control Room Accelerator Physics Channel Access – Connection to Hardware Through EPICS Getting Information directly from the Control.

Slides:



Advertisements
Similar presentations
COM vs. CORBA.
Advertisements

1 1999/Ph 514: Channel Access Concepts EPICS Channel Access Concepts Bob Dalesio LANL.
Control System Studio (CSS) Data Access Layer (DAL) Kay Kasemir, Xihui Chen July 2009.
EPICS Base R and beyond Andrew Johnson Computer Scientist, AES Controls Group.
Channel Access Enhancements J. Hill. R3.14 Enhancements Large array support in the portable server –nearly complete –a priority for SNS Port syntax for.
EPICS Channel Access Overview 2006
EPICS Architecture Version 3 Channel Access Client (CAC) Connection Data Transfers WAN/LAN/Local Connection Data Transfers Channel Access Server (CAS)
Channel Access Protocol Andrew Johnson Computer Scientist, AES Controls Group.
DDS Integration Nikolay Malitsky.
JCA 2.0 Eric. Boucher – APS EPICS Collaboration Meeting - June 18-20, 2003.
Java implementation of Channel Access (CAJ) Matej Šekoranja ( presented by Rok Šabjan ) Funded by DLS (M.Heron) and DESY (M.Clausen) EPICS Meeting – SLAC,
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.
8/21/2015J-PARC1 Data Management Machine / Application State Data.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Kazuro Furukawa, KEK, Jul Jacva and JCA / CAJ EPICS Workshop 2006, VECC, India 1 Java and JCA / CAJ Kenneth Evans, Jr. October 12, 2004 Part of the.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
EPICS Meeting 29 th April - 3 rd May© 2013 Helmholtz-Zentrum BerlinCarsten Winkler.
Imperial College Tracker Slow Control & Monitoring.
J. Hill. Overview  Introduction  LANSCE Requirements  EPICS Event Queue  Event Queue Upgrade  Milestones.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS Design.
BROOKHAVEN SCIENCE ASSOCIATES High level applications and EPICS control GUOBAO SHEN NSLS-II, Control Group May 4 th, 2009.
1/15 G. Manduchi EPICS Collaboration Meeting, Aix-en-Provence, Spring 2010 INTEGRATION OF EPICS AND MDSplus G. Manduchi, A. Luchetta, C. Taliercio, R.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
Jan Hatje, DESY CSS ITER March 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
Wir schaffen Wissen – heute für morgen Gateway (Redux) PSI - GFA Controls IT Alain Bertrand Renata Krempaska, Hubert Lutz, Matteo Provenzano, Dirk Zimoch.
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 Channel Access Concepts – EPICS Training – K.Furukawa – Mar EPICS Channel Access Concepts Kazuro Furukawa, KEK, ( ) (Bob Dalesio, LANL,
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
1 2009: Channel Access EPICS Channel Access Andy Foster Observatory Sciences Limited.
Client Call Back Client Call Back is useful for multiple clients to keep up to date about changes on the server Example: One auction server and several.
Introduction to the Channel Access Client Library Kenneth Evans, Jr. Kay Kasemir.
EPICS Access from Python Geoff Savage DØ Workshop Thursday June 22, 2000.
(Java) CA Client Libraries Status Matej Šekoranja
3.14 Work List IOC Core Channel Access. Changes to IOC Core Online add/delete of record instances Tool to support online add/delete OS independent layer.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
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.
UNIT III - JDBC JDBC Overview – JDBC implementation – Connection class – Statements - Catching Database Results, handling database Queries. Networking–
BROOKHAVEN SCIENCE ASSOCIATES Advanced Monitor/Subscription Mechanisms Ralph Lange EPICS Collaboration Meeting October 11, 2009.
Writing EPICS Channel Access Clients in Python Geoff Savage March 2003.
1. LabVIEW and EPICS Workshop EPICS Collaboration Meeting Fall 2011.
EPICS to TANGO Translator Rok Šabjan on behalf of Rok Štefanič Presented at ICALEPCS, Knoxville, October.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays Channel access priorities Portable server replacement of rsrv.
Advanced Photon Source Channel Access, CaSnooper, and CASW Kenneth Evans, Jr. Presented November 7, 2003 Argonne National Laboratory.
1 1999/Ph 514: Channel Access Configuration EPICS Channel Access Configuration Andrew Johnson APS.
2/20/2016J-PARC1 Virtual Accelerator An Accelerator Simulator.
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
F Fermilab Python Channel Access Interface (CaChannel) Geoff Savage EPICS Collaboration Meeting 16 November 2000.
JDBC. SQL(Structured Query Language) is divided into 1.DDL(Data Definition Language) create db, create table, alter table, drop db or table 2.DML(Data.
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.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
ICS WP3 – Software Core Components Suzanne Gysin Work Package Lead November 25, 2014.
Monitoring Dynamic IOC Installations Using the alive Record Dohn Arms Beamline Controls & Data Acquisition Group Advanced Photon Source.
Using COTS Hardware with EPICS Through LabVIEW – A Status Report EPICS Collaboration Meeting Fall 2011.
Event Sources and Realtime Actions
Object Oriented Programming in
Michael Thomas and Conlog.
Michael Thomas and Conlog.
Channel Access, CaSnooper, and CASW
Writing a Channel Access Client in EPICS
Channel Access Concepts
An Introduction to Internetworking
EPICS: Experimental Physics and Industrial Control System
Channel Access Configuration
Channel Access Configuration
The Lua Chunk Vault, an enhancement to epics base
Java Channel Access Client and Server Library - status
Channel Access Concepts
Presentation transcript:

10/20/2015J-PARC1 Control Room Accelerator Physics Channel Access – Connection to Hardware Through EPICS Getting Information directly from the Control System

June 16-27, 2008USPAS2 Basic Steps  Channel Access is the protocol for communicating between the control system (EPICS) and higher level languages (C/C++/Java/FORTRAN/scripts)  Environment Variables: for C, Java Properties for Java CA Client: EPICS_CA_ADDR_LIST EPICS_CA_AUTO_ADDR_LIST EPICS_CA_CONN_TMO EPICS_CA_BEACON_PERIOD EPICS_CA_REPEATER_PORT EPICS_CA_SERVER_PORT EPICS_CA_MAX_ARRAY_BYTES EPICS_TS_MIN_WEST

Basic Steps for Using Channel Access  Initialize Channel Access ca_task_initialize or ca_context_create  Search ca_search_and_connect or ca_create_channel  Do get or put ca_get or ca_put  Monitor ca_add_event or ca_create_subscription  Give Channel Access a chance to work ca_poll, ca_pend_io, ca_pend_event  Clear a channel ca_clear_channel  Close Channel Access ca_task_exit or ca_context_destroy

Java Connections to EPICS Channel Access  A wrapper to the usual C libraries (JNI) Requires the C-libraries, built for the hardware you are using  A native Java interface to Channel Access Easier to use – no exteral C libraries needed Pure Java – portable Somewhat buggy – be careful with a real machine  For XAL you can specify which one you want to use

Java Channel Access (JCA) Third party packages maintained by Cosylab  JCA/JNI Java API to native channel access through JNI  Requires EPICS client libraries Used in production  JCA/CAJ Pure Java implementation of JCA  Doesn’t use or require EPICS client libraries Better monitor performance than JCA/JNI Issues with multiple connections Implicated in crashing some IOCs Not used in production

Channel Access Example (Java)  From jca2_1_mon.py library = JCALibrary.getInstance() ctxt = library.createContext( JCALibrary.JNI_THREAD_SAFE ) bpm_chan = ctxt.createChannel( "MEBT_Diag:BPM01:xAvg" ) corr_chan = ctxt.createChannel( "MEBT_Mag:DCH01:B" ) ctxt.pendIO( 5.0 ) bpm_chan.printInfo()

Java Properties File for JCA / JNI  Java Properties File # define the location of the epics shared libraries and caRepeater executable gov.aps.jca.jni.epics.cygwin-x86.library.path=e:/epics/base /lib/cygwin-x86 gov.aps.jca.jni.epics.cygwin-x86.caRepeater.path=e:/epics/base /bin/cygwin-x86 # Overwrite the default addr_list to point to a specific ca server gov.aps.jca.jni.JNIContext.addr_list=ics-srv-cagate1.sns.ornl.gov gov.aps.jca.jni.JNIContext.repeater_port=5065 gov.aps.jca.jni.JNIContext.server_port=5064 # overwrite the default auto_addr_list so that network interfaces will not be automatically added to the addr_list. gov.aps.jca.jni.JNIContext.auto_addr_list=false # toto is going to use very large array, so we want to increase the maximum array size. gov.aps.jca.jni.JNIContext.max_array_size=32768 # define default values only for JNI_THREAD_SAFE context gov.aps.jca.jni.ThreadSafeContext.event_dispatcher=gov.aps.jca.event.QueuedEventDispatcher gov.aps.jca.jni.ThreadSafeContext.priority=1 # for CAJ #com.cosylab.epics.caj.CAJContext.addr_list=ics-srv-cagate1.sns.ornl.gov com.cosylab.epics.caj.CAJContext.addr_list= com.cosylab.epics.caj.CAJContext.auto_addr_list=false com.cosylab.epics.caj.CAJContext.max_array_size=32768 com.cosylab.epics.caj.impl.reactor.lf.LeaderFollowersThreadPool.thread_pool_size=80 com.cosylab.epics.caj.CAJContext.beacon_period=15

Channel Access in XAL  gov.sns.ca package abstracts channel access provides some insulation from API changes to underlying access layer allows for both blocking and concurrent calls supports connection, get and put operations (with and without callbacks) and monitors  gov.sns.jca implements XAL Channel support using JCA wraps Java Channel Access (JCA) calls can switch between JCA/JNI and JCA/CAJ  See XAL_Setup_HOWTO.thtm in distribution JCA/JNI is recommended for production due to known, serious issues with JCA/CAJ

XAL Channel Access Classes ClassDescription ChannelFactoryCreates channels on demand and caches them ChannelManages state of PV and provides access operations MonitorManages state of a monitor for a PV ChannelRecordChannel callback result with value and conversions ChannelStatusRecordAdds status and severity to channel record ChannelTimeRecordAdds event time stamp to channel status record

XAL Channel Access Examples  Getting a value from the machine channel = ChannelFactory.defaultFactory().getChannel("MEBT_Diag:BPM01:xAvg") channel.connect() val = channel.getValDbl() print val  Other Examples in gov.sns.ca.samples

Advanced Topics: Pitfalls of Large Connection Requests  E.g.: get all the BPM readbacks in a beam-line, or all the magnet settings – could be 100’s of requests If you do this in a sequential loop using blocking requests, and you have a handful of requests that to not connect, you must pass through each timeout at a time People may call you in the middle of the night complaining the application is hung Sometimes you need to know when to ignore missing data  Typically you should do this sort of task with a subscription method and do book-keeping in the call back See gov.sns.ca.BatchGetRequest.java

Advanced Channel Access Topics in XAL gov.sns.ca.correlator  correlates channel monitor events from two or more channels compares time stamps of monitor events time window specifies maximum time allowed between events to be considered correlated allows us to have confidence that events come from the same pulse  custom filtering of monitor events  custom filtering of correlations  supports nesting of correlators  See gov.sns.ca.samples