# Presentation: 021242

## EPICS in SLAC Controls

**Ron Chestnut, SLAC**
**Beijing, 2001**

## PEP-II Controls

**SLC for most things****   Magnets, Digital, Analog**** **
**EPICS for some things****   Bunch Injection Control****   NLC Test Accelerator****   Longitudinal Feedback****   RF Control****   BABAR (detector) interface****   Damping Ring RF****   “Alien” PC Communication**

## Non PEP-II Controls

**NLC Test Accelerator**** **
**Spear 3**
**LCLS (Free Electron Laser)**

## Legacy SLC Controls

**Dates from 1982**
**VMS/iRMX based**
**Central Alpha + ~100 Intel “Micros”**
**SLCNET (home-built non-Ethernet)**
**Fortran/”C”/Assembler**
**Old, stable, and difficult to change**

## Moving to EPICS

**Started in 1995 with RF systems in PEP2**
**Slowly gained acceptance for six years**
**Now required for all new projects – NLC Test Accelerator success was big breakthrough**
**Working hypothesis for basis of Next Linear Collider control system**

## EPICS Support at SLAC

**Three people in the software group**
**One recently hired employee just now assigned to EPICS**
**Some help with Archiver, CMLOG, SNL support, and Unix infrastructure**
**Also BaBar and Spear III (but separate)**

## Bunch Injection Controllerhttp://www.slac.stanford.edu/grp/cd/soft/pepii/bic/index.html

**Reads out 3492 bunch currents at 60Hz**
**Calculates bucket injection sequence**
**Calibrates bucket injection quanta**
**Data input through shared memory**
**Extensive use of waveforms**
**Extensive use of sequences**
**Few Hundred Process Variables**

## BIC Requirements and Features

**Make injection requests once a second for 60 Hz injection of two rings**
**BIT-3 shared memory input from Bunch Current Monitor Hardware**
**BIT-3 shared memory I/O to Master Pattern Generator**
**Heavily parameterized for customization**
**Supports arbitrary fill patterns**

## PEP-II Fills

## PEP-II Currents

## PEP-II Luminosity

## NLC Test Acceleratorhttp://www.slac.stanford.edu/grp/cd/soft/nlcdev/tarf/index.html

**Moving from Labview & VeeTest**
**Runs unattended**
**High visibility project**
**Allen Bradley for slow control**

## NLCTA Requirements

**Collect data at 120 Hz from 24 ADC channels and 12 TDC channels**
**Decide on Go/No go for next RF pulse**
**Provide average, min, max at 1 Hz for archiving**
**Provide consistent snapshots on demand or of “bad” events**

## NLCTA Implementation

**CAENV265 charge integrating ADCs**
**Lecroy 1176 TDCs**
**VMIC-4100 DAC**
**VMIC-2534 Digital I/O**
**Record for ADC processing**
**Complex subroutine record for GO/NOGO**
**Allen Bradley and VSAM (SLAC) for slow signals**
**MATLAB offline processing**

## Longitudinal Feedback

**Two 5-IOC setups (VXI)**
**A “farm” of DSP chips**
**Control by EPICS**
**About 100 monitor points**
**About 20 control points**
**Maintained by another group**

## PEP-II RF Systemhttp://www.slac.stanford.edu/grp/cd/soft/pepii/rf/index.html

**Eight stations (VXI)**
**Each with about 100 Control points**
**Each with about 1000 Monitor points**
**Extensive use of Allen Bradley**
**EPICS provides control and monitoring**

## PEP-II RF Features

**Extensive use of sequences**
**Heavily parameterized**
**Well documented**
**Sophisticated DM displays**
**Faults saved for MATLAB analysis**
**Used by operators and RF experts**
**Controls SLAC-built VXI modules**

## Damping Ring Upgradehttp://www.slac.stanford.edu/grp/cd/soft/pepii/drrf/index.html

- South and North Damping Ring RF control and status were upgraded to use EPICS with an Allen Bradley PLC. This is modelled on the PEP-II RF implementation.
- Flat Database, about 100 PVs in each ring.
- Everything mapped to Allen Bradley.
- All real work in the PLC, done by RF group.

## “Alien” Connections

**Kai Kasimir’s Active-X CA Server used in conjunction with Labview to interface foreign devices**
**Requires some mirroring (general purpose IOC) to implement save/restore**
**Beam size measurements **
**Beam abort analysis **
**Injection laser control **

## General Purpose “Soft” IOC

**Soft records and Ethernet GPIB only**
**Mirror records for Labview-served Process Variables**
**Overhead display management**
**Moving all GPIB to EPICS control**

## Luminosity Analysis

**Replacing PC-based, connectionless system (Pascal, DOS)**
**CAMAC control being moved from PC to VME IOC (TJNAF CAMAC package)**
**Complex Pascal program becomes simple sequence plus a score of PVs.**
**Next version of processor board will be moved from CAMAC to VME**

## Issues and R&D Critical to the LCLS

- Paul Emma
***SLAC***

**Issues and R&D Critical to the LCLS**

## Linac Coherent Light Source (LCLS)

**Linac Coherent Light Source (***LCLS***)**

- 4th-Generation *X*-ray SASE FEL Based on ***SLAC*** Linac

## LCLS Issues and R&D

- 	Undulator

- 	X-ray optics

- 	Injector Requirements

***LCLS***** Issues and R&D**

## LCLS Acceleration and Compression

**LCLS Acceleration and Compression**

**undulator**

- Emittance control given coherent synchrotron radiation in bends
- Adequate machine stability (RF, charge, bunch-timing, ...)

**RF**
**gun**

## SPEAR 3 Instrumentation and Control Systems

-   Beam Monitoring and Feedback Systems
-   Timing System
-   Machine Protection Systems
-   Personnel Protection Systems
-   Cable Plant

***SPEAR 3 Instrumentation and Control Systems***

## Slide 27

## Computer Control System

## Orbit Control with Matlab and EPICS Channel Access

***Orbit Control with Matlab and EPICS Channel Access***

## VME Crates and CPUs

***VME Crates and CPUs***

**VGM5 VME Dual PPCG4/G3 CPU Board (Synergy)**
- Dual or single CPUs in a single slot solution
- Advanced PowerPC G4/G3 architecture
- 300-466 MHz CPU speed
- Backside L2 cache 1 or 2 MB per CPU
- PØ-PCI(TM) secondary data bus, ~264 MB/s
- 16-512 MB high-speed SDRAM
- Up to 9 MB Flash
- Supports industry-standard PMC I/O
- Autosensing 10/100Base-TX Ethernet
- Two serial ports standard; SCSI option
- 4-digit clock/calendar chip is Y2K compliant
- Supports VxWorks, Linux
- Supports RACEway with PXB2 PMC module
- VME64x support
- VME Speedway doubles non-block transfer rate
- Conformal coating option

**VME Crates  (Wiener)**
- 21 slots,  6U VME cards
- 3U space for fan tray and plenum chamber  Card guides and ejector rails IEEE 1101.10
- Monolithic backplane VME64x or VIPA
- Microprocessor controlled fan-tray unit UEL
-    6020 with high efficient DC-fans (3 ea.),
-   alphanumeric display, variable speed fan
- Temperature control, front or bottom air inlet
- Up to 8 temperature sensors in bin area with
-    network option for remote monitoring and
-    control (CAN-bus)
- Remote CPU reset capability
- Used at SLAC, BNL, CERN, BESSY, etc.

## Beam Monitoring and Feedback Systems

***Beam Monitoring and Feedback Systems***

**New for SPEAR 3:**
- BPM Processing System
- Orbit Feedback System
- DCCT
- Scraper Controls
- Tune Monitor
- Synchrotron Light Monitor
- Quadrupole Modulation System

**From SPEAR 2:**
- Upgraded injection monitors
- Longitudinal Bunch Phase Monitor
- Transverse Bunch Phase Monitor

## General Software Concerns at SLAC

**Now supporting iRMX, PSOS, VxWorks, VMS, HPUX, Solaris, and NT. Looking at RTEMS and Linux.**
**Still upgrading old system “micros”**
**Must move away from VMS**
**Negotiating for better computer center support**

## Challenges for EPICS at SLAC

**Management support is now there; need more assigned to real work (Hardware AND Software people)**
**VXI slot-0 controller replacement for NIC-030 is a problem**
**Supporting PPC, Motorola and National Instruments is interesting**
**Coordination with BaBar for upgrades**
**Must move to Tornado (but NIC cannot)**
**Move from VxWorks (to RTEMS, RT-Linux)?**
**What about Linux instead of Solaris?**