Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 39

EPICS - Introduction

CHD/CIT/CODAC ITER Organization


ITER_D_64HJ7D

CODAC Core System Training

Page 1

Content

Content
1. 1. 2. 3. How does it fit into CODAC Core System? What is EPICS? Channel Access Protocol Channel Access Client Tools

CODAC Core System Training

Page 2

Content

Content
1. 1. 2. 3. How does it fit into CODAC Core System? What is EPICS? Channel Access Protocol Channel Access Client Tools

CODAC Core System Training

Page 3

How does it fit in CODAC?

EPICS is the control system used for CODAC Core System


EPICS defines how data is transfered between hardware and the control room. EPICS defines the tools used for development and operation. SDD replaces parts of EPICS development:
Fully replaces PLC development Replaces DAQ part in the FC development

CODAC Core System Training

Page 4

Content

Content
1. 1. 2. 3. How does it fit into CODAC Core System? What is EPICS? Channel Access Protocol Channel Access Client Tools

CODAC Core System Training

Page 5

What is EPICS?

EPICS is a set of tools for developing and using a control system?


A set of open source software tools, libraries and applications to create distributed soft real-time control systems

CA Client

EPICS
CA Client
Channel Access Server (IOC) Process Variables:
CW S-PHT S-DLHT :VC1 CVZ -F

Channel Access Client

Channel Access Client

Cooling water plant system


Computer Interface

CA Server

CA Server

CW S-PHT S-DL :VC1 CVY1 HT -F CW S-PHT S-DL :VC1 CVY1 HT -F

Computer Interface

Flow Control Valve

CW -PHT S S-DL :MT -T HT 1 T

Computer Interface

Thermometer

CODAC Core System Training

Page 6

What is EPICS?

EPICS is a Collaboration
developed collaboratively and used worldwide for scientific instruments such as a particle accelerators, telescopes and other large scientific experiments
ANL, LANL, ORNL(SNS), DESY, Gemini, ITER

Regular collaboration meetings


2 meetings per year

EPICS Collaboration Meeting 2010 Spring hosted by ITER


CODAC Core System Training
Page 7

What is EPICS?

EPICS uses a network-based client/server model


EPICS servers and clients speak Channel Access EPICS is a distributed control system where every client can see all the servers.

CA Client

EPIC S
CA Client CA Server CA Server
Page 8

CODAC Core System Training

What is EPICS?

PV are exchanged between servers and clients


Channel Access clients needs to access Process Variables to carry out their designated tasks. A Channel Access server gives its clients access to its Process Variables.
CSS Probe
CAC

CSS BOY
CAC

CAS

CAS

Process Variables

Process Variables

CODAC Core System Training

Page 9

What is EPICS?/PV

Process Variable names have two parts


A Process Variable (PV) is a named piece of data associated with the machine (e.g. status, readback, setpoint, parameter) Example of PV names and values:
CWS-PHTS-DLHT:MT2-TT 26 degC (TT: Temperature transmitter) CWS-PHTS-DLHT:VC1-FCVZ OPEN, CLOSE, (FCVZ: Flow Control Valve command) See Signal and plant system I&C Variable Naming Convention (IDM 2UT8SH) to get to know more about how to determine PV names.

CODAC Core System Training

Page 10

What is EPICS?/PV

Values of process variables come from EPICS records defined in the EPICS database
Apart from the values, also other record attributes can be accessed:
Alarm Severity (e.g. NO_ALARM, MINOR, MAJOR, INVALID) ) Alarm Status (e.g. LOW, HI, LOLO, HIHI, READ_error) ) Timestamp N Number of elements (array) Normal Operating Range Control Limits Engineering Unit Designation (e.g. degrees, mm, MW) CWS-PHTS-DLHT:MT2-TT.SEVR
CODAC Core System Training
Page 11

Example (alarm severity): E

What is EPICS?/Architecture

Control system architecture with EPICS

Channel Access Client

Channel Access Client

Channel Access Server (IOC) Process Variables:


CWS-PHTS-DLHT:VC1FCVZ CWS-PHTS-DLHT:VC1FCVY1 CWS-PHTS-DLHT:VC1FCVY2 CWS-PHTS-DLHT:MT2TT Computer Interface

Cooling water plant system Flow Control Valve

Computer Interface

Computer Interface

Thermometer

CODAC Core System Training

Page 12

What is EPICS?/IOC

Inside an IOC
LAN IOC Channel Access Database Sequencer

Device Support I/O Hardware

CODAC Core System Training

Page 13

What is EPICS?/IOC

N Network (Channel Access)


[IOC Software]

Detailed view of IOC

EPICS iocCore services and routines


Record Record Record Record Record Record

[EPICS-supplied]
Record Record Record

Application Specific Database Record Record [of Records] Record Record


Record Record Record Record

Record

Application Specific Programs


[e.g. State Notation Language] New Device Support

Record Record

Device/Driver Support Supported Instruments Supported Instruments Supported Instruments Supported Instruments
Shared/Provided Required Optional
CODAC Core System Training

New Equipment
Page 14

What is EPICS?/Database

EPICS Databases
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 thats loaded into IOC memory at boot time Channel access talks to the IOC memory copy of the database Interface to process instrumentation Provide a common toolkit for creating applications

CODAC Core System Training

Page 15

What is EPICS?/Database/Records

EPICS records are the constituents of the EPICS database


A record is an object with
A unique name e.g. CWS-PHTS-DLHT:MT2-TT Controllable properties (fields) e.g. EGU A behavior - defined by its record type O Optional associated hardware I/O (device support) Links to other records

Each field can be accessed individually by name A record name and field name combined give a the n name of a process variable (PV) A Process Variable name is what Channel Access needs to access data
CODAC Core System Training
Page 16

What is EPICS?/Database/Records

EPICS records have a number of configurable fields


Input/Output
INP Input link OUT Output link DOL Desired output location RVAL Raw value

Alarms
HIGH LOW HIHI LOLO HSV LSV HHSV LLSV HYST High alarm limit Low alarm limit HiHi alarm limit LoLo alarm limit High alarm severity Low alarm severity HiHi alarm severity LoLo alarm severity Alarm deadband

Conversion
EGU LINR EGUL EGUF ESLO EOFF Engineering unit string Unit conversion control Low engineering value High engineering value Unit conversion slope Unit conversion offset

Monitors
ADEL MDEL Archive deadband Monitor deadband

Limits
HOPR LOPR DRVH DRVL High operating range Low operating range Drive high Drive low

Runtime data
Old raw value Previous value Old readback value Last Alarm Monitor Trigger Value ALST Last Archiver Monitor Trigger Value ORAW PVAL ORBV LALM
Page 17

Calculus
CALC Calculation

CODAC Core System Training

What is EPICS?/Database/Records

Basic Record Types


ai, ao: analog input/output bi, bo: Binary input/output longin, longout: long integer value input/output mbbi, mbbo: Multi-bit binary input/output stringin, stringout: String input/output calc: Record that performs algebraic, relational and logical operation waveform: data in arrays

CODAC Core System Training

Page 18

What is EPICS?/Database/Processing

Record Processing
Record processing can be periodic or event driven Periodic: Standard scan rates are
10, 5, 2, 1, 0.5, 0.2 and 0.1 seconds Custom scan rates can be configured up to speeds allowed by operating system and hardware

Event driven: Events include


Hardware interrupts Request from another record via links EPICS Events Channel Access Puts

CODAC Core System Training

Page 19

What is EPICS?/Database/Dataflow

Data flow is configured using links

CODAC Core System Training

Page 20

What is EPICS?/Example1

Our First Database


Channel Access Client ProcTemp Tell me about ProcTemp
.VAL .EGU .STAT = 51.5 45.5 = deg C = MAJOR Normal

IOC
Process Temperature Sensor Analog to Digital Converter

Channel Access Server

Database
Analog In
ProcTemp

45.5C 51.5C

5.15V 4.55V

132 bits 116

45.5 deg C 51.5 deg C


VAL

INP

EGU : deg C EGUL: 0

Normal Operation 5 - 50C

0 100C 0 10V

8 bit ADC 0 10V 0 255 bits

EGUF: 100 HIGH: 51

CODAC Core System Training

Page 21

What is EPICS?/Example2

Database Processing
IOC
ADC Analog In
L1:water:temp1 INP VAL

Database

EGU: Problem: deg C Sensor T1

Calculation
L1:water:tempChk INPA

Binary I/O Binary out


L1:water:chillerCtl

We have a water chiller that must be turned ON OUT INPB VAL whenever the average temperature ofDOL two ADC C: 10 temperature sensors rises above a set point. The Analog In CALC: ( (A+B)/2 ) > C set point is nominally 10 degrees centigrade.
L1:water:temp2 SCAN: 10 second INP VAL deg C

Chiller

Sensor T2

EGU:

CODAC Core System Training

Page 22

What is EPICS?/Device support

Device Support
Device and driver support interface hardware to the database LAN
IOC Channel Access Database Sequencer

Device Support I/O Hardware

CODAC Core System Training

Page 23

What is EPICS?/Device support

Supported Devices in Plant System I&C


Slow controllers: Siemens S7 PLCs
s7plc driver Full list of supported hardware: Siemens S7 PLC catalogue (IDM 333J63)

Fast controllers: PXI-6259 and PXI-6682


NI PXI-6259 for DAQ (IDM 3DEY52) NI PXI-6259 for DAQ (IDM 33Q5TX) Full list of supported hardware: ITER Catalogue of I&C Products Fast Controller (IDM 345X28) .

CODAC Core System Training

Page 24

What is EPICS?/SNL

The Sequencer
State Notation Language (SNL) is a C like language to S facilitate programming of sequential operations Fast execution - compiled code Common uses
Provide automated start-up sequences like vacuum or RF where subsystems need coordination Provide fault recovery or transition to a safe state Provide automatic calibration of equipment

CODAC Core System Training

Page 25

Content

Content
1. 1. 2. 3. How does it fit into CODAC Core System? What is EPICS? Channel Access Protocol Channel Access Client Tools

CODAC Core System Training

Page 26

Channel Access Protocol

Channel Access

CSS BOY

CSS Probe

CSS DataBrowser

Other clients

Channel Access
IOC S7PLC Thermometer Devices IOC PXI 6259 Devices IOC PCI 1588 Devices
Page 27

CODAC Core System Training

Channel Access Protocol

Search and connect graphically

CSS BOY

CSS Probe

CSS DataBrowser

Other clients

3. TCP Connection Lets talk! 2. UDP Reply I have it! IOC S7PLC Thermometer Devices IOC PXI 6259 Devices 1. UDP Broadcast Sequence Who has aaa:bbb? IOC PXI 6259 Devices
Page 28

CODAC Core System Training

Channel Access Protocol

Channel Access in one slide


connection request or search request get or caGet put or caPut Change its value to 30.5 set a monitor Notify me when the value changes

Channel Access Client

Who has a PV named CWS-PHTSDLHT:TTSPTARGET? What is its value?

CA Client CA Server
Process Variables: CWS-PHTS-DLHT:VC1-FCVZ
CWS-PHTS-DLHT:VC1-FCVY1 CWS-PHTS-DLHT:VC1-FCVY2 CWS-PHTSDLHT:TTSPTARGET

Channel Access Server

I do.

25.5 degC

OK, it is now 30.5 put complete

It is now 20.5 degC

It is now 9.2 degC post an event or post a monitor

It is now 10.3 degC

CODAC Core System Training

Page 29

Channel Access Protocol

EPICS_CA_ADDR_LIST

CSS BOY
Broadcast 123.45.1.255
Subnet 123.45.1.x

CSS Probe

CSS DataBrowser

Other clients

Specific 123.45.2.108 Not searched


Subnet 123.45.2.x

IOC S7PLC Thermometer Devices

IOC PXI 6259 Devices

IOC PXI 6259 Devices

IOC PXI 6259 Devices


Page 30

CODAC Core System Training

Channel Access Protocol

Ports
Default port number for Channel Access is 5064
Client side EPICS_CA_SERVER_PORT Server side EPICS_CAS_SERVER_PORT

CODAC Core System Training

Page 31

Content

Content
1. 1. 2. 3. How does it fit into CODAC Core System? What is EPICS? Channel Access Protocol Channel Access Client Tools

CODAC Core System Training

Page 32

Channel Access Client Tools

Channel Access Clients


Tools in CSS
Probe, BOY DataBrowser, etc.

Command line tools


caget, caput, camonitor, etc.

AlarmServer
Aggregates alarm information from several IOCs

ArchiveEngine
Monitors value changes of PVs

CODAC Core System Training

Page 33

Channel Access Client Tools/CSS

CSS
Eclipse-based collections of tools to monitor and operate large scale control system. The detail will be explained in another presentation.

CODAC Core System Training

Page 34

Channel Access Client Tools/CSS

EPICS client tools in CSS


DataBrowser BOY Probe etc.

CODAC Core System Training

Page 35

hannel Access Client Tools/Alarms

Architectural view of alarming

CODAC Core System Training

Page 36

Channel Access Client Tools/Archiving

Architectural view of archiving

CODAC Core System Training

Page 37

Channel Access Client Tools/Command line

Command-Line Tools
Useful to debug when CSS doesnt work for some reason
caget <pvname1> <pvname2> <>
Gets the value of one or more PVs

caput <pvname> <newvalue>


Set the value of one PV

camonitor <pvname1> <pvname2> <>


Monitors the value changes of one of more PVs

cainfo <pvname1> <pvname2> <>


Get information about one or more PVs

CODAC Core System Training

Page 38

Conclusions

EPICS is the control system selected by ITER

EPICS framework includes all components of control systems:


Hardware support State machines Data processing System control (screens, alarms, archiving, system restore, logging)

EPICS is based on a network server/client model. All logic is defined in an EPICS database using record. Channel Access protocol is used to exchange data between servers and clients.

CODAC Core System Training

Page 39

You might also like