Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Feb. 2013 EPICS ’Stream’ Device Support.

Slides:



Advertisements
Similar presentations
Serial Support for Diamond A review of EPICS serial interface options Pete Owens Daresbury Laboratory.
Advertisements

1 1999/Ph 514: Channel Access Concepts EPICS Channel Access Concepts Bob Dalesio LANL.
TFTP (Trivial File Transfer Protocol)
Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009 Real-Time Data Transfer using the Timing System (Original slides and driver code by Babak Kalantari)
ORNL is managed by UT-Battelle for the US Department of Energy EPICS V4 for SNS Neutron Data Kay Kasemir Oct
Best Ever Alarm System Toolkit Kay Kasemir, Xihui Chen, Katia Danilova SNS/ORNL April, 2013.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS April 2013 Control System Studio Training - Authentication,
Finding, Deploying and Managing EPICS Support Modules Andrew Johnson Computer Scientist, AES Controls.
INTEGRATION OF EPICS ASYN INTO NON EPICS ENVIRONMENT PRERANA KANKIYA Brookhaven National Laboratory, New York EPICS COLLABORATION MEETING, 2014.
Dirk Zimoch, EPICS Meeting April 2007, Hamburg Siemens S7 PLC Communication.
ILon Brad Webb, SNS 2Managed by UT-Battelle for the U.S. Department of Energy Presentation_name What Is iLon And What Is Its Purpose?
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Jan Control System Studio Training - Alarm System Use.
Managed by UT-Battelle for the Department of Energy Kay Kasemir Sept EPICS EtherIP Driver.
EtherIP Driver Kay Kasemir, July 2009.
SLAC asyn class, Day 1, August 26, 2010 Example asyn driver Modbus Mark Rivers, Marty Kraimer, Eric Norum University of Chicago Advanced Photon Source.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS April 2013 Control System Studio Training - Alarm System Use.
Beamline Controls at the IPNS* *The Intense Pulsed Neutron Source (IPNS) at Argonne National Laboratory is a national facility for neutron scattering research.
EPICS Collaboration meeting Fall 2012, SDD status and plansPage 1 Self-Described Data - SDD status and plans Lana Abadie, ITER CODAC.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS April 2013 Control System Studio Training - Workspaces, Shared.
NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)
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.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Feb Motor Support.
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
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Jan Control System Studio Training - Web OPI.
EPICS devSNMP Extensions Euan Troup, CSIRO Australia Telescope National Facility ASKAP Project Paul Wild Observatory.
EPICS OPC Gateway Nov May 2002 CA Client->OPC: Andrei Makhnachev,DESY OPC-> CA Server: Kay-Uwe Kasemir, LANL OPC Experience: Matthias Clausen,
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 Jan Control System Studio Training - Archive System Setup.
ORNL is managed by UT-Battelle for the US Department of Energy EPICS Automation Kay Kasemir, SNS/ORNL June 2014.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Oct EPICS Meeting, PAL, Korea Control System Studio Training.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Jan Control System Studio, CSS Overview.
ORNL is managed by UT-Battelle for the US Department of Energy CS-Studio PVTable and Autosave Kay Kasemir Oct
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Oct EPICS Meeting, PAL, Korea Control System Studio Training.
EPICS Workshop 2003Dirk Zimoch 1 StreamDevice 2.0 A Multi-Purpose Character Driver for EPICS 3.14.
Integrating EPICS and LabVIEW on Windows using DCOM Freddie Akeroyd ISIS Computing Group.
DEBUGGING EPICS APPLICATIONS Bob Dalesio and Rozelle Wright February 10, 1997.
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.
GPIB Device Control with COSYLAB microIOC COSYLAB microIOC Development for microIOC with SDK GPIB device control microIOCs in SLAC Things learned Jingchen.
Managed by UT-Battelle for the Department of Energy CSS Update Matthias Clausen, Helge Rickens, Jan Hatje and DESY Delphy Armstrong, Xihui Chen,
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.
Managed by UT-Battelle for the Department of Energy EPICS Database Kay Kasemir, SNS/ORNL Many slides from Andrew Johnson, APS/ANL Sept
An EPICS solution for Galil products that can provide a comprehensive, and high performance motor and PLC control system for use at synchrotrons and other.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS 2012, January 9-12 at NSRRC, Taiwan Control System Studio Training.
System Design for Home Automaton. Design Goals Performance Criteria – Server prioritizes client requests to provide quick response time to critical requests.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS 2011, October at CEA Saclay, France Control System Studio.
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.
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.
EPICS Demo Burkhard Kolb and Peter Zumbruch. Outline Check connection details – Hardware manual Test/Debug command – Try simple command/response in text.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS May 2014 Control System Studio Training - Hierarchical Preferences.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS 2012, April at SLAC Control System Studio Training - Alarm System.
16th Oct 08 Tom Cobb - Python at DLS 1 Uses of Python at Diamond Light Source.
An Introduction to Epics/Tango Steve Hunt Alceli EPICS Meeting 2008 INFN Legnaro 15 Oct 17:15.
Managed by UT-Battelle for the Department of Energy Quest for the Best Ever Alarm System Tool Kay Kasemir Oct
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.
Managed by UT-Battelle for the Department of Energy LabVIEW Channel Access Implementaion Alexander Zhukov SNS.
Using the StreamDevice Driver
JavaIOC Overview and Update
Hypertext Transfer Protocol
Laboratorio per dottorandi 2017 Particle Accelerators Control System
SLAC USA Marty Kraimer and Matej Sekoranja
SLC Aware IOC BSAC* Facility Design Review July 14, 2005
Presentation transcript:

Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Feb EPICS ’Stream’ Device Support

2Managed by UT-Battelle for the Department of Energy “Stream” Type Protocols Example Devices: –Temperature controllers: Lakeshore, Omega, … –Vacuum pumps: Varian, …  Serial (RS-232, RS485), Networked (TCP), GPIB (IEEE-488)  Text-based  Command/Response What is the current temperature on channel A? “KRDG? A\n” “ E+0\n” It’s about 80 Kelvin!

3Managed by UT-Battelle for the Department of Energy Pro/Cons  Seems easy –Human-readable –Testable with Hyperterm, minicom, telnet –Create Visual Basic, LabVIEW, … demo in no time  But beware! –Speed and Terminators (CR, LF, CR/LF, …) can magically change  Was set to something, then device power-cycled … –Must handle timeouts  Don’t just hang! –Must handle errors  Don’t read “MODEL 340” as 340 Kelvin

4Managed by UT-Battelle for the Department of Energy The EPICS ‘Stream’ Device Idea Protocol File “demo.proto” Terminator = CR; getTempA { out "KRDG? A"; in "%f"; } Record record(ai, "Temp:B") { field(DTYP,"stream") field(INP, getTempA TC1") field(SCAN,"5 second") } IOC st.cmd drvAsynIPPortConfigure ("TC1", " :23")

5Managed by UT-Battelle for the Department of Energy What ‘Stream Device’ does for you  Connect to device –Re-connect after disconnects  Allow many records to communicate via one connection –Threading, queuing, …  Handle timeouts, errors –Put records into ‘alarm’ state  Debug options –Log every byte sent/received

6Managed by UT-Battelle for the Department of Energy NetCat Example Using NetCat, we pretend to be a simple device.  IOC with Stream Device will ask: “ B? ”  We reply either –with valid reply to request for B: “ B ” –Invalid reply: “ ”, “ get lost ”, … –Not at all, which should be treated as timeout, –a shutdown of the network connection.

7Managed by UT-Battelle for the Department of Energy Full Example: Adding support to IOC  configure/RELEASE: SUPPORT=/home/controls/epics/R /su pport ASYN=$(SUPPORT)/asyn STREAM=$(SUPPORT)/StreamDevice  demoApp/src/Makefile demo_DBD += stream.dbd demo_DBD += asyn.dbd demo_DBD += drvAsynIPPort.dbd demo_LIBS += asyn demo_LIBS += stream

8Managed by UT-Battelle for the Department of Energy EPICS Database demoApp/Db/demo.db record(ai, "B") { field (DTYP, "stream") field (INP, getB NC") field (SCAN, "5 second") } record(ao, "current") { field (DTYP, "stream") field (OUT, setCurrent NC") field (EGU, "A") field (PREC, "2") field (DRVL, "0") field (DRVH, "60") field (LOPR, "0") field (HOPR, "60“ } record(ai, "A") { field (DTYP, "stream") field (INP, getA NC") field (SCAN, "I/O Intr") }

9Managed by UT-Battelle for the Department of Energy Protocol File iocBoot/iocdemo/demo.proto Terminator = CR LF; InTerminator = LF; ReplyTimeout = 10000; ReadTimeout = 10000; # Used with SCAN “… second”: # Prompts, then expects "B 5" getB { out "B?"; in "B %f“; } # Example with initialization, # otherwise only writes when processed setCurrent { out "CURRENT { out "CURRENT?"; in "CURRENT %f A"; } } # Used with SCAN, "I/O Intr": # Reacts to "A 5" at any time getA { PollPeriod = 50; in "A %f"; }

10Managed by UT-Battelle for the Department of Energy IOC Startup File iocBook/iocdemo/st.cmd epicsEnvSet ("STREAM_PROTOCOL_PATH", ".") drvAsynIPPortConfigure ("NC", " :6543") # ASYN_TRACE_ERROR 0x0001 # ASYN_TRACEIO_DEVICE 0x0002 # ASYN_TRACEIO_FILTER 0x0004 # ASYN_TRACEIO_DRIVER 0x0008 # ASYN_TRACE_FLOW 0x0010 # ASYN_TRACEIO_NODATA 0x0000 # ASYN_TRACEIO_ASCII 0x0001 # ASYN_TRACEIO_ESCAPE 0x0002 # ASYN_TRACEIO_HEX 0x0004 # Log some asyn info and in/out texts asynSetTraceMask("NC", 0, 4) asynSetTraceIOMask("NC", 0, 6) dbLoadRecords("db/stream.db","user=fred")

11Managed by UT-Battelle for the Department of Energy Example Session  NetCat nc –l B? B 17 B? B 18 B? B 3.14 B? 34 B?  IOC …write 4 B?\r\n …read 5 B 17\n … got "34" where "B " was expected … No reply from device within ms

12Managed by UT-Battelle for the Department of Energy Stream Device…  Allows you to concentrate on the protocol  Handles the rest –Connection –Threads –Parse results –Update record’s value and alarm state “demo.proto” Terminator = CR; getTempA { out "KRDG? A"; in "%f"; }