# Presentation: 682869

## Control System Overview

**J. Frederick Bartlett**
**Fermilab**
**June 1,1999**

## Outline

**Introduction**
**EPICS Architecture**
**Channel Access**
**Scanning**
**Database Access Levels**
**Process Variables**
**Detector Access**

## The DØ Control System

**History**
**Run I  - CDAQ**
**Built at DØ**
**VMS and Pascal**
**Platform Independence Decree**
**Run II - EPICS**
**Shared with HEP Community**
**Runs on many platforms**
**The Standard (Control) Model**
**Operator Interface (OPI)**
**Local Area Network (LAN)**
**Input/Output Controller (IOC)**

## The Standard Model

**OPI**

**IOC**

**OPI**

**IOC**

**LAN**

## Operating Systems

**OPI (Host)**
**Operating System**
**UNIX (including Digital UNIX)**
**Linux**
**Windows NT**
**IOC (Front End)**
**Operating System**
**VxWorks**
**Windows NT ****(Portable CA only)**
**Linux ****(Portable CA only)**
**Platforms**
**Motorola 68K (MVME-162)**
**Motorola Power PC (MVME-230x)**
**Intel ****(Portable CA only)**

## EPICS Characteristics

**Maintained by HEP and astronomy community**
**Tools and building blocks for a control system**
**Distributed database**
**Scalable architecture**
**OPI’s and IOC’s may be added dynamically**
**Channel Access (CA) servers and clients**
**Event driven**
**Portable CA Server**
**Written in C++**

## EPICS Characteristics

**High performance (records processed per second)**
**MVME-162 (68K)**
**>5000**
**MVME-230x (Power PC)**
**>50000**
**Extensive collection of applications**
**Database editors**
**Display programs**
**Alarm handler**
**Archiver**
**Many more**

## EPICS Channel Access

**Channel access provides network transparent access to IOC databases**
**CA Services**
**Search - Find a process variable (PV) by name**
**Get - Get a PV value + optional information**
**PUT - Change the value of a PV**
**Add Event - Add a change-of-state callback to a PV**

## EPICS Channel Access

**Items returned with a GET**
**Value**
**String**
**Integer (char, short, int, long)**
**Floating point (float, double)**
**Enumerated menu string**
**Optional**
**Status and severity**
**Time stamp**
**Graphics and alarm limits**
**Control limits**
**Channel access transforms**
**numeric formats**
**native types**

## Asynchronous

**Provides a callback mechanism for change of state**
**Alarms**
**Value change**
**Any**
**Deadband**
**Archival**

## EPICS IOC Components

## OPI Components

**Channel**
**Access Client**

**Hardware**
**Database**

**EPICS**
**.DB File**

**CA**
**Interface**

**Channel**
**Access Server**

## Scanning

**Periodic - Process at a periodic rate **
**Standard**
**0.1, 0.2, 0.5, 1, 2, 5, 10 seconds**
**DØ may add other periods**
**Event - Process when an event is posted**
**255 events**
**Begin run, End run, ...**
**I/O Event - Process on an external interrupt**
**Passive - Process only when requested**

## Database Access Levels - Record

**Record**
**Provides a generic user view of a device + attributes**
**Simple records may be linked to provide complex behavior**

## Database Access Levels - Record

**Record**
**Monitors**
**Alarm conditions**
**Change of value**
**Transforms**
**Linear scaling**
**Table look-up**
**Sub-field operations (shift and mask)**

## Database Access Levels - Record

**Record**
**Types**
**Value related**
**ai and ao - Analog**
**bi and bo - Boolean**
**longin and longout - Binary**
**mbbi and mbbo - Multi-bit fields**
**stringin and stringout - Character strings**
**waveform - Block (array) input**
**calc - General expression evaluation**
**dfanout - Data replication**

## Database Access Levels - Record

**Record**
**Types**
**Functional**
**subroutine - Procedure call**
**timer - Time delay**
**fanout - Scan propagation**
**seq - Sequence ordering**
**event - Event generation**
**Complex**
**pid - Close-loop controller**
**histogram - Frequency counts**
**steppermotor - Positioning**
**scan - Peak finding**

## Database Access Levels - Device

**Device**
**Transforms device-specific properties to record-specific requirements**
**Types**
**Bus-specific**
**VME**
**MIL-1553B**
**GPIB**
**CANBUS**
**CAMAC**

## Database Access Levels - Device

**Device**
**Types**
**IOC-internal**
**Soft (linked to another record)**
**Symbolic (linked to global object)**
**Function (call interface)**
**IOC resource measurement**
**Detector-specific**
**Rack monitor**
**High voltage**
**SMT sequencer**

## Database Access Levels - Driver

**Driver**
**Required when a device generates interrupts**
***DØ uses MIL-1553B bus***

## Process Variables

**Application programs access process variables (PV)**
**A PV is associated with an instance of an EPICS record**
**EPICS records and, therefore, PVs have many fields (properties) that control its behavior**
**A field name is usually four characters or less and is always upper case**

## Process Variables

**D0 PV naming convention**
**Concatenation of fields bounded by separators**
**Fields**
**Detector  - i.e. CALN (calorimeter north)**
**Device - i.e. HV (high voltage channel)**
**Locator - i.e. **
**Attribute - i.e. CUR (current)**
**Field - i.e. HIHI (high alarm limit)**
**Separators**
**underscore (_)**
**slash (/)**
**dot (.)**

## Process Variables

**D0 PV naming convention**
**Examples**
**CALN_HV_001/CUR.HIHI**
**CTL_IOC_11/CPU**
**MUO_PDT_231/ADC**

## Detector Access

**Detector component**
**Calorimeter**
**Central, North, South**
**ICD**
**Central Fiber Tracker**
**Barrels and Disks**
**Central and Forward Preshower**
**Forward Proton Detector**
**Luminosity Monitor**
**Silicon Microstrip Tracker**
**Silicon Track Trigger (future)**
**MUON**
**Central and Forward**

## Detector Access

**Accelerator**
**Gateway link to ACNET system**
***Data access only***
**Cryogenics and Gas**
**Gateway link to DMACS system**
***Data access only***