1 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Flow of Control Marty Kraimer APS.

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

1 1999/Ph 514: Channel Access Concepts EPICS Channel Access Concepts Bob Dalesio LANL.
EPICS Tutorial - IOC Database Raja Ramanna Centre For Advanced Technology Indore India January Presented by: Marty Kraimer Based on Presentations.
Message Queues COMP3017 Advanced Databases Dr Nicholas Gibbins –
Remote Procedure Call (RPC)
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
Channel Access Protocol Andrew Johnson Computer Scientist, AES Controls Group.
PvData,pvAccess,javaIOC,pvService Status EPICS Meeting Aix-en-Provence, France Marty Kraimer, Guobao Shen, and Matej Sekoranja.
9-12 Oct 2000PCaPAC 2000, DESY Hamburg Epics to TINE translator Matthias Clausen, DESY Hamburg Phil Duval, DESY Hamburg Zoltan Kakucs, DESY Hamburg.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
Networks 1 CS502 Spring 2006 Network Input & Output CS-502 Operating Systems Spring 2006.
CS-3013 & CS-502, Summer 2006 Network Input & Output1 CS-3013 & CS-502, Summer 2006.
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.
1 I/O Management in Representative Operating Systems.
Fundamentals of Python: From First Programs Through Data Structures
SLAC asyn class, Day 1, August 26, 2010 Example asyn driver Modbus Mark Rivers, Marty Kraimer, Eric Norum University of Chicago Advanced Photon Source.
Server Design Discuss Design issues for Servers Review Server Creation in Linux.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
EPICS IOC Diagnostics Tools Jeff Hill. Overview 4 EPICS built-in diagnostic tools 4 solutions to specific problems.
JavaIOC Marty Kraimer EPICS Collaboration Meeting ICALEPCS October
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
Chapter Nine The Session Layer. Objectives We’ll see how a new session is created, maintained, and dismantled. The process of logon authentication will.
Imperial College Tracker Slow Control & Monitoring.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
JavaIOC EPICS Meeting SSRF March Presented by: Marty Kraimer.
1 1999/Ph 514: Record Support EPICS Record Support Marty Kraimer APS.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
2009 Sep 10SYSC Dept. Systems and Computer Engineering, Carleton University F09. SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices 7.2.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Device Drivers CPU I/O Interface Device Driver DEVICECONTROL OPERATIONSDATA TRANSFER OPERATIONS Disk Seek to Sector, Track, Cyl. Seek Home Position.
DAQ Control GSI, Aug 2005Hans G. Essel CBM - DAQ Control1 MBS monitor (FOPI) (J.Adamczewski, M.Stockmeier)
EPICS Access from Python Geoff Savage DØ Workshop Thursday June 22, 2000.
Computer Architecture Lecture 2 System Buses. Program Concept Hardwired systems are inflexible General purpose hardware can do different tasks, given.
EEE440 Computer Architecture
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.
Networking Basics CCNA 1 Chapter 11.
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.
Writing EPICS Channel Access Clients in Python Geoff Savage March 2003.
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
CS533 – Spring Jeanie M. Schwenk Experiences and Processes and Monitors with Mesa What is Mesa? “Mesa is a strongly typed, block structured programming.
New IP Drivers using drvIpac Module Driver:CANopen Carrier Driver:GPFC drvIpac ?? CANopen Tip810 CAN Tip810 mv162GPFCatc40vipc310vipc616 Module driver.
Argonne National Laboratory is managed by The University of Chicago for the U.S. Department of Energy ICALEPCS 2005: EPICS Workshop EPICS V4 : Runtime.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
B. Dalesio, N. Arnold, M. Kraimer, E. Norum, A. Johnson EPICS Collaboration Meeting December 8-10, 2004 Roadmap for IOC.
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
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Concurrent TCP servers. The basic idea 1 client = 1 task. The task is alive as long until the connection is closed The task closes the connection.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
JavaIOC Overview and Update
Scan Library.
CS533 Concepts of Operating Systems
An example design for an Amadeus APIv2 Web Server Application
SLAC USA Marty Kraimer and Matej Sekoranja
Processor Fundamentals
Writing a Channel Access Client in EPICS
Channel Access Concepts
Beam Synchronous Acquisition on IOC
Banafsheh Hajinasab Based on presentation by K. Strnisa, Cosylab
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:

1 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Flow of Control Marty Kraimer APS

2 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS EPICS ARCHITECTURE PHYSICAL OPI IOC

3 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS EPICS ARCHITECTURE LOGICAL Channel Access Server Database Access and Scanning Record Device Driver Support Physical I/O IOC Application OPI Channel Access Client LAN

4 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Summary u IOC Initialization u Load various components u Connect to hardware u Start Channel Access Servers u Record Processing u Hardware I/O monitor and control u Post events for CA clients u Channel Access u Connect to channels u Get/Put requests u Monitor Requests u Connection Management

5 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS IOC Initialization  ld  iocCore  xxxApp - device,driver, record support  dbLoadDatabase Load database definition files for menus, recordtypes, devices, and drivers  dbLoadRecords, dbLoadTemplates Load record instance files u iocInit u Dynamically link to record, device, and driver support u Start general purpose tasks log server, task watchdog, callback, dbCa, etc u Initialize drivers u Initialize records (two passes) and devices u Start scan tasks u Start access security u Start Channel Access Servers

6 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Record Processing: Common Part u Database Scanning calls dbProcess u Periodic u I/O Interrupt u Event u Passive u Skip if already active u A lock set may have loops u The record may be asynchronous u Skip if the record is disabled u Call record support process routine u Linked records (input, output, forward) that are process passive are processed recursively

7 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Process: Synchronous I/O u Set PACT true (processing active) u Perform I/O operation u For hardware link call device support u For database link u linked records (except scalar NPP NMS input) are in a common lock set. u recursive processing may happen u inputs processed before data transfer u outputs processed after data transfer u For channel access link u inputs are monitored u outputs are handled via a separate task u Check for record specific alarm conditions u Call db_post_event for any fields that change because of record processing u Request processing of forward link u Set PACT false u return

8 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Process: Asynchronous I/O u Asynchronous Start (Called by dbProcess) u Set PACT True u Start I/O operation (normally via device support) u return leaving PACT true u Asynchronous Completion Record processing routine is called again u Complete I/O operation u Check for record specific alarm conditions u Call db_post_event for any fields that change because of record processing u Request processing of forward link u Set PACT false u return

9 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Channel Access u Search u UDP broadcast PVNAME on local subnet (buffered) u Each IOC has a CA broadcast listener u IOC that has PV sends UDP message back to client u TCP connection between each client/server u For each client IOC establishes following tasks u Server task (all communication except monitors) u Event task which handles monitors, I.e. calls to db_post_event u Get u Issue requests u Wait for replies u Put u Issue put. No response except for errors u May cause record processing

10 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Channel Access continued u Add Event u Ask for monitor on PV (record.field) u Monitors happen because of calls to db_post_event u Put Notify u Issue put and wait for completion u Completion when all records complete processing u Connection Management Automatic reconnect u Access Security

11 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Example CA Put Notify u Client issues put notify and flush u IOC CA server accepts request u dbPutNotify is called u dbScanLock is called - Entire lock set is locked u Value is written to record u Record is processed (if passive and PP true in dbd file) A set of records may start and some complete processing u dbScanUnlock is called u When all records complete processing the CA server is notified u The CA server sends a message back to the client

12 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Example Asynchronous Devices u Serial and GPIB Devices u Are typically slow u Device support can NOT be synchronous u Solution u Create separate task to manage requests u Device support is asynchronous u Async start queues a request to task u When task completes request it notifys device support which causes asynchronous completion. u Generic GPIB support is available u Several Serial support options are available u Now lets look at CA Put Notify example u Database has series of linked records reading gpib/serial values. u rec1 -> rec2 -> rec3->… u What does CA Put Notify do?

13 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS CA put notify u The following is sequence of events u Client issues put notify request u Server receives request u dbPutNotify is called u dbScanLock is called u Value is written to record rec1 u rec1 starts processing u Device support queuesrequest to separate task u Record left with PACT true u dbscanUnlock is called u dbPutNotify waits u Sometime later u Task finishes request u rec1 has asynchronous completion u rec2 is processed and starts asynchronous phase u … until all records in chain complete u dbPutNotify completes u CA sends message back to client