1 / 25

EPICS Overview Lecture 1 Matt Boyes

EPICS Overview Lecture 1 Matt Boyes. Class Outline. Lecture 1: Intro to EPICS What is EPICS EPICS Channel Access What is a PV What is a Database Types of IOCs LCLS Network Details Channel Access Permissions/Security LCLSHome EPICS LCLS Environment Setup LCLSHome Displays Display Tips.

svein
Download Presentation

EPICS Overview Lecture 1 Matt Boyes

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 OverviewLecture 1Matt Boyes

  2. Class Outline • Lecture 1: Intro to EPICS • What is EPICS • EPICS Channel Access • What is a PV • What is a Database • Types of IOCs • LCLS Network Details • Channel Access Permissions/Security • LCLSHome • EPICS LCLS Environment Setup • LCLSHome Displays • Display Tips

  3. Class Outline (cont.) • Lecture 2: Diagnostics and tools • Channel Archiver • StripTool • Message Log • Score • BPM Orbit Display • IRMIS • Matlab GUIs • Correlation plots • Command Line Tools • cainfo • caget • caput • Camonitor • CWget • CWput

  4. What is EPICS • EPICS stands for Experimental Physics and 
Industrial Control System • A Collaboration • Major Collaborators • ANL (APS Accelerator, APS Beamlines, IPNS) • LANL • ORNL (SNS) • SLAC (SSRL, LCLS) • JLAB (CEBAF) • DESY • BESSY • PSI (SLS) • KEK • Diamond Light Source

  5. What is EPICS • A Software Toolkit • A Control System Architecture EPICS CA CA Client Client CA CA Server Server 5

  6. Channel Access Channel Access protocol is the way EPICS communicates. Process Variable (PV) data is transferred between Servers and Clients. • CA Servers (IOCs) • IOCs (Distributed) Where PVs live • Database • Clients • EDM Displays • StripTool • Probe • Channel Archiver • Matlab • etc

  7. EPICS CA Overview Client StripTool Probe EDM Matlab Archiver Channel Access Server SIOC IOC IOC Meter Power Supply Camera • Based On Getting Started with EPICS Lecture Series “Introduction to Channel Access Clients” Kenneth Evans, Jr.

  8. 3. TCP Connection Let’s talk ! • UDP Broadcast Sequence • Who has it ? 2. UDP Reply I have it ! IOC Check Check Check Check Search and Connect Procedure Client StripTool Probe EDM Matlab Archiver Server IOC IOC IOC Meter Power Supply Camera • Based On Getting Started with EPICS Lecture Series “Introduction to Channel Access Clients” Kenneth Evans, Jr.

  9. What is EPICS? • Process Variable • A Process Variable (PV) is a named piece of data associated with the machine (e.g. status, readback, setpoint, parameter) • Examples of PV names and values: • LASR:IN20:196:PWR 27.8 uJ • VGCC:IN20:605:P 3.2e-08 torr • BPMS:IN20:425:X1H -0.323 mm • BEND:LI21:215:BACT 0.7684 kG-m • VVPG:IN20:155:POSITION ‘OPEN’ • S3:DIPOLE:PS:setPoint 123.4 Amps • APS:Mode ‘Stored Beam’ • BL3:HISTOGRAM {3, 8, 1, 2, 56, 44, 32, 43, 3, 5, 1} Getting Started with EPICS Lecture SeriesIntroductory Session INed Arnold Examples of: LCLS Electron PV Names • Details of the LCLS Electron PV naming convention can be found here: • http://lcls-dev.slac.stanford.edu/tiki-index.php?page=LCLS+Naming+Conventions

  10. What is EPICS? Getting Started with EPICS Lecture SeriesIntroductory Session IIJohn Maclean • A Process Variable is a named piece of data with a set of fields • Examples of fields: • Alarm Severity (e.g. NO_ALARM, MINOR, MAJOR, INVALID, WHITE) • IOC:IN20:TM01:HEARTBEAT.SEVR • Engineering Unit Designation (e.g. degrees, mm, MW) • LASR:IN20:196:PWR.EGU • Value (default if no field is given) • IOC:IN20:TM01:HEARTBEAT.VAL

  11. What do PV (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 record does nothing until it is processed, it’s INVALID • Getting Started with EPICS Lecture SeriesIntroductory Session IIJohn Maclean

  12. PV Record types • Classified into four general types • Input: e.g. • Analog In (AI) • Binary In (BI) • String In (SI) • Algorithm/control: e.g. • Calculation (CALC) • Subroutine (SUB) • General Subroutine (genSub) • Output: e.g. • Analog Out (AO) • Binary Out (BO) • Custom: e.g. • Beam Synchronous Acquisition (BSA) • Getting Started with EPICS Lecture SeriesIntroductory Session IIJohn Maclean

  13. EPICS Databases – What are they? • A collection of one or more EPICS records of various types • Records can be interconnected and are used as building blocks to create applications • A data file that’s loaded into IOC memory at boot time • Channel access talks to the IOC memory copy of the database • Getting Started with EPICS Lecture SeriesIntroductory Session IIJohn Maclean

  14. EPICS IOCs – What are they? • IOC: Input Output Controller • Communicates with the hardware, other IOCs and clients • Were the EPICS PVs live • LCLS IOC Types • VME IOCs • VME: 3100/6100 (IOC) • Embedded: Coldfire (EIOC) • SoftIOCs: Linux process (SIOC)

  15. IOC view of a record record(sub, "BEND:DMP1:400:BACT") { field(DESC, "Actual B") field(INAM, "mgntInitPoly") field(SNAM, "mgntReversePoly") field(INPA, "BEND:DMP1:400:BACT") field(INPB, "BEND:DMP1:400:POLYCOEF") field(INPC, "BEND:DMP1:400:POLYCOEF.A") field(EGU, "GeV/c") field(HOPR, "17.5") field(LOPR, "0.055") field(HIHI, "17.5") field(LOLO, "0.055") field(PREC, "7") field(BRSV, "INVALID") field(HHSV, "MAJOR") field(HSV, "MINOR") field(LSV, "MINOR") field(LLSV, "MAJOR") field(FLNK, "BEND:DMP1:400:BACTFO") field(HIGH, "17.5") field(LOW, "0.055") field(INPD, "BEND:DMP1:400:POLYCOEF.B") field(INPE, "BEND:DMP1:400:IACT MS") field(INPF, "BEND:DMP1:400:BDELTAS PP") field(INPG, "100") } record(ai, "BPMS:LI21:131:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Strip Signal") field(INP, "#C0 S14") field(FLNK, "BPMS:LI21:131:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } • Getting Started with EPICS Lecture SeriesIntroductory Session IIJohn Maclean

  16. Putting it all together ProcTemp .VAL = 51.5 .EGU = deg C .STAT = MAJOR ProcTemp .VAL = 45.5 .EGU = deg C .STAT = Normal Channel Access Client Tell me about ProcTemp IOC Channel Access Server Analog to Digital Converter Process Temperature Sensor Database Analog In ProcTemp 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 • Getting Started with EPICS Lecture SeriesIntroductory Session IIJohn Maclean

  17. Important Network Details • LCLS DEV clients (lcls-dev2) can not access CA Network PVs • LCLS DMZ clients (lcls-prod02) have read only access to CA Network PVs • EPICS Environment automatically setup for group accounts on CA Network Computers (host=lcls-srv01 users={physics, acclegr, iocegr})

  18. Channel Access Permissions/Security • PV Read Only Access from DMZ computers (lcls-prod02) • PV Write Access from CA computers (lcls-srv01, sunrays, MCC computers) • IOCs can further restrict read/write access by username and by computer name(eoicdesk only)

  19. User Environment Setup • epicsReset.bash • Must be in bash shell • Channel Access settings • Necessary for running lclshome • LCLS EPICS Read Only Setup on LinuxLogin to lcls-prod02 with: (From outside SLAC: you can not go directly to this machine unless you use VPN or jump from another SLAC host)$ ssh -X -Y username@lcls-prod02.slac.stanford.edu • Find out what shell you are running by typing echo $SHELL. Your shell will be either tcsh or bash.ex:$ echo $SHELL /bin/bash (I am running bash.) • If you are using tcsh, type this command to enter the bash shell before proceeding:$ bash • If you are using bash, type this command:$ source /afs/slac/g/lcls/epics/setup/epicsReset.bash • As an alternative you can skip the above step and instead copy the following file to your home directory. This file includes the command to source the setup script listed in the above. The advantage is that this script is executed automatically when you type bash.$ cp~jingchen/.bashrc. • More info at http://lcls-dev.slac.stanford.edu/tiki-index.php -> EPICS Classes

  20. LCLSHome • To start LCLSHome, type[mboyes@lcls-prod02:~]$ lclshome • Top display is summary status by subsystem vs location • Complex areas are further divided, check help for details • Important Alarms/severity should propagate up from lower sub displays • Summary Alarms can by bypassed on LCLSHOME, a * indicates a PV in that location is bypassed.

  21. Display Tips • Some helpful EDM tips • Middle Mouse Click on a PV will show the PV name. • This can by dragged and dropped to copy/paste the PV name somewhere else. • Control + Middle Mouse Click on a PV • A message window will appear with helpful PV info (cainfo) • Additional operations will append message window until use clears window. • HOST IOC (where PV exists) is displayed, only works on production hosts (lcls-srv01) • Does not apply to SoftIOCs running on a linux server. • Graphs • Rubber bandingto zoom

  22. Display Tips (cont.) • Some helpful EDM tips • Control + Shift + Middle Mouse Click on a PV • Brings up submenu to send PV to • Probe • Plot History in Matlab Window

  23. Your Homework before Lecture 2 • Each person should: • Have a unix account • Have the EPICS environment a setup • See slide “User Environment Setup” • Be able to start lclshome on lcls-prod02 • Optional: • Be able to log in to lcls-srv01 with a group account: • acclegr • physics

  24. Questions

More Related