Experimental Physics and Industrial Control System (EPICS) Database Bob Dalesio, June 27,2001.

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
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.
SNS Integrated Control System Running IOC Core on Windows and Linux Dave Thompson Wim Blokland Ernest Williams.
MotoHawk Training Model-Based Design of Embedded Systems.
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Figure 1.1 Interaction between applications and the operating system.
The new The new MONARC Simulation Framework Iosif Legrand  California Institute of Technology.
Outline Chapter 1 Hardware, Software, Programming, Web surfing, … Chapter Goals –Describe the layers of a computer system –Describe the concept.
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.
Distributed Control Systems Emad Ali Chemical Engineering Department King SAUD University.
SLAC asyn class, Day 1, August 26, 2010 Example asyn driver Modbus Mark Rivers, Marty Kraimer, Eric Norum University of Chicago Advanced Photon Source.
LabView Users Group Meeting June 20 th, 2006 Process Control Using Compact Field Point/Labview Real-time Michael Tockstein Microelectronics Technology.
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
SNS Integrated Control System EPICS Collaboration Meeting SNS Machine Protection System SNS Timing System Coles Sibley xxxx/vlb.
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
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.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
Chapter 2: Computer-System Structures
1 CSE Department MAITSandeep Tayal Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
1 Experimental Physics and Industrial Control System (EPICS) Database Bob Dalesio, May 31,2010.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
Advanced Database Topics Bob Dalesio Outline Record processing Database Record Types Field Access Conclusions.
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 1999/Ph 514: EPICS Database II EPICS EPICS Database II Ned D. Arnold APS.
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.
Chapter 2 Basic Principle of PLC PLC Configuration &Function   Basic Configuration  CPU  Memory  Programming Interface  Communication.
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.
EPICS EPICS Limitations Bob Dalesio Marty Kraimer.
Fast Fault Finder A Machine Protection Component.
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 EPICS January 2009What is an EPICS Database What is an EPICS Database? Andrew Johnson APS (modified by Philip Taylor & Andy Foster )
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
Use of a Relational Database at Leda Bob Dalesio
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
Managed by UT-Battelle for the Department of Energy EPICS Database Kay Kasemir, SNS/ORNL Many slides from Andrew Johnson, APS/ANL Sept
Connecting LabVIEW to EPICS network
1 1999/Ph 514: What is an EPICS Database? EPICS What is an EPICS Database? Andrew Johnson APS.
1 Channel Access Concepts – IHEP EPICS Training – K.F – Aug EPICS Channel Access Concepts Kazuro Furukawa, KEK (Bob Dalesio, LANL)
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.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
An Introduction to Epics/Tango Steve Hunt Alceli EPICS Meeting 2008 INFN Legnaro 15 Oct 17:15.
1 1999/Ph 514: Lab #2 : IOC Database EPICS Lab #2 IOC Database.
KNU RTLAB A Real-Time Linux System For Autonomous Navigation And Flight Attitude Control Of An Uninhabited Aerial Vehicle Charles E. Hall, Jr. Mechanical.
Using COTS Hardware with EPICS Through LabVIEW – A Status Report EPICS Collaboration Meeting Fall 2011.
Basic Computer Organization and Design
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Marty Kraimer Advanced Photon Source Argonne National Laboratory
Module 2: Computer-System Structures
Writing a Channel Access Client in EPICS
Channel Access Concepts
EPICS: Experimental Physics and Industrial Control System
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Chapter 13: I/O Systems.
Channel Access Concepts
Presentation transcript:

Experimental Physics and Industrial Control System (EPICS) Database Bob Dalesio, June 27,2001

Outline How does the process database fit into EPICS Database configuration tools Process blocks for data acquisition and control Configurable functions in the process database

EPICS Process Database Is Distributed ca-server process DB dev support ca-client Each IOC can contain one or more process databases Each database contains its local directory - it is self contained Each IOC contains its own scan tasks to support each scan period Access to a database is given to all clients through the channel access server References to a process variables in another IOC are done through the channel access client. LAN ca-server process DB dev support ca-client

Process Databases Are Configured Off-line and Downloaded at Initialization The Process Database is loaded as an ASCII file It is configured (at least partially) using some configuration tool: GDCT - graphical configuration tool - nice menus - no hierarchy - no query Capfast - Commercial schematic package - good hierarchy - no query tcl/TK/DCT - A single record form any text editor Relational databases - nice query capability - no hierarchy Downloaded at Initialization using NFS or FTP

The EPICS Process Database Is Used as a Low-level Interface to the Process A Device layer separates the process function of interfacing I/O from the protocols required to communicate to various physical devices The device layer is typically expected to cache the values and not delay in read/write from the process database Asynchronous completion mechanisms are available when a delay is required ca-server process DB dev support ca-client LAN Process Blocks exist to implement various inputs: analog inputs, binary inputs, high-speed analog inputs, pulse counters Process blocks exist to implement various outputs analog outputs, binary outputs, high speed analog outputs, position, timing

Process Blocks Are Connected to Perform Complex Functions Process Blocks containing control / general algorithms: general purpose calculation: algebraic, logical, trigonometric, relational, if/else PID, select, ramp, C-subroutine interface Process blocks can be used to control complex devices: beam position monitor, power supply Process blocks can be used for data collection scan, histogram, compression New process block types can be easily added - useful for repetitious functions

Each Process Block is Comprised of a Set of Fields That Determine the Operation of Each Instance I/O fields are used for data flow SCAN fields determine scheduling CONVERSION fields are used to convert I/O ALARM fields specify alarm conditions and severity CHANNEL ACCESS fields control server notification and permission CONTROL fields are used to configure closed loop control behavior OPERATOR parameters are configured for display Algorithmic specific parameters are used to configure individual functions

Minimum Configuration - Analog Input ValveRB SCAN.1 Second INP#C0 S0 DTYPXY566 LINR Linear EGUF 100 EGUL 0 EGU% Reads the value for logical card 0 logical signal 0 Every.1 second from the Xycom566 device and scales the raw input between 0 and 100 percent. The raw value read from the hardware is put into the RVAL field and the converted value is put into the VAL field. NOTE: device support sets the engineering units slope given EGUF and EGUL. The device support layer knows the number of bits of resolution of the hardware and the format Analog Input

Minimum Configuration - Discrete Input TwoBitValveRB SCANI/O Intr INP#C0 S4 DTYPUniDig24 NOBT2 ZRVL0 ONVL1 TWVL2 THVL 3 ZRSTTravelling ONSTOpen TWSTClosed THSTError THSVMajor Reads the value for logical card 0 bits 4 and 5 (counting from 0) every time there is any change on the UniDig24 card. The result to the four possible states. Both limits closed is an error condition. Mulibit Binary Input

Minimum Configuration – Binary Output OneBitValveCtrl SCANPassive OUT#C0 S4 DTYPUniDig24 ZRSTClosed ONSTOpen HIGH1 Write the VAL field to the UniDig24 logical card 0, bit 4 (5 th bit) every time the operator makes a change – and then set it to 0 after 1 second. Binary Output

I/O Fields are Used for Data Flow DTYP Software type - constant or database address Name of a hardware device INP (OUT) Database Address - local or remote Process Passive (PP/NPP) CA Links (CA/CPP-In Only) Maximize Severity (MS/NMS) Hardware address - logical or physical SIM Simulation fields include value and location

Scan Fields Determine Scheduling SCAN - Scan Mechanism Periodic -.1,.2,.5, 1, 2, 5, 10 (menu driven) Hardware Event - originates from the driver layer Software Event - from an event record or program PHAS - Order within a scan mechanism EVNT - Event number for a software event FLNK - Forward Processing Link Process this record next - if and only if it is Passive Forward links to other IOCs must link to.PROC SDIS - Scan Disable Location DVAL - Scan Disable Value

Process and Data Flow Temp1 SCAN.1 Second PHAS0 INP#C0 S0 DTYPXY566 FLNK0 Reads the value for logical card 0 logical signal 0 Every.1 second from the Xycom566 device Temp1 SCANI/O Event PHAS0 INP#C0 S0 DTYPDVX2502 FLNK0 Reads the value for logical card 0 logical signal 0 Whenever the DVX2502 driver posts an event (Drivers can post events on interrupt - or have independent scan threads that post the events) Analog Input

Process and Data Flow - Passive Scanning Temp1 SCANPassive PHAS0 OUT#C0 S0 DTYPXY220 FLNK0 Write the value to logical card 0 signal 0 whenever - a channel access put is done to this record - a write is done from another record within this IOC - a forward link from any other record points here - a read is done from another record that specifies PP Binary Output

Using Process Passive Links (PP/NPP) AI_1 SCANPassive INP#C0 S0 CALC_2 SCAN1 second INPAAI_1 NPP INPB AI_1 PP CALC A-B

Using Channel Access Links (CPP/CA) Temp1 SCAN1 second INP#C0 S0 EGUDgC LINRTypeJdgc MDEL1 TEMP_ILOCK SCANPassive INPATemp1 CPP MS INPB Temp2 CPP MS CALC (A>100) || (B>100) FLNK Valve_1 Temp2 SCANI/O Intr INP#C0 S1 EGUDgF LINRTypeJdgf MDEL5 Valve_1 SCAN Passive OUT #C0 S0 OMSL Closed_Loop DOL Temp_ILOCK MS ZNAM Closed ONAM Open

Roughly Equivalent Processing Chains AI_1 SCAN.1 Second PHAS0 INP#C0 S0 CALC_1 SCAN.1 Second PHAS1 INPAAI_1 AO_1 SCAN.1 Second PHAS2 DOLCALC_1 OMSLClosed-loop AI_2 SCAN.1 Second INP#C0 S0 FLNKCALC_2 CALC_2 SCANPassive INPAAI_2 FLNKAO_2 AO_2 SCANPassive DOLCALC_2 OMSLClosed-loop AI_3 SCANPassive INP#C0 S0 CALC_3 SCANPassive INPAAI_3 PP AO_3 SCAN.1 Second DOLCALC_3 PP OMSLClosed-loop Ex. A Ex. B Ex. C

Record Execution AIPACT = Read Conversion Alarm Monitor Forward Link PACT = CALCPACT = Read Inputs Do CALC Alarms Monitors Forward Link PACT = AOPACT = Read Setpoint (DOL)16142 Limits Output Alarm Monitor Forward Link PACT = Ex. BEx. AEx. C

Which Record Is NEVER Processed ? AI_1 SCANPassive PHAS0 INP#C0 S0 CALC_1 SCANPassive INPAAI_1 PP AO_1 SCAN.1 Second DOLCALC_1 PP OMSLClosed-loop CALC_2 SCANPassive INPAAI_1 PP

Which Record Is Processed Twice ? AI_1 SCANPassive PHAS0 INP#C0 S0 CALC_1 SCANPassive INPAAI_1 PP AO_1 SCAN.1 Second DOLCALC_1 PP OMSLClosed-loop CALC_2 SCAN.1 Second INPAAI_1 PP

What Happens Here ? Intro. to the PACT Field AI_1 SCANPassive INP#C0 S0 FLNK CALC_2 CALC_1 SCANPassive INPAAI_1 PP AO_1 SCAN.1 Second DOLCALC_1 PP OMSLClosed-loop CALC_2 SCANPassive INPAAI_1 PP FLNKAO_1

IOC Timing Chart Scan Task-1 Scan Task-2 Scan Task-3 Scan Task-4 CA Monitors CA Name Resolution

Data Conversions Analog - LINR None - make the RAW count the engineering units Value Linear - Scale between EGUF and EGUL for the raw value range Piece-wise linear - table lookup for line segment - then linearize AI – has smoothing field (SMOO) for a wieghte average Discrete Matches bit pattern to string Multi-channel and Complex conversions Subroutine Records Calculation records Higher Level Records (like the Beam Position Monitor)

Alarm Conditions Alarm Components SEVR - Alarm Severity STAT - Alarm Status I/O Failure results SEVR = INVALIDSTAT = READ/WRITE Configurable Analog Alarms SEVR = NONE/MINOR/MAJORSTAT = LIMIT Limits are configured - 2 high and 2 low limits - with hysterisis Alarm severity for each limit is configured Configurable Discrete Alarms SEVR = NONE/MINOR/MAJORSTAT = STATE or COS

Channel Access Fields Analog process blocks have three monitor conditions Value deadband - MDEL Archive deadband - ADEL Alarm status change Discrete process blocks post value on change of state Monitor queue and monitor count exist for each process block Access Security - ASG Access Security Group for this record

Control Fields Desired Output Location (DOL)- where to fetch the value that will be output Database Address - (Maximize Alarm Severity recommended) Output Mode Select (OMSL) - should we use the value from DOL Supervisory - use the VAL field Closed-loop - fetch the VAL field from the DOL INVALID Alarm Action (IACT) - what to do if the record SEVR is INVALID Hold the current value Set to the safe value specified Output Address (OUT) - where to write the value Constant - do not write the value Database address - write the value to this address and Process if Passive Hardware address - call device support to convert and write the value

Algorithmic Specific Fields CALC record36 character expression, 16 input links STEPPERMOTORinitialization algorithm, retry deadband, retry count, velocity, acceleration, direction, cw limit, ccw limit, moving, done retries, first move error CPIDproportional, integral and derivative gains, error, mode SELECT16 inputs, selection criteria SUBROUTINEinitialization routine, routine, 16 input links

EPICS Process Database Performance Parameters ca-server process DB dev support ca-client Process Block execution time varies from block type to block type AI on a PowerPC ~ \100,000/second (50% idle) AI on a is ~18,000/second (50% idle) AI on a is ~6,000/second (50% idle) Fastest periodic scan rate is dependent on vxWorks clock tick - 60 Hz Interrupt scanning is limited by the CPU bandwidth (interrupt delay ~33usec) Name resolution - 10,000/second - runs at the lowest priority 2,500 Process blocks use around 1 Megabyte of memory LAN

New Developments in the Process Database Port the database so that it runs on operating systems other than VxWorks. (ANL) – in beta test on LINUX, Windows, and RTEMS. Support periodic monitoring capability. Develop low cost I/O solutions for the Pentium platform – complete. Create a new link mechanism to make checking possible at configuration time for new address types. ANL