610 likes | 646 Views
TANGO A CORBA based Control system for SOLEIL and ESRF accelerators and beamlines. Agenda. ESRF: Upgrading control system after 10 years SOLEIL: presentation Our control systems requirements Tango : main concepts Tango history and state of development Strengths of TANGO
E N D
TANGO A CORBA based Control system for SOLEIL and ESRF accelerators and beamlines
Agenda • ESRF: Upgrading control system after 10 years • SOLEIL: presentation • Our control systems requirements • Tango : main concepts • Tango history and state of development • Strengths of TANGO • On the Controls point of view • On the Software engineering point of view • Conclusion
modernizing ESRF control system • 6GeV synchrotron radiation source • Continuous operation since 1993 • 40 beamlines • 5500 hours of user beam time per year • 96.8% of beam availability for users
modernizing ESRF control system • Design in the early 1990s • VME technology running OS/9 and UNIX workstations • TACO : Distributed Objects (C + RPC) • GUIs with X11 and Motif toolkit • Independent sub-systems around the control system kernel (data cache, archiving, etc.)
Everything is subject to change - Buddha Innovation - Leonardo da Vinci Motivation • PC hardware dominates the market and industrial control systems • New operating systems dominate the market • New programming languages have appeared • Internet is becoming a driving force.
Motivation • VME overtaken by PC technology on the industrial market • OS/9 frozen in 1996 -> replacement needed • Java and Web technologies did not integrate easily into our C programming framework. • Avoid an uncontrolled modernization process • Be modern for another 10 years
The Front End Layer • Replacement of 70 % of our VME front ends • Upgrade of the remaining 30% from OS/9 to Linux • Increasing number of intelligent controllers on the network.
Soleil’sobjectives SOLEIL : a 3rd generation Synchrotron • An extremely brilliant Light Source: • A 2.75 GeV (machine) device, stable beam, long periods of time : 30 hours. • light wavelengths from infrared to X-rays micrometric X and VUV beams coherent on tens of µm. • An multidisciplinary research tool with many applications in fundamental and applied research : • physics, chemistry, new materials, nanotechnologies, environmental science, biology, medicine. • But also … a tool for industry and its applications
SOLEIL: Provisional schedule • Phase 1 (2002 to 2005) : construction of the device and of the first 10 beamlines ( 5 of which transferred from LURE) • Phase 2 (2006 to 2009) : operation of the first 10 beamlines and construction of 14 additional lines with progressive start of operation • Phase 3 (from the end of 2009) : operation of 24 beamlines with one or two experimental devices per beamline 2500users per year (25 % foreigners) SOL/DIR/COM/IS/TR/REP/1120/37 WHAT IS SOLEIL ? Organization
Control/command problematics at SOLEIL • Implement: • 1 control system for accelerators: LINAC, ring, Booster • 1 control system for every beamline • Need to exchange information between those different systems, using a common language As a whole, at least 25 different control systems
Distributed systems: SOLEIL example for Machine Control • The system components are geographically distributed on machines interconnected by a computing network: • More than 100 Compact PCI frontend • More than 100 PLC • Dozens of operator stations
Heterogeneous systems on hardware and software levels • Slow industrial systems: PLC • Fast acquisition systems : CPCI, … • Ready to use systems: • LINAC control/command • Control software sold with equipments (Residual gas analyzers, SCIENTA analyzers, …) • Heterogeneous operating systems • Scientific applications under Linux • Drivers/libraries under WIN32 or under Linux • Of course, the list of equipments is not known at the beginning of the project • So we need to keep things opened • How to obtain a coherent whole from heterogeneous hardware and software?
Technical functions Control System framework • Distributedcommunications between software entities • Commands • Messages: errors, alarms, exchange of data • Communications • Synchronous, asynchronous • Event driven • A relational database containing the static description of the whole system • An historical database holding Machine measurements • Tools: • Administration of the CS itself (startup, config, acces control, …) • Operator interfaces, Alarm handler, archive data displayer,…
Requirements on operation side • No logical barriers • An access to all machine parameters from a set of supported software environments: Labview, MATLAB, C++, java, scripting languages,… • No material barriers • The CS must be not dependent of underlying hardware, networks or Operating Systems • glue between all software components of SOLEIL • Integration of software written by Machine and operation staffs • Integration of sub-systems (personnel safety system,building management system, COTS (Commercial-Off-The-Shelf) components …) • It implies a standardization of the writing of software applications • The ease of use is a key factor • The CS must hide technical complexity of a distributed system • As parts of software will be written by Machine people
Our vision of a Control System • « A control system is a sea of networked objects; every part of the control system should be a network object whatever it is a low-level, high-level or application-oriented function » • How to make all these objects communicate ?
Control system TANGO CORBA Device Device Device Device Device Device Control System Device Device Device Device Device Device Control system: first choices • CORBA technology : as software cornerstoneto ensure communications between distributed objects in a transparent way • TANGO: as control-oriented CORBA framework • an evolution of TACO, the ESRF original control system
Tango : main concepts
TANGO software Bus Device interface Hardware (motor…) Board Tango : A software bus • Analogy with an electronical bus because: • Each card plugged on the bus has a well-identified function • Each card is not or hardly coupled to the others • Development of each card can be decoupled • But each card must respect a strict and well-defined interface in order to connect to the bus
MOTOR: Commands: - GoForward()… Attributes: - Speed (R/W)… Hardware control code Hardware An example of a Device Interface : A motor • The Interface : • describes what the Device is supposed to do • It’s only a promise of the services you may expect from the Device • But there isn’t any magic !!! • Code has to be written to fullfill the promised services Interface
User applications User’s development environments Logging Monitoring Monitoring Archiving Configuration MATLAB, IGOR, python, Labview Software bus TANGO Device Device Hardware Tango provides much more than just the bus !!! High level « ready to use » applications Synoptic applications Bus Logiciel TANGO TANGO Devices Device Hardware
DeviceTree/ATK Panel :interact and monitor Devices jive : configure TANGO control system Ready to use Pogo : defineTANGO Interface a Device andgeneratehtml documentation • LogViewer : Visualise, filter and analyse messages emitted by Devices
TANGO Application ToolKit ATK ATK Applications ATK Widget ATK Core JLoox Tango Client API Java Swing & Graphics2D CORBA (jacorb) Network ATK Architecture
Spectrum Viewers / Editors ATK • fr.esrf.tangoatk.widget.attribute. Trend (override JLChart)- Tango attributes can be set by addAtrribute()- A configuration file can be loaded directly by loadSetting()- A configuration string can be passed by setSetting()
Number Image Viewers ATK • fr.esrf.tangoatk.widget.attribute. NumberImageViewer- Tango attribute is set by setModel()- Supports: Line profile , Histogram , Best Fit , Additional marker , Colormap , Table view , zoom and 16Bits EDF file format.
Synoptic Viewers ATK • fr.esrf.tangoatk.widget.jloox. SynopticFileViewer- Vector synoptic viewer based on JLoox (Commercial software)- Integrated in ATK Synoptic already used at ESRF by ID14
Sample Applications ATK • Meteor Panel tangopanels.jar: fr.tango.tangopanels.classpanels.ccd.Meteor (source can be found on sourceforge)
Clients AND Servers Clients TANGO : APIs and platforms • APIs/Programming languages • C++ • Java • Python • User environments (only client): • Matlab • Igor Pro • LabView • Operating systems • Linux • Windows NT/2000/XP • Sun-Solaris, HP UX • GNUProject on sourceforge • http://sourceforge.net/projects/tango-cs • The ESRF site reference • http://www.esrf.fr/computing/cs/tango/index.html • The SOLEIL site reference • http://www-controle.synchrotron-soleil.fr:8001/
ESRF-SOLEIL-Elletra Collaboration • First Software Development Plan defined in April 2002 • New Software development plan wrote in January 2004 • Cooperation Agreement in the Field of Control-Software for Accelerators and Beamlines: • Technical coordinators and regular meetings • Equal contributions from all parties • Intellectual properties and licensing policy (GNU) • Software plan: • Short-term developments to add essential missing features • Middle-term ones officially firmed the 20th of June 2002 • 10 meetings have been held between both institutes to enhance TANGO • Elettra has joined the collaboration till end of 2003
Tango a solution for new Controls issues • Controls trends • Less and less direct connection to HW (Digital or Analog I/O) • Link to Hardware is very often done through Software links • API & libraries • Third parties systems Tango is a very good Software glue to face these new integration challenges
Tango is simple • Tango is a simple system • Because concepts are easy to understand • A tool to generate DeviceServers helps developpers • CORBA subtilities are completely hidden • For people coming from « C –programming » world : • Short learning curve • They can focus on their application, as TANGO adds very few complexity • Elletra’s feedback is interesting as they are newcomers in the project
TANGO Control System PROXIMA Controls Systems Monochromator Device Device Device Hardware Tango : a software component philosophy • Allowing to share developments between Controls systems • Decouples High level applications and HW Controls • the software can therefore be developed by different people • A device is a « Software Component » per se • Can be reused in different Controls System • Can be used by another Device
Configuration Device Tango in one picture Ready-to-use High-level Applications environments Users Archivage Archiving Monitoring Monitoring Logging Logging Configuration Configuration environments: Utilisateurs: MATLAB, IGOR, MATLAB, IGOR, python, python, Labview Labview Bindings TANGO Software Bus Bus Logiciel TANGO The bus and Devices development tools Device Device Device Device Hardware Hardware Hardware Hardware (E/S…) (E/S…) (motor…)
An open source solution for distributed control • TANGO is a modern control system based on CORBA • Tango is a good base for facing new Controls issues • because it is based on modern technologies : C++, java, python • A Strong commitment of the funding institutes • Because TANGO is their software tool for developing all their Controls and Acquisitions applications • TANGO has a roadmap for : • the immediate future • Mid term future • The TANGO collaboration is expanding: • IBA ? , CEA institute • We are working on a Collaborative development model • Efforts are done to organise this parallel activities between institutes (SourceForge projects) • And to share feedback between TANGO’s users
TANGO: device: definition • device = 1 <entity> to control • Hardware or software • «physical» device / «logical» device • device = 1 polymorphous object • 1 equipement (ex: 1 power supply) • 1 collection of equipment (ex: 1 motor + 1 coder) • 1 cluster of devices : • a monochromator • a complete subsystem (a LINAC !) • A pure software component : A scan server for instance
Commands • Generics commands • Specifics commands
Commands Attributes Generics Specifics Generics Specifics Init State Status PowerOn PowerOff - current Hardware control code TANGO: device: interface: command • Has a communication interface • interface = commands + attributes • commands actions • attributes physical units TANGO Software Bus Interface
TANGO: device: interface: command • Generic commands exist for EVERY Device • Ping, Init, State, etc … • Specific commands • Are defined by the Device developer • have : 0 or 1 in argument (argin) • give : 0 or 1 out argument (argout) • argin & argout = 1 of the 20 TANGO types • Execution : • launch the command_inout function with the following arguments : • command name • In parameter of the command • Output: • result of command execution • Exemple Python : >> motor_phi.command_inout(“AxisBackward") >> motor_phi.command_inout(“GoToPosition“,100)
Commands Attributes Generics Specifics Generics Specifics Init State Status PowerOn PowerOff - current Hardware control code TANGO: device: interface • Has a communication interface • interface = commands + attributes • commands actions • attributes physical units TANGO Software Bus Interface
TANGO: device interface: attribute • Definition • Physical unit produced or administrated by the device • ex: motor position, power emitted by a power supply, … • Format : from 0 to 2 dimensions • SCALAR • SPECTRUM (i.e. vector) • IMAGE (i.e. matrix) • Type • DEV_SHORT, DEV_LONG, DEV_DOUBLE • scalar, spectrum or image • DEV_STRING • scalar only • Accessibility • READ • read-only access • WRITE • write-only access • READ_WRITE • Read-and-write only access • set valuesvs actual value
TANGO: device: interface: attribute • Obtain/modify the current value of an attribute? • Prog. Env. OO (C++, Java, Python) • dev.read_attribute(s) (attr_name_list) • dev.write_attribute(s) (attr_name_list) • Python Example: >> x = mouse.read_attribute ("positionX") >> print x.value >> x.value=100 >> mouse.write_attribute (x)