1 / 70

EPICS Training @ PSI

EPICS Training @ PSI. Controls Section PSI 2014. Acknowledgment. Some slides in this talk came form the „Getting started with EPICS“ lecture series of APS. My special thanks go to Ned Arnold and John Maclean from the Advanced Photon Source. The original talks can be found on

jacqui
Download Presentation

EPICS Training @ PSI

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EPICS Training @ PSI Controls Section PSI 2014

  2. Acknowledgment Some slides in this talk came form the „Getting started with EPICS“ lecture series of APS. My special thanks go to Ned Arnold and John Maclean from the Advanced Photon Source. The original talks can be found on www.aps.anl.gov/epics/docs/GSWE.php EPICS Training @ PSI

  3. Contents • What is EPICS • The Parts of EPICS • What are Records • An Example for a Record • How to Solve Problems with EPICS EPICS Training @ PSI

  4. What are we doing? We need to control an accelerator (SLS) with many components remotely (due to radiation and size of the machine). How can we do this? Our answer is EPICS ? EPICS Operator Accelerator EPICS Training @ PSI

  5. What is EPICS? EPICS is: • A collaboration • A tool kit • A control system architecture EPICS is an abbreviation for: Experimental Physics and Industrial Control System EPICS Training @ PSI

  6. The History • In1989 started a collaboration between Los Alamos National Laboratory (GTA) and Argonne National Laboratory (APS) (Jeff Hill, Bob Dalesio & Marty Kraimer) • More than 150 licenses agreements were signed, before EPICS became Open Source in 2004 • Team work on problems, for example over “Tech Talk” mailing list • Collaborative efforts vary • Assistance in finding bugs • Share tools, schemes, and advice GTA: Ground Test Accelerator APS: Advanced Photon Source EPICS Training @ PSI

  7. EPICS – who is using that? Some members of the collaboration (not complete!): • ANL (APS Accelerator, APS Beamlines, IPNS) in Chicago, USA • LANL in Los Alamos, USA • ORNL (SNS) in Oak Ridge, USA • SLAC (SSRL, LCLS) in Standford, USA • JLAB (CEBAF) in Newport, USA • DESY in Hamburg, Deutschland • BESSY in Berlin, Deutschland • PSI (SLS) in Villigen, Schweiz • KEK in Tsukuba, Japan • DIAMOND Light Source (Rutherford Appleton Laboratory) in Oxfordshire, England • Iter (Test Fusion Power Plant), South France EPICS Training @ PSI

  8. Collaborations: Used at more than one Lab Contra: Complicated to adapt to your problems Pro: Bugs are already found Single Site Systems: Developed and used in one Lab Pro: Your problems solved perfectly Contra: You are on your own (no one can help) Commercial System Contra: Expensive Pro: Outsource your problems Are there alternatives to EPICS? System Name: • EPICS • TANGO • DOOCS • Tine • PVSS(Cern) EPICS Training @ PSI

  9. The architecture of EPICS Network based Client/Server Model (hence the EPICS logo) EPICS A Server provides information and service A Client uses the service or asks for the information CA CA Client Client CA CA Server Server For EPICS, client and server refer to their Channel Access role i.e. Channel Access Client and Channel Access Server EPICS Training @ PSI

  10. What is Channel Access • A protocol how to transfer data • A single data unit is called Process Variable • A Process Variable has a unique name, which is used to refer to the data • The detailed operation of Channel Access is unimportant for most programmers (it already works…) • Channel Access is not dependent on a single programming language EPICS Training @ PSI

  11. Channel Access network flow 1. Query: Broadcast CA Client 2. Answer: direct connection 3. All further queries and answers work directly (Point-To-Point) Network CA Server 1 CA Server 2 CA Server 3 EPICS Training @ PSI

  12. CAS Process Variables CAS CAS CAS CAS Process Variables Process Variables Process Variables Process Variables CAS CAS Process Variables Process Variables Control System Architecture • A network based “Client/Server” Model, whose smalest data set is a Process Variable • The Channel Access Protocol defines, what data (Process Variable) is transferred between server and client • The entire set of Process Variables establish a Distributed Real-time Database of machine status, information and control parameters EPICS Database EPICS Training @ PSI

  13. What is EPICS - Conclusion • EPICS is a control system architecture • EPICS is the connection between accelerator and operator • EPICS is based on a transfer protocol named Channel Access • Channel Access works with data sets called Process Variables • EPICS is used by many institutes all over the world EPICS Training @ PSI

  14. Contents • What is EPICS • The Parts of EPICS • What are Records • An Example for a Record • How to Solve Problems with EPICS EPICS Training @ PSI

  15. Client Software MEDM OAG Apps StripTool ALH TCL/TK Many, many others … Perl Scripts IOC IOC IOC CAS CA Server Software CAS IOC EPICS Database consists of Process Variables Custom Programs Records Sequence Programs Realtime control Parts of EPICS Output Channel Access Input Custom hardware Commercial Instruments Technical Equipment EPICS Training @ PSI

  16. IOC IOC IOC CAS IOC CAS Custom hardware Commercial Instruments Technical Equipment Typical Realisation Desktop Laptop Most CAServer applications are based on Unix/Linux or Windows IOCs are based on vxWorks (VME), Linux and Windows (SoftIOC) EPICS Training @ PSI

  17. VME Computer • VME is an abbreviation for VERSAmodule Eurocard • Industry Computer • Developed since 1980 • It is not a PC • Real-time capable (i.e. delays are calculable) • Operating system is VxWorks from Wind River company • Very expensive(search for new solutions in EPICS community) EPICS Training @ PSI

  18. IOC means Input Output Controller What is an IOC • A special CA Server and CA Client • A computer running “IOC Core” • This computer may be: • VME based, operating system vxWorks (only possibility up to 3.14) or RTEMS • PC, operating system Windows, Linux, RTEMS • Apple, operating system OSX • UNIX Workstation, operating system Solaris • An IOC normally is connected to input and/or output hardware • An EPICS control system is based on at least one Channel Access Server (normally an IOC) • An IOC runs a record database, which defines what this IOC is doing EPICS Training @ PSI

  19. Inside an IOC The major software components of an IOC (IOC Core) LAN (Network) Channel Access IOC Sequencer Database Device Support I/O Hardware EPICS Training @ PSI

  20. For what to use a Sequencer? State Machine Red light Yellow light Yellow and red lights Broken traffic light Start Green light EPICS Training @ PSI

  21. Some CA Clients (from the EPICS Website - incomplete) • ALH: Alarm Handler • BURT: Backup and Restore Tool • CASR: Host-based Save/Restore • CAU: Channel Access Utility • Channel Archiver (SNS) • Channel Watcher (SLAC) • EDM: Extensible Display Manager (ORNL) • JoiMint: Java Operator Interface and Management INtegration Toolkit (DESY) • Knobs: Knob Manager und KnobConfig, eine Schnittstelle zu SunDials • MEDM: Motif Editor und Display Manager • StripTool: Strip-chart Plotting Tool • and many more … EPICS Training @ PSI

  22. Example: ALH EPICS Training @ PSI

  23. Alarms and Colours EPICS Training @ PSI

  24. Example: ALH EPICS Training @ PSI

  25. Some CA Clients (from the EPICS Website - incomplete) • ALH: Alarm Handler • BURT: Backup and Restore Tool • CASR: Host-based Save/Restore • CAU: Channel Access Utility • Channel Archiver (SNS) • Channel Watcher (SLAC) • EDM: Extensible Display Manager (ORNL) • JoiMint: Java Operator Interface and Management INtegration Toolkit (DESY) • Knobs: Knob Manager und KnobConfig, eine Schnittstelle zu SunDials • MEDM: Motif Editor und Display Manager • StripTool: Strip-chart Plotting Tool • and many more … EPICS Training @ PSI

  26. Examples: StripTool EPICS Training @ PSI

  27. Some CA Clients (from the EPICS Website - incomplete) • ALH: Alarm Handler • BURT: Backup and Restore Tool • CASR: Host-based Save/Restore • CAU: Channel Access Utility • Channel Archiver (SNS) • Channel Watcher (SLAC) • EDM: Extensible Display Manager (ORNL) • JoiMint: Java Operator Interface and Management INtegration Toolkit (DESY) • Knobs: Knob Manager und KnobConfig, eine Schnittstelle zu SunDials • MEDM: Motif Editor und Display Manager • StripTool: Strip-chart Plotting Tool • and many more … caQtDM: Display Manager EPICS Training @ PSI

  28. Examples for caQtDM EPICS Training @ PSI

  29. Channel Access Commands “connection request” or “search request” “get” or “caget” “put” or “caput” “set a monitor” Change its value to 30.5 Notify me when the value changes Who has a PV named “S1A:H1:CurrentAO”? What is its value? Channel Access Client CA Client CA Server I do. 25.5 AMPS OK, it is now 30.5 It is now 20.5 AMPS It is now 10.5 AMPS It is now 0.0023 AMPS Channel Access Server Process Variables: “put complete” S1A:H1:CurrentAO S1:P1:x S1:P1:y S1:G1:vacuum 30.5 is too high. It is now set to the maximum value of 27.5. “post an event” or “post a monitor” or You are not authorized to change this value or EPICS Training @ PSI

  30. How does it do it? Channel Access Client Channel Access Client Operator Channel Access Client Network (Channel Access Protocol) Channel Access Server Process Variables: Power Supply Computer Interface S1A:H1:CurrentAO S1:P1:x S1:P1:y S1:G1:vacuum Beam Position Monitor Computer Interface Vacuum Gauge Computer Interface Machine EPICS Training @ PSI

  31. Contents • What is EPICS • The Parts of EPICS • What are Records • An Example for a Record • How to Solve Problems with EPICS EPICS Training @ PSI

  32. Close look at a Measured Value 295,5 Value with a data type with a unit mA with a time stamp 17.2.2005 14:21:16 with a severity (alarm state) NO_ALARM with technical limits 0 bis 400 with graphical limits 0 bis 370 with a description „Beam current in SR“ A measured value is an object with multiple related information EPICS Training @ PSI

  33. What are Records? A Record is an object with • a unique name • properties (fields) that contain information (data) • the ability to perform actions on that data XYZ1234 Employee : James Bond Badge Number: 007 Address : Whitehall, London Salary : £70070.07 unique name fields Data EPICS Training @ PSI

  34. Readback from hardware: From Measured Value to Record record (ai, "ARIDI-PCT:CURRENT") { with a unique name ARIDI-PCT:CURRENT 295,5 ai A value with a data type field (EGU, "mA") field (EGUF, "400") field (EGUL, "0") with a unit mA with a time stamp 17.2.2005 14:21:16 field (HOPR, "370") field (LOPR, "0") NO_ALARM with a severity (alarm status) field (DESC, "Beam current in SR") with technical limits 0 bis 400 field (DTYP, "HY8401") field (INP, "#C3 S0@") with graphical limits 0 bis 370 } with a description „Beam current in SR“ EPICS Training @ PSI

  35. A Process Variable name • A PV name is comprised of two parts • The record name, and • the name of a field belonging to that record • For example… ARIDI-PCT:CURRENT . EGU A Process variable name A record name A dot to join them A field name • Note that if no field name is given, Channel Access will default to using the .VAL field • i.e. “ARIDI-PCT:CURRENT” = “ARIDI-PCT:CURRENT.VAL” EPICS Training @ PSI

  36. What do Records do? • Records are active, they do things • Get data from other records or from hardware • Perform calculations • Check values are in range and raise alarms • Put data to other records or to hardware • Activate or disable other records • Wait for hardware signals (interrupts) • What a record does depends upon its type and the values in its fields • A wide range of records have already been created • New record types can be added to a new application as needed • A record does nothing until it is processed EPICS Training @ PSI

  37. Analog in Analog out Binary in Binary out Calculation Calculation out Compression Data fanout Event Fanout Histogram Motor Multi bit binary input Multi bit binary output PID control Pulse counter Pulse delay Scan Select Sequence String in String out Subarray Subroutine Waveform Some Record Types EPICS Training @ PSI

  38. IOC view of a Record record(ao,"DemandTemp") { field(DESC,"Temperature") field(ASG,"") field(SCAN,"Passive") field(PINI,"NO") field(PHAS,"0") field(EVNT,"0") field(DTYP,"VMIC 4100") field(DISV,"1") field(SDIS,"") field(DISS,"NO_ALARM") field(PRIO,"LOW") field(FLNK,"") field(OUT,"#C0 S0") field(OROC,"0.0e+00") field(DOL,"") field(OMSL,"supervisory") field(OIF,"Full") field(PREC,"1") field(LINR,"NO CONVERSION") field(EGUF,"100") field(EGUL,"0") field(EGU,"Celcius") field(DRVH,"100") field(DRVL,"0") field(HOPR,"80") field(LOPR,"10") field(HIHI,"0.0e+00") field(LOLO,"0.0e+00") field(HIGH,"0.0e+00") field(LOW,"0.0e+00") field(HHSV,"NO_ALARM") field(LLSV,"NO_ALARM") field(HSV,"NO_ALARM") field(LSV,"NO_ALARM") field(HYST,"0.0e+00") field(ADEL,"0.0e+00") field(MDEL,"0.0e+00") field(SIOL,"") field(SIML,"") field(SIMS,"NO_ALARM") field(IVOA,"Continue normally") field(IVOV,"0.0e+00") } EPICS Training @ PSI

  39. The Record Reference Manual • In English (American style) • Explains database concepts and record types • All fields are explained for common record types Test: What does the field HSV of an ai Record • Common fields for all records are described in the first part • The explained records are part of the EPICS base release • More Records exist. Find their documentation in the internet EPICS Training @ PSI

  40. Contents • What is EPICS • The Parts of EPICS • What are Records • An Example for a Record • How to Solve Problems with EPICS EPICS Training @ PSI

  41. Our First Database Channel Access Client MTRT1-TEMP:READ .VAL = 51.5 .EGU = deg C .STAT = MAJOR MTRT1-TEMP:READ .VAL = 45.5 .EGU = deg C .STAT = Normal Tell me about MTRT1-TEMP:READ IOC Channel Access Server Analog to Digital Converter Process Temperature Sensor Database Analog In MTRT1-TEMP:READ 45.5 deg C 51.5 deg C 45.5°C 5.15V 51.5°C 4.55V 132 bits 116 bits INP VAL EGU : deg C EGUL: 0 EGUF: 100 Normal Operation 5 - 50°C 0 – 100°C 0 – 10V 8 bit ADC 0 – 10V 0 – 255 bits HIGH: 51 EPICS Training @ PSI

  42. Get values from a Record • Switch on VME (on every VME a Record is created, which is connected to the first potentiometer) • Type into a terminal: caget MTRT1-TEMP:READ (change the 1 for the number of your training station) • Move the potentiometer • Ask for another values EPICS Training @ PSI

  43. CA Commands • Read a PV named <NAME> caget NAME • Get information about that Record cainfo NAME • Start a monitor camon NAME (Cancel with [Ctrl] + [c]) • Try to remember at least ca EPICS Training @ PSI

  44. Create a Graphical User Interface (GUI) • To start the Qt Designer:(editor to create new GUI)qtdesigner & • To start an existing GUI (configuration file already exist):startDM <name>.ui & EPICS Training @ PSI

  45. Create a caQtDM window (1/4) “Main Window” auswählen erzeugen EPICS Training @ PSI

  46. Create a caQtDM window (2/4) EPICS Training @ PSI

  47. Create a caQtDM window (3/4) MTRT1-TEMP:READ EPICS Training @ PSI

  48. Create a caQtDM window(4/4) Temperature.ui EPICS Training @ PSI

  49. Create a Graphical User Interface (GUI) • To start the Qt Designer:(editor to create new GUI)dtdesigner & • To start an existing GUI (configuration file already exist):startDM <name>.ui & EPICS Training @ PSI

  50. A running caQtDM window looks like this EPICS Training @ PSI

More Related