Upload
truongtuyen
View
234
Download
1
Embed Size (px)
Citation preview
Author’s name | Place, Month xx, 2007 | Event1 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
Instituto de Plasmas e Fusão Nuclear Instituto Superior Técnico Lisbon, Portugal http://www.ipfn.ist.utl.pt
B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
Introduction to LabView and EPICS
Bernardo Carvalho [email protected]
Author’s name | Place, Month xx, 2007 | Event2 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
National Instruments NI LabVIEW
Author’s name | Place, Month xx, 2007 | Event3 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
LabVIEW Programming
Author’s name | Place, Month xx, 2007 | Event4 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
EPICS at ITER
In February 2009 ITER Organization decided to use EPICS for the control system. This decision was based on three independent studies In February 2010 ITER-IO released the first version (V1.0) of CODAC Core System, which basically is a package of selected EPICS products
Author’s name | Place, Month xx, 2007 | Event5 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition EPICS Training @ PSI
What is EPICS?
EPICS is: • A collaboration • A tool kit • A control system architecture
EPICS is an abbreviation for: Experimental Physics and Industrial Control System
Author’s name | Place, Month xx, 2007 | Event6 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
The History – In1989 started a collaboration between Los Alamos
National Laboratory (GTA) and Argonne National Laboratory (APS)
(Bob Dalesio & Marty Kraimer)
– More than 150 licenses agreements were signed, before EPICS became Open Source in 2004
– Team work on problems, for example over “Tech Talk” mailing list
– Database and network protocol (CA) basically unchanged since 1990.
– Collaborative efforts vary • Assistance in finding bugs • Share tools, schemes, and advice
GTA: Ground Test Accelerator APS: Advanced Photon Source
http://www.aps.anl.gov/epics
Author’s name | Place, Month xx, 2007 | Event7 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
EPICS – who is using it?
Some members of the collaboration (very short List!):
– ANL (APS Accelerator, APS Beamlines, IPNS) in Chicago, USA – LANL in Los Alamos, USA – ORNL (SNS) in Oak Ridge, USA – SLAC (SSRL, LCLS) in Standford, USA – DESY in Hamburg, Deutschland – BESSY in Berlin, Deutschland – PSI (SLS) in Villigen, Schweiz – KEK in Tsukuba, Japan – DIAMOND Light Source (Rutherford Appleton Laboratory) in
Oxfordshire, England – In FUSION: NTSX, KSTAR, ITER and ISTTOK
Author’s name | Place, Month xx, 2007 | Event8 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
Are there alternatives to EPICS in FUSION Research?
• Tango/Taco Developed at ESRF Used by ESRF, Elettra, Soleil
• DOOCS Developed and used by DESY
• Tine Developed and used by DESY
• ACS Developed and used at PSI
• MDSPlus Developed and used by RFX, MIT, Los Alamos
Author’s name | Place, Month xx, 2007 | Event9 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
Distributed Control System
• Workstations, operator interfaces.
• Data processing middle layer, archive, …
• Front-end Computers
• I/O, PLCs, … • Plant
Ethernet
ADCs, DACs, Bin I/O Field
Bus
Author’s name | Place, Month xx, 2007 | Event10 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
Network based Client/Server Model (hence the EPICS logo)
EPICS
For EPICS, client and server refer to their Channel Access role
i.e. Channel Access Client and Channel Access Server
Client Client
Server Server
CA CA
CA CA
A Server provides information and service A Client uses the service or asks for the information
The architecture of EPICS
Author’s name | Place, Month xx, 2007 | Event11 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
What is Channel Access
• A protocol how to transfer data • A single data unit is called Process
Variable (PV) • A Process Variable has a unique name,
which is used to refer to the data • The detailed operation of Channel Access
is unimportant for most programmers (it already works…)
• Channel Access is not dependent on a single programming language
Author’s name | Place, Month xx, 2007 | Event12 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition EPICS Training @ PSI
Channel Access network flow
CA Client
CA Server 1 CA Server 2 CA Server 3
Network
1. Query: Broadcast
2. Answer: direct connection
3. All further querys and answers work directly (Point-To-Point)
Author’s name | Place, Month xx, 2007 | Event13 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
– A network based “Client/Server” Model, whose smallest data set is a Process Variable
– The Channel Access Protocol defines, what data (Process Variable) is transferred between server and client
– The entire set of Process Variables establish a Distributed Real-time Database of machine status, information and control parameters
Process
Variables
CAS
Process
Variables
CAS
Process
Variables
CAS
Process
Variables
CAS
Process
Variables
CAS
Process
Variables
CAS
Process
Variables
CAS EPICS Database
Control System Architecture
Author’s name | Place, Month xx, 2007 | Event14 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
Parts of EPICS
Commercial Instruments
IOC IOC
IOC
IOC CAS
CAS
Custom hardware
Technical Equipment
Out
put
Input
Client Software MEDM
ALH StripTool TCL/TK
Perl Scripts
OAG Apps
Many, many others …
Channel Access
CA Server Software EPICS Database
consists of Process Variables Custom Programs
Realtime control
Sequence Programs
Records
Author’s name | Place, Month xx, 2007 | Event15 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
How does it do it?
Power Supply
Beam Position Monitor
Vacuum Gauge
Computer Interface
Computer Interface
Computer Interface
Process Variables:
Channel Access Server
S1A:H1:CurrentAO
S1:P1:x
S1:P1:y
S1:G1:vacuum
Channel Access Client
Channel Access Client
Channel Access Client
Network (Channel Access Protocol)
Machine
Operator
IOC
Author’s name | Place, Month xx, 2007 | Event16 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
What is an IOC
• A special CA Server and CA Client • A computer running “IOC Core” • This computer may be:
- VME based, operating system vxWorks or RTEMS - PC, operating system Windows, Linux, RTEMS - Apple, operating system OSX - UNIX Workstation, operating system Solaris
• An IOC normally is connected to input and/or output hardware • An EPICS control system is based on at least one Channel Access Server (normally an IOC) • An IOC runs a record database, which defines what this IOC is doing
IOC means Input Output Controller
Author’s name | Place, Month xx, 2007 | Event17 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition EPICS Training @ PSI
Sequencer
Inside an IOC
LAN (Network)
Device Support
I/O Hardware
IOC
The major software components of an IOC (IOC Core)
Database
Channel Access
Author’s name | Place, Month xx, 2007 | Event18 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition 18
IOC Database
• Configuration instead of Coding • 'iocCore' software loads and executes
'Records‘ • Example Assignment:
– Read some temperature sensor – Open/close a valve when value is
above resp. below some threshold • Most Simple Record:
record(ai,"my:ai"){field(DESC,”myfirstrecord”)
}
Author’s name | Place, Month xx, 2007 | Event19 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
What do 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 wide range of records have already been created • New record types can be added to a new application as
needed • A record does nothing until it is processed
Author’s name | Place, Month xx, 2007 | Event20 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
List of Record Types • Analog in • Analog out • Binary in • Binary out • Calculation • Calculation out • Compression • Data fanout • Event • Fanout • Histogram • Motor • Multi bit binary input
• Multi bit binary output • PID control • Pulse counter • Pulse delay • Scan • Select • Sequence • String in • String out • Subarray • Subroutine • Waveform
Author’s name | Place, Month xx, 2007 | Event21 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
IOC view of a Record field(DRVH,"100") field(DRVL,"0") field(HOPR,"80") field(LOPR,"10") field(HIHI,"0.0e+00") field(LOLO,"0.0e+00") field(HIGH,"0.0e+00") field(LOW,"0.0e+00") field(HHSV,"NO_ALARM") field(LLSV,"NO_ALARM") field(HSV,"NO_ALARM") field(LSV,"NO_ALARM") field(HYST,"0.0e+00") field(ADEL,"0.0e+00") field(MDEL,"0.0e+00") field(SIOL,"") field(SIML,"") field(SIMS,"NO_ALARM") field(IVOA,"Continue normally") field(IVOV,"0.0e+00") }
record(ao,"DemandTemp") { field(DESC,"Temperature") field(ASG,"") field(SCAN,"Passive") field(PINI,"NO") field(PHAS,"0") field(EVNT,"0") field(DTYP,"VMIC 4100") field(DISV,"1") field(SDIS,"") field(DISS,"NO_ALARM") field(PRIO,"LOW") field(FLNK,"") field(OUT,"#C0 S0") field(OROC,"0.0e+00") field(DOL,"") field(OMSL,"supervisory") field(OIF,"Full") field(PREC,"1") field(LINR,"NO CONVERSION") field(EGUF,"100") field(EGUL,"0") field(EGU,"Celcius")
Author’s name | Place, Month xx, 2007 | Event22 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
This IOC 'Database’ does all that
• Visual DCT JAVA tool (Database Configuration tool) provides visual composition of EPICS databases
Author’s name | Place, Month xx, 2007 | Event23 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
EPICS Sequencer
• Adds state-machine behavior to the IOC o SNL Language
programElevatorSimula?on
ssElevator{statefloor1{when(floor2_call){}stategoto2}stategoto2{…
Author’s name | Place, Month xx, 2007 | Event24 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
CA Client Software
(from the EPICS Website - incomplete) • ALH: Alarm Handler (obsolete) • BURT: Backup and Restore Tool • CASR: Host-based Save/Restore • Channel Archiver (SNS) • EDM: Extensible Display Manager (ORNL) • MEDM: Motif Editor und Display Manager (X-WINDOWS • StripTool: Strip-chart Plotting Tool • and many more …
Author’s name | Place, Month xx, 2007 | Event25 B. Carvalho | Lisbon, November 29, 2016 | Diagnostics & Data Acquisition
Control System Studio
http://cs-studio.sourceforge.net/
CS-Studio is an JAVA Eclipse-based collections of tools to monitor and operate large scale control systems. It's a product of the collaboration between different laboratory and universities.
Best OPI, Yet (BOY) CSS BOY is an Operator Interface (OPI) development and runtime environment. An OPI is a graphical user interface which can display the control system live data graphically and provides the interface to input data to control system. With BOY, one can develop a powerful OPI in few minutes and start to run it immediately.
Author’s name | Place, Month xx, 2007 | Event26 B. Carvalho| Lisbon, February 11, 2011 | Diagnostics & Data Acquisition
Acknowledgements
• EPICS: https://www.aps.anl.gov/epics/download/index.php • CS-Studio: https://github.com/ControlSystemStudio/cs-studio/wiki • Presentation EPICS material copied from
– Bob Dalesio (LANL) – Kay Kasemir (SNL) – Elke Zimoch(PSI) – Many other EPICS Training slides