
POST SIMULATION PROCESS AND BEYOND … Alexander S. Aryshev, Ph.D. Assistant Professor KEK: High Energy Accelerator Research Organization, 1-1 Oho, Tsukuba 305-0801, Ibaraki-ken, Japan. TEL: +81-298-64-5715, FAX: +81-298-64-0321. e-mail: [email protected] 3rd international school on Beam Dynamics and Accelerator technology, 25 Feb. – 3 Mar. 2021 Outline • EPICS: – Introduction, History, Usage and Examples – Channel Access, its clients – IOC, Records, Process variables • KEK LUCX experience • Python: – Introduction, Examples, Links, Versions, Development environment • Matplotlib: – Different ways, Examples • GUI programming: – Basic concepts, GUI in python: PyQt • Python non-linear fitting • KEK LUCX ASTRA simulation • ASTRA post-processing: – ASTRA output file – ASTRA particle tracker output processing – Examples • Summary 3rd international school on Beam Dynamics 02 March 2021 2 and Accelerator technology What is EPICS? EPICS is an abbreviation for: Experimental Physics and Industrial Control System EPICS is: EPICS • A collaboration • A software tool kit • A control system architecture EPICS: • supports distributed control systems for large research facilities like accelerators • uses Client/Server and Publish/Subscribe methods • uses the Channel Access (CA) network protocol 3rd international school on Beam Dynamics 02 March 2021 3 and Accelerator technology GTA: Ground Test Accelerator The History APS: Advanced Photon Source –In1989 started a collaboration between Los Alamos National Laboratory and Argonne National Laboratory (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 –Two collaboration meetings every year (spring and autumn) in turns in America, Asia, and Europe –Collaborative efforts vary • Assistance in finding bugs • Share tools, schemes, and advice 3rd international school on Beam Dynamics 02 March 2021 4 and Accelerator technology What does EPICS Control? For example Swiss Light Source (SLS at PSI) Accelerator components to control: ca. 200 computers ca. 600 magnets (+power supplies) 300 vacuum pumps 9 cavity structures ca. 150 beam position monitors 21 beamlines (together) ca. 300 computers 10 undulator magnets more than 1200 motors Distances between components (storage ring with 130 m diameter): 50 km power cable and more than 500 km signal cable 3rd international school on Beam Dynamics 02 March 2021 5 and Accelerator technology 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, HIPA, PROSCAN, SwissFEL) in Villigen, Schweiz – KEK in Tsukuba, Japan – DIAMOND Light Source (Rutherford Appleton Laboratory) in Oxfordshire, England – Iter (Test Fusion Power Plant), South France – ESS (European Spallation Source), Lund, Sweden – … and many other 3rd international school on Beam Dynamics 02 March 2021 6 and Accelerator technology ITER-FPSC- ITER vBetaVersionPanelsOPI -UserManual.doc, Nadine Utzel, 2011 3rd international school on Beam Dynamics 02 March 2021 7 and Accelerator technology ORNL ‘CG-1D’ Beam Line Neutron Tomography, EPICS/CSS since Jan. 2013 3rd international school on Beam Dynamics 02 March 2021 8 and Accelerator technology ORNL SNS ‘VULCAN’ Beam Line Engineering Diffractometer, EPICS/CSS since March 2014 3rd international school on Beam Dynamics 02 March 2021 9 and Accelerator technology Are There Alternatives to EPICS? System Name: • EPICS Collaborations: Used at more than one Lab • TANGO Pro: Contra: Bugs are already found Complicated to adapt to your problems • DOOCS Single Site Systems: Developed and used in one Lab • Tine Pro: Contra: Your problems solved You are on your own perfectly (no one can help) • PVSS Commercial System (CERN) Pro: Contra: Outsource your problems Expensive 3rd international school on Beam Dynamics 02 March 2021 10 and Accelerator technology The Architecture of EPICS Network based Client/Server Model (hence the EPICS logo): A Server provides information and EPICS service CA CA Client Client A Client uses the service or asks for the CA CA information Server Server • For EPICS, client and server refer to their Channel Access role: i.e. Channel Access Client and Channel Access Server • This standard control system architecture is often called 3 tier architecture or 3 layer model 3rd international school on Beam Dynamics 02 March 2021 11 and Accelerator technology What is EPICS? * My Special • Any tool/program/application Data that abides by the Channel Access Collection protocol could be described as Program “EPICS Compliant”. StripTool MEDM CAC CAC CAC . EPICS can be viewed as a “toolkit” of EPICS compliant programs. One CAS CAS CAC CAS CAC can select the appropriate My tool for their need or Accelerator iocCore LabView Simulator (PVs) (PVs) develop their own. Code (PVs) 3rd international school on Beam Dynamics 12 and Accelerator technology What is Channel Access? • A protocol how to transfer data over network • A single data unit is called Process Variable • A Process Variable has a unique name, which is used to refer to the data (Naming convention needed!) • The detailed operation of Channel Access is unimportant for most programmers (it already works…) • Channel Access is not dependent on a single programming language (native library in C/C++, Java, and C# available) • The entire set of Process Variables establish a Distributed Real-time Database of machine status, information and control parameters EPICS Database CAS CAS CAS CAS Process Process Process Process Variables Variables Variables Variables 3rd international school on Beam Dynamics 02 March 2021 13 and Accelerator technology 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 3rd international school on Beam Dynamics 02 March 2021 14 and Accelerator technology Channel Access Commands “connection “get” “put” or “set a monitor” request” or or “caput” “search request” “caget” Change its Notify me when the value Who has a PV named What is its value to changes Channel Access Client “S1A:H1:CurrentAO”? value? 30.5 CA Client CA Server I do. 25.5 OK, it is It is It is It is Channel Access Server AMPS now 30.5 now now now 20.5 10.5 0.0023 Process Variables: AMPS AMPS AMPS “put S1A:H1:CurrentAO complete” 30.5 is too high. It “post an event” S1:P1:x is now set to the or maximum value or S1:P1:y of 27.5. “post a monitor” You are not authorized to S1:G1:vacuum or change this value 3rd international school on Beam Dynamics 02 March 2021 15 and Accelerator technology How is it Done? Channel Access Client Channel Access Client Channel Access Client Operator Network (Channel Access Protocol) Channel Access Server Process Variables: Computer Power S1A:H1:CurrentAO Interface Supply Beam S1:P1:x Computer Interface Position S1:P1:y Monitor Vacuum S1:G1:vacuum Computer Interface Gauge Machine 3rd international school on Beam Dynamics 02 March 2021 16 and Accelerator technology 2015 How is it Done? KEK LUCX case General schema Overhead monitors fstb.rfgtb.kek.jp FSTB LTL (Laser (Ti:Sa laser tunnel LUCX system) Transpo rt Line) Motion controls THz detector Screens EPICS FCT Data taking & analysis beta.rfgtb.kek.jp ICT Scripts PD thz.rfgtb.kek.jp CAMAC Qt + qcustomplot + epicsqt PyQt + numpy, Scipy + pyepics 3rd international school on Beam Dynamics 02 March 2021 17 and Accelerator technology How is it Done? KEK LUCX case2019 Laser Test Bench (LTB) fs Test Bench (FSTB) LUCX control room LUCX Laser hut above ATF-II Ti:Sa hut Wall monitors LUCX PC’s tunnel LabView Motion fstb.rfgtb.kek.jp LTL controls Ti:Sa laser beta.rfgtb.kek.jp System (Laser Diagnostics Transpo Soft Developments ltb-linux.rfgtb.kek.jp rt Att. Line) Control alpha.rfgtb.kek.j ltl-win.rfgtb.kek.jp RPI p EPICS RPI’s Yb fiber x Yb fiber laser Scripts and GUI laser RF. Motion Timing System monitor spectra controls ltb- win.rfgtb.kek.jp thz.rfgtb.kek.jp THz detector fstb-linux.rfgtb.kek.jp CAMAC Yb fiber Yb fiber Yb fiber Ti:Sa laser FCT laser laser laser Opt. System Power Power spectra Diagnostics ICT Supplies meters and 3rd internationalControl school on Beam Dynamics PD 02 March 2021 18 and Accelerator technology KEK LUCX, Labview EPICS clients 3rd international school on Beam Dynamics 02 March 2021 19 and Accelerator technology 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 3rd international school on Beam Dynamics 02 March 2021 20 and Accelerator technology IOC means What is an IOC? Input Output Controller • A special CA Server and CA Client (IOCs can “talk” to each other) • A computer running the “IOC Core” program (at least once) • This computer may be: - VME based, operating system vxWorks (only possibility for old EPICS Versions up to 3.14), Linux, 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 (otherwise
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages80 Page
-
File Size-