Upload
emmeline-wood
View
217
Download
0
Embed Size (px)
Citation preview
11 March 2008 IT&EE Palaver, Dietrich Beck
Neues vomNeues vom CSCS-Framework-Framework
• Motivation
• Grundlagen
• Entwicklungen der letzten Jahre
• Status und Ausblick
11 March 2008 IT&EE Palaver, Dietrich Beck
Definition of "Framework"Definition of "Framework"
Wikipedia: "A software framework is a reusable design for a software system. ... (It) may include support programs, code libraries, a scripting language, or other software to help develop and glue together the different components of a software project..."
freie Übersetzung: "Ein Software Framework ist ein wieder verwertbares Design für ein Software system. ... (Es) kann Hilfsprogramme, Code-Bibliotheken, ein Scripting-Werkzeug und andere Software enthalten, die es erlauben, verschiedene Komponenten für ein konkretes Softwareprojekt zu entwickeln und zusammenzufügen."
11 March 2008 IT&EE Palaver, Dietrich Beck
Why Frameworks for Control SystemsWhy Frameworks for Control Systems
• standardization of code– re-usability of software components– maintainability of software components– ...
• flexibility– exchange of hardware during run-time– add/remove hardware during run-time– change operational states on-the-fly– ...
• common solutions– same look and feel at different experiments– ease transfer of know-how
• ...
11 March 2008 IT&EE Palaver, Dietrich Beck
Definition of the Definition of the CSCS framework framework
• optional usage of sequencers (= sequences of commands)
• optional usage of state machines (= states and actions)
• optional GUIs on the device level
• optional interfaces to control systems of accelerator and DAQ
• standardization via a framework, here: ControlSystem framework
Main emphasis: device control, not process control
Back-end (SCADA, GUI, ...)
Middleware (communication, ...)
Front-end (devices, drivers, ...)
Ansatz: "Three-layer architecture"
11 March 2008 IT&EE Palaver, Dietrich Beck
Definition of the Definition of the CSCS frameworkframework
control system = framework + add-ons
EE/KS
and contributors
experiment
bug reports, new features requested
add-ons may become part of framework
bug fixes, new features, maintenance
CycleControl
AFGTiming+DAQ HV
GUI
11 March 2008 IT&EE Palaver, Dietrich Beck
Different Points of View – A Framework is...Different Points of View – A Framework is...
Developer: User:
... a tool box ... something ready to use
(sth. to solve a problem) without additional work
(= the solution!)
11 March 2008 IT&EE Palaver, Dietrich Beck
Cooking Recipe for the Cooking Recipe for the CSCS Framework Framework
• One development tool LabVIEW
• Standardization object oriented approach
• Distribution to many nodes DIM (www.cern.ch/dim) – Event driven communication for everything
– Scaling to large systems by distribution
– Remote access
– …
• SCADA functionality (alarming, trending, …) LabVIEW DSC module
11 March 2008 IT&EE Palaver, Dietrich Beck
LabVIEW is...LabVIEW is...
• ...just another programming language.– graphical programming instead of text based programming– dataflow paradigm
• ...an enormous collection of tools and libraries.
11 March 2008 IT&EE Palaver, Dietrich Beck
Object Orientation (OO) with Object Orientation (OO) with CSCS
• "BaseClass" provides basic functionality (communication layer, active threads, ...)
• "DeviceClass" adds functionality according to specs of device type "DS345".
• Instantiation: one object per device
"BaseClass"
"Device Class"
inheritance
AFG1AFG2
AFG3
• of course: classes for GUIs, Sequencer, State machines, ...
• OO implemented by CS using pure LabVIEW (no LVOOP)
11 March 2008 IT&EE Palaver, Dietrich Beck
Example for a Simple Control SystemExample for a Simple Control SystemUser PC n
Control GUIOn-line Analysis GUI
Central PC
Sequencer
DataCollector DSC EngineDSC Interface
SR430 FPGA DS345
Front-end PC 1
Data Acquisition
DataAcq. Instr. Driver
Timing
Timing Instr. Driver
AFG
AFG Instr. Driver
High Voltage
HV Instr. Driver
IHQF015p
Hardware Software (Proc) Software (Lib) Exp. Specific General Part Buy! Event OPC
Front-end PC n
DiscArchiver
11 March 2008 IT&EE Palaver, Dietrich Beck
Developments During the Past YearsDevelopments During the Past Years
1. project managementa. CS as Open Source Project on SourceForge
b. CS Wiki-Page @ GSI
c. source code control using Subversion
2. DIM as communication layer
3. Domain Management System for process management
4. CS for different operating systems (Windows, Linux, Pharlap)
5. reservation mechanisms for sub-systems
6. device base classes
7. configuration database
8. stability and performance
11 March 2008 IT&EE Palaver, Dietrich Beck
CS-CS-Wiki @ GSIWiki @ GSI
11 March 2008 IT&EE Palaver, Dietrich Beck
Statistics from SourceForgeStatistics from SourceForge
• among top 1% of SourceForge projects
• > 800 downloads of CSMain
• 29 packages (of 2 maintainers)
• 42 (open 3) bugs
• 30 (open 1) feature requests
• 16 (open 2) patches
• 3 feature requests
• 8 developers
11 March 2008 IT&EE Palaver, Dietrich Beck
Distributing Distributing CSCS• developer: source code control via Subversion at GSI
• user: packages on SourceForge (+Unpackager)– dependency/conflict checking– package checking– installing packages– removing packages– downloading packages– ...– "three-click installation"
11 March 2008 IT&EE Palaver, Dietrich Beck
Communication Layer: DIMCommunication Layer: DIM• Distributed Information Management: www.cern.ch/dim
• originally developed at DELPHI@LEP/CERN around 1991
• available for a multitude of platforms and languages
• light-weight, aiming at high performance, based on TCP/IP
• today: "backbone" of control systems for LHC experiments
• concept: named services, peer-to-peer connections
DIM server A
DIM server B
DIM client 1
DIM client 2
service "i"
service "ii"
command "iii" DIM name server(negotiates connections)
11 March 2008 IT&EE Palaver, Dietrich Beck
DIM-LabVIEW PerformanceDIM-LabVIEW Performance
Event rate of LabVIEW DIM interface: WinXP versus Linux, local versus remote, inter-process versus process-intern
1
10
100
1000
10000
100000
1 300 1000 3000 10000 30000 100000 300000 1000000 3000000 1E+07
Service Size [bytes]
Eve
nt
Rat
e [H
z]WinPC->WinPC (local)
WinPC->WinPC (int)
WinPC->LxPC
LxPC->WinPC
LxPC->LxPC(local)
LxPC->LxPC(int)
Throughput of LabVIEW DIM interface: WinXP versus Linux, local versus remote, inter-process versus process-intern
0.0001
0.001
0.01
0.1
1
10
100
1 300 1000 3000 10000 30000 100000 300000 1000000 3000000 1E+07
Service Size [bytes]
Th
rou
gh
pu
t [M
byt
es]
WinPC->WinPC (local)
WinPC->WinPC (int)
WinPC->LxPC
LxPC->WinPC
LxPC->LxPC(local)
LxPC->LxPC(int)
11 March 2008 IT&EE Palaver, Dietrich Beck
Domain Management System: Domain Management System: Process Management in a Distributed EnvironmentProcess Management in a Distributed Environment
11 March 2008 IT&EE Palaver, Dietrich Beck
Example: DMSViewerExample: DMSViewer
11 March 2008 IT&EE Palaver, Dietrich Beck
Device Base Classes: MotivationDevice Base Classes: Motivation
• Standardization of parameters for– events (command pattern, "call process")– services (publisher-subscriber pattern, status info)
• "Standard" defined by device model– arbitrary function generator– power supply– motor– ...
• Allows exchange of different hardware device types of the same device model
• Requires only one GUI for all classes of the same class model
• Defines interface/behavior for programming a device class
11 March 2008 IT&EE Palaver, Dietrich Beck
Class HierarchyClass Hierarchy
BaseProcess
DeviceBase
PSChannelBase
SimPowerSupply
PSChannelBaseGUI
BaseGUI
11 March 2008 IT&EE Palaver, Dietrich Beck
PSChannelBaseGUI Class (user view)PSChannelBaseGUI Class (user view)
• available via double-click in "GOG"
• one instance per power supply object
• one GUI class for all classes inheriting from the PSChannelBaseClass
11 March 2008 IT&EE Palaver, Dietrich Beck
Configuration versus ProgrammingConfiguration versus Programming• create objects during run-time
– identical binaries for different experiments possible
– application characterized by configuration
• configuration data base– presently using MS-Access
– device interfaces, bus-addresses,...
– access via TCP/IP
• settings "database"– typically as XML files
– ...
Back-end (SCADA, generic GUIs, ...)
Middleware (communication,
generic management of settings...)
Front-end (devices, drivers, ...)
11 March 2008 IT&EE Palaver, Dietrich Beck
Testing Stability and PerformanceTesting Stability and Performance• dedicated set-up including hardware for testing
– long term stability (months...)– interoperability of different versions– stress situations– performance– ...
11 March 2008 IT&EE Palaver, Dietrich Beck
Experiments using the Experiments using the CSCS framework... framework...
• require high flexibility
• have a large variety of hardware types
• have up to 10,000 (1M possible) process variables
• require fast ( 100 ns) timing control using dedicated hardware
PHELIXPHELIX
Motion CaveAMotion CaveASHIPTRAPSHIPTRAP
ISOLTRAPISOLTRAP
REXTRAPREXTRAP
LEBITLEBIT
GSI, GermanyGSI, Germany
Mainz, GermanyMainz, Germany
Greifswald, GermanyGreifswald, Germany
CERN, SwitzerlandCERN, Switzerland
MSU, USAMSU, USA
Lanzhou, ChinaLanzhou, China
data takingdata taking
developmentdevelopment
commissioningcommissioning
FOPIFOPI
RISINGRISING
others ...others ...HITRAPHITRAP LPTLPT
TrigaTRAPTrigaTRAP
ClusterTRAPClusterTRAP
11 March 2008 IT&EE Palaver, Dietrich Beck
Conclusion and OutlookConclusion and Outlook
• CS 3.10 released for LV8.2.1.
• about 10-15 active applications
• 1,000,000 PVs demonstrated, an even larger number should be feasible
• 5,000 objects ( hardware devices) demonstrated, an even larger number should be feasible
• stability of a distributed CS system is better than a few hundred hours of continuous operation
• about 15 (60) hardware devices supported on SourceForge (Subversion)
• FAIR: MATS and parts of HITRAP have selected CS as control system framework. NUSTAR? PANDA?
11 March 2008 IT&EE Palaver, Dietrich Beck
Acknowledgements...Acknowledgements...
Holger Brand, Dietrich Beck, Alexander Schwinn, Falk Ziegler, Romain Savreux, Chabouh Yazidjian, Klaus Blaum, Dennis Neidherr, Melanie Wolf, Stefan Schwarz, Josh Savory, Stefan Götte, Maximilian Kugler, Tobias Habermann, Michael Block, Frank Herfurth, Christian Rauth, Stephen Koszudowski, Manas Mukherjee, Thomas Rechel, ..., IT@GSI, ...
11 March 2008 IT&EE Palaver, Dietrich Beck
Event basicsEvent basics
• an entity waits for the next event, no polling!
• timeout handling is an important issue
publisher
subscriber subscriber subscriber
client client client
receiver
observer pattern: "one-to-many" command pattern: "many-to-one"
datacommand
example: radio, televisionadded in CS 3.0
example: typical human communicationsole possibility for CS < 3.0