1.3 - epics introduction

39
CODAC Core System Training Page 1 EPICS - Introduction CHD/CIT/CODAC ITER Organization ITER_D_64HJ7D

Upload: mateyko

Post on 22-Oct-2014

115 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1.3 - EPICS Introduction

CODAC Core System Training Page 1

EPICS - Introduction

CHD/CIT/CODAC

ITER OrganizationITER_D_64HJ7D

Page 2: 1.3 - EPICS Introduction

CODAC Core System Training Page 2

Content

1. How does it fit into CODAC Core System?

2. What is EPICS?

3. Channel Access Protocol

4. Channel Access Client Tools

Content

Page 3: 1.3 - EPICS Introduction

CODAC Core System Training Page 3

Content

1. How does it fit into CODAC Core System?

2. What is EPICS?

3. Channel Access Protocol

4. Channel Access Client Tools

Content

Page 4: 1.3 - EPICS Introduction

CODAC Core System Training Page 4

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

How does it fit in CODAC?

Page 5: 1.3 - EPICS Introduction

CODAC Core System Training Page 5

Content

1. How does it fit into CODAC Core System?

2. What is EPICS?

3. Channel Access Protocol

4. Channel Access Client Tools

Content

Page 6: 1.3 - EPICS Introduction

CODAC Core System Training Page 6

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

What is EPICS?

EPICSClientClient

Server Server

CACA

CA CA

Thermo-meter

Computer Interface

Computer Interface

Computer Interface

Channel Access Server(IOC)

Process Variables:

CWS-PHTS-DLHT:VC1-FCVZ

Channel Access Client Channel Access Client

FlowControlValve

Cooling water plant system

CWS-PHTS-DLHT:VC1-FCVY1CWS-PHTS-DLHT:VC1-FCVY2

CWS-PHTS-DLHT:MT2-TT

Page 7: 1.3 - EPICS Introduction

CODAC Core System Training Page 7

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

What is EPICS?

EPICS Collaboration Meeting2010 Spring hosted by ITER

Page 8: 1.3 - EPICS Introduction

CODAC Core System Training Page 8

EPICSClientClient

Server Server

CACA

CA CA

EPICS uses a network-based “client/server” model

What is EPICS?

• EPICS servers and clients speak Channel Access• EPICS is a distributed control system where every

client can see all the servers.

Page 9: 1.3 - EPICS Introduction

CODAC Core System Training Page 9

PV are exchanged between servers and clients

What is EPICS?

• 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.

CSSProbe

CSSBOY

ProcessVariables

ProcessVariables

CAS CAS

CACCAC

Page 10: 1.3 - EPICS Introduction

CODAC Core System Training Page 10

Process Variable names have two parts

What is EPICS?/PV

• 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.

Page 11: 1.3 - EPICS Introduction

CODAC Core System Training Page 11

Values of process variables come from EPICS records defined in the EPICS database

What is EPICS?/PV

• 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– Number of elements (array)– Normal Operating Range– Control Limits– Engineering Unit Designation (e.g. degrees, mm, MW)

• Example (alarm severity): CWS-PHTS-DLHT:MT2-TT.SEVR

Page 12: 1.3 - EPICS Introduction

CODAC Core System Training Page 12

Control system architecture with EPICS

What is EPICS?/Architecture

Thermo-meter

Computer Interface

Computer Interface

Computer Interface

Channel Access Server(IOC)

Process Variables:CWS-PHTS-DLHT:VC1-

FCVZ

Channel Access Client Channel Access Client

FlowControlValve

Cooling water plant system

CWS-PHTS-DLHT:VC1-FCVY1

CWS-PHTS-DLHT:VC1-FCVY2

CWS-PHTS-DLHT:MT2-TT

Page 13: 1.3 - EPICS Introduction

CODAC Core System Training Page 13

Inside an IOC

What is EPICS?/IOC

LAN

I/O Hardware

IOC

Database Sequencer

Device Support

Channel Access

Page 14: 1.3 - EPICS Introduction

CODAC Core System Training Page 14

Detailed view of IOCNetwork (Channel Access)

“Supported” Instruments “New” Equipment

[IOC Software]

Device/Driver Support

EPICS “iocCore” services and routines [EPICS-supplied]

Application Specific Database [of Records]

Application Specific

Programs[e.g. State Notation

Language]

New Device Support

“Supported” Instruments “Supported” Instruments “Supported” InstrumentsShared/Provided Required Optional

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

Record

What is EPICS?/IOC

Page 15: 1.3 - EPICS Introduction

CODAC Core System Training Page 15

EPICS Databases

What is EPICS?/Database

• 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• Interface to process instrumentation• Provide a common toolkit for creating applications

Page 16: 1.3 - EPICS Introduction

CODAC Core System Training Page 16

EPICS records are the constituents of the EPICS database

What is EPICS?/Database/Records

• 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– 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

name of a process variable (PV)• A Process Variable name is what Channel Access

needs to access data

Page 17: 1.3 - EPICS Introduction

CODAC Core System Training Page 17

EPICS records have a number of configurable fields

What is EPICS?/Database/Records

Input/OutputINP Input linkOUT Output linkDOL Desired output locationRVAL Raw value

ConversionEGU Engineering unit stringLINR Unit conversion controlEGUL Low engineering valueEGUF High engineering valueESLO Unit conversion slopeEOFF Unit conversion offset

LimitsHOPR High operating rangeLOPR Low operating rangeDRVH Drive highDRVL Drive low

CalculusCALC Calculation

AlarmsHIGH High alarm limitLOW Low alarm limitHIHI HiHi alarm limitLOLO LoLo alarm limitHSV High alarm severityLSV Low alarm severityHHSV HiHi alarm severityLLSV LoLo alarm severityHYST Alarm deadband

MonitorsADEL Archive deadbandMDEL Monitor deadband

Runtime dataORAW Old raw valuePVAL Previous valueORBV Old readback valueLALM Last Alarm Monitor

Trigger ValueALST Last Archiver Monitor

Trigger Value

Page 18: 1.3 - EPICS Introduction

CODAC Core System Training Page 18

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

What is EPICS?/Database/Records

Page 19: 1.3 - EPICS Introduction

CODAC Core System Training Page 19

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

What is EPICS?/Database/Processing

Page 20: 1.3 - EPICS Introduction

CODAC Core System Training Page 20

Data flow is configured using links

What is EPICS?/Database/Dataflow

Page 21: 1.3 - EPICS Introduction

CODAC Core System Training Page 21

Our First Database

Analog In

ProcTemp

EGU : deg C

VALINP

Temperature Sensor

IOC

Database

Analog to Digital Converter

0 – 100°C0 – 10V

8 bit ADC0 – 10V0 – 255 bits

EGUL: 0

EGUF: 100

HIGH: 51

Process

45.5°C 4.55V 116 bits

Channel Access Server

Normal Operation5 - 50°C

Channel Access Client

Tell me about ProcTemp

ProcTemp.VAL = 45.5 .EGU = deg C.STAT = Normal

45.5 deg C51.5°C 5.15V 132 bits 51.5 deg C

ProcTemp.VAL = 51.5 .EGU = deg C.STAT = MAJOR

What is EPICS?/Example1

Page 22: 1.3 - EPICS Introduction

CODAC Core System Training Page 22

Database Processing

Binary out

L1:water:chillerCtl

Calculation

L1:water:tempChk

CALC: ( (A+B)/2 ) > C

C: 10

SCAN: 10 second

Analog In

L1:water:temp1

EGU: deg C

VALINP

EGU: deg C

VALINP

INPB

INPA

VAL DOL OUT

T2Sensor

SensorT1

IOC

DatabaseADC

ADC

Binary I/O

ChillerAnalog In

L1:water:temp2

What is EPICS?/Example2

Problem:

We have a water chiller that must be turned ON whenever the average temperature of two temperature sensors rises above a set point. The set point is nominally 10 degrees centigrade.

Page 23: 1.3 - EPICS Introduction

CODAC Core System Training Page 23

Device Support

What is EPICS?/Device support

• Device and driver support interface hardware to the database LAN

I/O Hardware

IOC

Database Sequencer

Device Support

Channel Access

Page 24: 1.3 - EPICS Introduction

CODAC Core System Training Page 24

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) .

What is EPICS?/Device support

Page 25: 1.3 - EPICS Introduction

CODAC Core System Training Page 25

The Sequencer

What is EPICS?/SNL

• State Notation Language (SNL) is a ‘C’ like language to 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

Page 26: 1.3 - EPICS Introduction

CODAC Core System Training Page 26

Content

1. How does it fit into CODAC Core System?

2. What is EPICS?

3. Channel Access Protocol

4. Channel Access Client Tools

Content

Page 27: 1.3 - EPICS Introduction

CODAC Core System Training Page 27

Channel Access

Channel Access Protocol

CSS BOY CSS Probe CSS DataBrowser Other clients

IOC IOC IOC

S7PLC PXI 6259 PCI 1588

Thermometer Devices DevicesDevices

Channel Access

Page 28: 1.3 - EPICS Introduction

CODAC Core System Training Page 28

Search and connect graphically

Channel Access Protocol

CSS BOY CSS Probe CSS DataBrowser Other clients

IOC IOC IOC

S7PLC PXI 6259 PXI 6259

Thermometer Devices DevicesDevices

1. UDP Broadcast Sequence Who has “aaa:bbb”?

2. UDP Reply I have it!

3. TCP Connection Let’s talk!

Page 29: 1.3 - EPICS Introduction

CODAC Core System Training Page 29

Channel Access in one slide

Channel Access Protocol

CA Server

CA Client

Channel Access Client

Who has a PV named“CWS-PHTS-DLHT:TTSPTARGET”?

I do.

What is its value?

25.5 degC

Change its value to 30.5

“connection request” or “search request”

OK, it is now 30.5

Notify me when the value changes

It is now 20.5 degC

It is now 10.3 degC

It is now 9.2 degC

“put” or “caPut”

“get” or “caGet”

“set a monitor”

“post an event”or “post a monitor”

“put complete”

Process Variables:

Channel Access Server

CWS-PHTS-DLHT:VC1-FCVZCWS-PHTS-DLHT:VC1-FCVY1CWS-PHTS-DLHT:VC1-FCVY2

CWS-PHTS-DLHT:TTSPTARGET

Page 30: 1.3 - EPICS Introduction

CODAC Core System Training Page 30

Subnet123.45.2.x

Subnet123.45.1.x

EPICS_CA_ADDR_LIST

Channel Access Protocol

CSS BOY CSS Probe CSS DataBrowser Other clients

IOC IOC IOC

S7PLC PXI 6259 PXI 6259

Thermometer Devices DevicesDevices

Broadcast123.45.1.255

IOC

PXI 6259

Devices

Specific123.45.2.108

Notsearched

Page 31: 1.3 - EPICS Introduction

CODAC Core System Training Page 31

Ports

Channel Access Protocol

• Default port number for Channel Access is 5064– Client side

EPICS_CA_SERVER_PORT– Server side

EPICS_CAS_SERVER_PORT

Page 32: 1.3 - EPICS Introduction

CODAC Core System Training Page 32

Content

1. How does it fit into CODAC Core System?

2. What is EPICS?

3. Channel Access Protocol

4. Channel Access Client Tools

Content

Page 33: 1.3 - EPICS Introduction

CODAC Core System Training Page 33

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

Channel Access Client Tools

Page 34: 1.3 - EPICS Introduction

CODAC Core System Training Page 34

CSS

Channel Access Client Tools/CSS

• Eclipse-based collections of tools to monitor and operate large scale control system.

• The detail will be explained in another presentation.

Page 35: 1.3 - EPICS Introduction

CODAC Core System Training Page 35

EPICS client tools in CSS

Channel Access Client Tools/CSS

• DataBrowser• BOY• Probe• etc.

Page 36: 1.3 - EPICS Introduction

CODAC Core System Training Page 36

Architectural view of alarming

Channel Access Client Tools/Alarms

Page 37: 1.3 - EPICS Introduction

CODAC Core System Training Page 37

Architectural view of archiving

Channel Access Client Tools/Archiving

Page 38: 1.3 - EPICS Introduction

CODAC Core System Training Page 38

Command-Line Tools

Channel Access Client Tools/Command line

• Useful to debug when CSS doesn’t 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

Page 39: 1.3 - EPICS Introduction

CODAC Core System Training Page 39

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.

Conclusions