Current EPICS Developments at PSI

Slides:



Advertisements
Similar presentations
1 1999/Ph 514: Working With an IOC EPICS Working with an IOC Marty Kraimer APS.
Advertisements

EPICS Base R and beyond Andrew Johnson Computer Scientist, AES Controls Group.
Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
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.
Controls Group New Channel Access Nameserver Joan Sage 12/4/01.
Jeffrey Hill.  LANSCE Requirements – a Review  EPICS Paradigm Shift – a Review  Status – What is Implemented  What is an Abstract Data Type?  Benefits.
Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009 Real-Time Data Transfer using the Timing System (Original slides and driver code by Babak Kalantari)
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.
Guide To UNIX Using Linux Third Edition
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.
OPC Overview OPC Device Support (PLC Gateway for 3.14) Ralph Lange – EPICS Collaboration Meeting at SLAC, April 2005.
Dirk Zimoch, EPICS Meeting April 2007, Hamburg Siemens S7 PLC Communication.
Dirk Zimoch, KSTAR Meeting 2009 Auto Save and Restore.
EPICS IOC Diagnostics Tools Jeff Hill. Overview 4 EPICS built-in diagnostic tools 4 solutions to specific problems.
Firewall and Internet Access Mechanism that control (1)Internet access, (2)Handle the problem of screening a particular network or an organization from.
Deutsches Elektronen-Synchrotron DESY Helmholtz Association of German Research Centres Hamburg, Germany The European X-Ray Laser Project.
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.
Dirk Zimoch, Pikett Training Channel Access Gateway.
Inetd...Server of Servers Looks at a number of ports Determines when a service is needed on any of those ports Calls the appropriate server Restarts new.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
10/20/2015J-PARC1 Control Room Accelerator Physics Channel Access – Connection to Hardware Through EPICS Getting Information directly from the Control.
Wir schaffen Wissen – heute für morgen Gateway (Redux) PSI - GFA Controls IT Alain Bertrand Renata Krempaska, Hubert Lutz, Matteo Provenzano, Dirk Zimoch.
General Time Update David Thompson Epics Collaboration Meeting June 14, 2006.
DEBUGGING EPICS APPLICATIONS Bob Dalesio and Rozelle Wright February 10, 1997.
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.
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
18. June 2003EPICS WS Channel Management Andreas Lüdeke Swiss Light Source / PSI 20 May 2003 EPICS Collaboration Meeting.
MySQL and GRID status Gabriele Carcassi 9 September 2002.
Paul Scherrer Institut 5232 Villigen PSI ROME / / Matthias Schneebeli ROME Collaboration Meeting in Pisa Presented by Matthias Schneebeli.
Advanced Photon Source Channel Access, CaSnooper, and CASW Kenneth Evans, Jr. Presented November 7, 2003 Argonne National Laboratory.
Jan Hatje, DESY CSS – Control System Studio EPICS collaboration meeting CSS – Control System Studio Update EPICS collaboration meeting 2008 Shanghai.
Ralph Lange: CA Gateway Update CA Gateway Update Ralph Lange – EPICS Collaboration Meeting March SSRF.
Controls Zheqiao Geng Oct. 12, Autosave Additions/Upgrades and Experiences at SLAC Zheqiao Geng Controls Department SLAC National Accelerator Laboratory.
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.
Controls Group New Channel Access Nameserver Presented by Karen White for Joan Sage.
An Introduction to Epics/Tango Steve Hunt Alceli EPICS Meeting 2008 INFN Legnaro 15 Oct 17:15.
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.
SNS Integrated Control System ORACLE –JERI DB Generation April 27, 2004 Coles Sibley Jeff Patton.
Managed by UT-Battelle for the Department of Energy LabVIEW Channel Access Implementaion Alexander Zhukov SNS.
IOC Application Development / Debugging
Control State Definition
A bit of C programming Lecture 3 Uli Raich.
Data Transport for Online & Offline Processing
Existing Perl/Oracle Pipeline
Accelerator Network Safety at PSI
The Linux Operating System
VLAN Trunking Protocol
Secure Code Scanners Cameron Davidson.
Channel Access, CaSnooper, and CASW
Chapter 18 Host Configuration : DHCP
Aaron Zeckoski Tomcat Debugging Aaron Zeckoski
Chapter Four UNIX File Processing.
Server-Side Plugins Andrew Johnson, Ralph Lange
Planning and Storyboarding a Web Site
Module 6: Debugging a Windows CE Image
Channel Access Concepts
Chapter 18 Host Configuration : DHCP
bla bla bla Dirk Zimoch :: Controls Section :: Paul Scherrer Institut
regDev Simple access to register based devices
Channel Access Concepts
OPC UA and EPICS Introduction
Presentation transcript:

Current EPICS Developments at PSI Dirk Zimoch :: Controls Section :: Paul Scherrer Institut Current EPICS Developments at PSI EPICS Collaboration Meeting at ICALEPCS 2017

bla bla bla Dirk Zimoch :: Controls Section :: Paul Scherrer Institut date date date Dirk Zimoch :: Controls Section :: Paul Scherrer Institut IOC Utilities at PSI EPICS Collaboration Meeting at ICALEPCS 2017

Goal: Make Life Easier Simplify tedious work Adding new scan rate bla bla bla date date date Goal: Make Life Easier Simplify tedious work Adding new scan rate Adding breakpoint tables Setting EPICS_CA_MAX_ARRAY_BYTES Help debugging with reverse lookup functions Listing all aliases of a record Listing all links pointing to a record Listing all CA connections to a record Accessing info fields List matching infos of all records Iterator API function to traverse matching infos Read infos with Channel Access

Adding New Scan Rate Edit menuScan.dbd the right way and rebuild bla bla bla date date date Adding New Scan Rate Edit menuScan.dbd the right way and rebuild Or simply execute addScan command in startup script: addScan .3 Automatically calls sysClkRateSet() on vxWorks if necessary menu(menuScan) { choice(menuScanPassive,"Passive") choice(menuScanEvent,"Event") choice(menuScanI_O_Intr,"I/O Intr") # Periodic scans follow, ordered from slowest to fastest choice(menuScan10_second,"10 second") choice(menuScan5_second,"5 second") choice(menuScan2_second,"2 second") choice(menuScan1_second,"1 second") choice(menuScan_5_second,".5 second") Defines new scan rate. Up to R3.15: unit must be “second” Basically arbitrary name choice(menuScan_3_second,".3 second") choice(menuScan_2_second,".2 second") choice(menuScan_1_second,".1 second") } choice(menuScan_2_second,".2 second") choice(menuScan_1_second,".1 second") }

Adding Breakpoint Tables bla bla bla date date date Adding Breakpoint Tables Include bpt*.dbd, edit menuConvert.dbd and then rebuild Or simply load bpt*.dbd files and update menuConvert in startup script dbLoadDatabase bptMyConv.dbd dbLoadDatabase bptMyOtherConv.dbd updateMenuConvert menu(menuConvert) { choice(menuConvertNO_CONVERSION,"NO CONVERSION") choice(menuConvertSLOPE,"SLOPE") choice(menuConvertLINEAR,"LINEAR") choice(menuConverttypeKdegF,"typeKdegF") choice(menuConverttypeKdegC,"typeKdegC") choice(menuConverttypeJdegF,"typeJdegF") choice(menuConverttypeJdegC,"typeJdegC") choice(menuConverttypeEdegF,"typeEdegF(ixe only)") choice(menuConverttypeEdegC,"typeEdegC(ixe only)") Basically arbitrary name Must match name of breaktable in bpt*.dbd file choice(menuConvertmyConv,"myConv") choice(menuConvertmyOtherConv,"myOtherConv") } }

Setting EPICS_CA_MAX_ARRAY_BYTES bla bla bla date date date Setting EPICS_CA_MAX_ARRAY_BYTES EPICS_CA_MAX_ARRAY_BYTES on IOC too small: array PVs inaccessible (Not needed any more with R3.16) Check size of all array fields of all records Keep in mind CA type promotion (e.g. ULONG  DOUBLE) Add overhead for status, severity, time stamp, … Find maximum Add to startup script: epicsEnvSet EPICS_CA_MAX_ARRAY_BYTES,… Or simply calculate it automatically Init hook checks potential array fields of all records Two SynApps records needed patch for cvt_addr(): sCalcout record and table record Sets EPICS_CA_MAX_ARRAY_BYTES if current value (or default) is too small

Listing All Aliases of a Record bla bla bla date date date Listing All Aliases of a Record Translating alias name to record name is easy Remote: caget aliasname.NAME On IOC shell: dbla aliasname Works with patterns: dbla *XYZ Finding all aliases of a record is difficult Call dbla without parameter, then search the list Or modify dbla to accept alias or record name patterns > dbla recordname alias1 -> recordname alias2 -> recordname alias2 -> recordname

Listing All Links Pointing to a Record bla bla bla date date date Listing All Links Pointing to a Record Finding link targets of a record is not too difficult On IOC shell: dbpr record,4 then search the output for links Or get known link field: dbgf record.OUT Finding all links with a given target record is very difficult Analyze record database offline and search for links Or use new IOC shell function: dbll record-pattern > dbll *:X A.DOL --> DEV1:X B.INPA --> DEV2:X.VAL MS CP C.OUT --> DEV3:X.RVAL PP Filter for target field > dbll *:X.VAL A.DOL --> DEV1:X B.INPA --> DEV2:X.VAL MS CP

Listing All CA Connections to a Record bla bla bla date date date Listing All CA Connections to a Record It is possible to get all CA connections to an IOC On IOC shell: casr 2 Good luck searching the output for a specific record! Or use new IOC shell function: cal record-pattern > cal MYRECORD zimoch@pc1234:47643 --> MYRECORD.VAL zimoch@pc1234:47643 --> MYRECORD.EGU archive_user@archive_host:83542 --> MYRECORD.VAL

Accessing Info Fields Records can have info fields bla bla bla date date date Accessing Info Fields Records can have info fields record (ai, "REC1") { info(autosaveFields_pass0, "LOLO LOW LLSV LSV") } But info fields are not easily accessible Use new IOC shell function: dbli info-pattern [pattern ...] > dbli autosaveFields* REC1.autosaveFields_pass0 "LOLO LOW LLSV LSV" REC2.autosaveFields_pass1 "VAL"

Accessing Info Fields (cont.) bla bla bla date date date Accessing Info Fields (cont.) New iterator API function: dbNextMatchingInfo char* patternlist[] = {"autosaveFields*", NULL}; dbInitEntry(pdbbase, &dbentry); while(dbNextMatchingInfo(&dbentry, patternlist) == 0) { printf("%s.%s \"%s\"\n", dbGetRecordName(&dbentry), dbGetInfoName(&dbentry), dbGetInfoString(&dbentry)); } dbFinishEntry(&dbentry); Goody: Use Channel Access to read info fields $ caget REC1.autosaveFields_pass0 REC1.autosaveFields_pass0 LOLO LOW LLSV LSV NULL terminated array of pattern strings

bla bla bla date date date How to get it? Package with utility functions (everything except Channel Access patch) http://epics.web.psi.ch/software/iocUtils.tgz Patch for Channel Access to info fields for EPICS 3.15 and 3.16 http://epics.web.psi.ch/software/caInfoFields-R3-15.patch for EPICS 3.14 http://epics.web.psi.ch/software/caInfoFields-R3-14.patch I will try to get these changes into EPICS base.

Extending mbbiDirect and mbboDirect Records to 32 Bit Dirk Zimoch :: Controls Section :: Paul Scherrer Institut Extending mbbiDirect and mbboDirect Records to 32 Bit EPICS Collaboration Meeting at ICALEPCS 2017

Current mbbiDirect ⁞ mbbiDirect RVAL 32 bit VAL 16 bit B0 BF SHFT Input (RVAL) is 32 bit Output (VAL, B0 … BF) is only 16 bit Why? mbbiDirect RVAL 32 bit VAL 16 bit B0 BF ⁞ SHFT Device support

Future mbbiDirect ⁞ mbbiDirect RVAL 32 bit VAL 32 bit B0 B1F SHFT Input (RVAL) stays 32 bit Output (VAL, B0 … BF, B10 … B1F) will be 32 bit as well Mostly backward compatible mbbiDirect RVAL 32 bit VAL 32 bit B0 B1F ⁞ SHFT Device support

Same for mbboDirect ⁞ mbboDirect VAL 32 bit RVAL 32 bit B0 B1F SHFT Output (RVAL) stays 32 bit Input (VAL, B0 … BF, B10 … B1F) will be 32 bit as well mbboDirect VAL 32 bit RVAL 32 bit B0 B1F ⁞ SHFT Device support

Compatibility RVAL was and will be ULONG Most device supports only access RVAL and need no change Record memory layout changes: re-compile all device supports! VAL was USHORT and will be LONG For 16 bit values nothing will change Channel Access Clients have always seen a LONG Device support accessing VAL or B* fields need modification to support higher bits. Use 32 bit variables when accessing prec->val Using pointer &prec->val is not safe! When iterating bit fields check for macros like mbboDirectRecordB1F

What do you think? Why not 64 bit? 64 bit integers are not supported by Channel Access Changing RVAL to 64 bit would break all existing device support Possible as new record type What do you think?

Channel Access Push Proposal for a New Connection Method bla bla bla date date date Dirk Zimoch :: Controls Section :: Paul Scherrer Institut Channel Access Push Proposal for a New Connection Method EPICS Collaboration Meeting at ICALEPCS 2017

Channel Access Monitor Workflow Current (simplified) work flow to set up a monitor What's wrong? Some “clients” (e.g. archiver) flood the network with broadcasts. Reasons: wrong configuration, IOCs offline, … Archiver not a client at all, it's a service! IOC CA Client Looks up PVs ← Searches for PVs (UDP broadcast) Search response (UDP unicast) → Gets host/port from response Accepts connection Connects (TCP) to host/port Installs subscriptions Set up monitors Sends PV events Processes data Goes offline Searches again

Clients vs Services CA Client CA Service PVs live on IOC IOC sends updates Runs on arbitrary hosts Runs on well known host:port Can start and top at any time Usually runs permanently Client wants something from IOC IOC wants something from service IOC cannot know PVs needed by client: Configuration must be in the client IOC knows PVs to send to service: Configuration should be in the IOC Let the IOC push its PVs to the service! Use info fields in records for configuration IOC does connection management

Channel Access Push Workflow Proposed work flow to send data to services A Channel Access service would be passive Service needs no PV list configuration PV list cannot be outdated Service does not send search broadcasts IOC pushes PVs to service Event/subscription concept and code probably does not change much “Only” connection setup needs to be developed IOC CA Service Connects (TCP) to well known host:port → Accepts connection Sends list of PVs (necessary?) Sets up monitors Sends PV events Processes data Goes offline Stops monitoring

What do you think? Does this look useful? Channel Access or PV Access or both? Anyone volunteering to implement it?