TANGO A CORBA based Control system for SOLEIL
TANGO A CORBA based Control system for SOLEIL and ESRF accelerators and beamlines IBA presentation : February 2004
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 IBA presentation : February 2004
modernizing ESRF control system • • • 6 Ge. V synchrotron radiation source Continuous operation since 1993 40 beamlines 5500 hours of user beam time per year 96. 8% of beam availability for users IBA presentation : February 2004
modernizing ESRF control system • Design in the early 1990 s • VME technology running OS/9 and UNIX workstations • TACO : Distributed Objects (C + RPC) • GUIs with X 11 and Motif toolkit • Independent sub-systems around the control system kernel (data cache, archiving, etc. ) IBA presentation : February 2004
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. Innovation Everything is subject to change - Leonardo da Vinci - Buddha IBA presentation : February 2004
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 IBA presentation : February 2004
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. IBA presentation : February 2004
TANGO IBA presentation : February 2004
SOLEIL IBA presentation : February 2004
Soleil’s objectives SOLEIL : a 3 rd generation Synchrotron • An extremely brilliant Light Source: – A 2. 75 Ge. V (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 IBA presentation : February 2004
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 2500 users per year (25 % foreigners) WHAT IS SOLEIL ? Organization IBA presentation : February 2004 SOL/DIR/COM/IS/TR/REP/1120/37
control system requirements IBA presentation : February 2004
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 IBA presentation : February 2004
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 IBA presentation : February 2004
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 WIN 32 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? IBA presentation : February 2004
Technical functions Control System framework • Distributed communications 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, … IBA presentation : February 2004
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 IBA presentation : February 2004
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 ? Beginning of 1980’s TCP sockets End of 1980’s Remote Procedure Calls Mid 1990 CORBA IBA presentation : February 2004
Control system: first choices • Control system CORBA technology : as software cornerstone TANGO to ensure communications between distributed objects in a transparent way • CORBA TANGO: as control-oriented CORBA framework – an evolution of TACO, the ESRF original control system Device Device Control System Device IBA presentation : February 2004 Device
Tango : main concepts IBA presentation : February 2004
Tango : A software bus • Analogy with an electronical bus because: – – – Each card plugged on the bus has a wellidentified 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 TANGO software Bus Device interface Hardware Board IBA presentation : February 2004 (motor…)
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 MOTOR: Commands: - Go. Forward()… Attributes: - Speed (R/W)… Hardware control code Hardware IBA presentation : February 2004 Interface
Tango provides much more than just the bus !!! High level « ready to use » applications Configuration Monitoring Logging Archiving User applications Synoptic applications Bus Logiciel TANGO Software bus TANGO Devices Device Hardware IBA presentation : February 2004 Device Hardware User’s development environments MATLAB, IGOR, python, Labview
Ready to use jive : configure TANGO control system Pogo : define TANGO Interface a Device and generate html documentation IBA presentation : February 2004 Device. Tree/ATK Panel : interact and monitor Devices • Log. Viewer : Visualise, filter and analyse messages emitted by Devices
TANGO Application Tool. Kit ATK Applications ATK Widget ATK Core JLoox Java Swing & Graphics 2 D Tango Client API CORBA (jacorb) Network ATK Architecture IBA presentation : February 2004
Scalar Viewers / Editors IBA presentation : February 2004
Spectrum Viewers / Editors • fr. esrf. tangoatk. widget. attribute. Trend (override JLChart) - Tango attributes can be set by add. Atrribute() - A configuration file can be loaded directly by load. Setting() - A configuration string can be passed by set. Setting() IBA presentation : February 2004
Number Image Viewers • fr. esrf. tangoatk. widget. attribute. Number. Image. Viewer - Tango attribute is set by set. Model() - Supports: Line profile , Histogram , Best Fit , Additional marker , Colormap , Table view , zoom and 16 Bits EDF file format. IBA presentation : February 2004
Synoptic Viewers • fr. esrf. tangoatk. widget. jloox. Synoptic. File. Viewer - Vector synoptic viewer based on JLoox (Commercial software) - Integrated in ATK Synoptic already used at ESRF by ID 14 IBA presentation : February 2004
Sample Applications • Meteor Panel tangopanels. jar: fr. tangopanels. classpanels. ccd. Meteor (source can be found on sourceforge) IBA presentation : February 2004
Tango state of development IBA presentation : February 2004
TANGO : APIs and platforms • APIs/Programming languages – C++ – Java – Python • Servers User environments (only client): – Matlab – Igor Pro – Lab. View • Operating systems • – Linux – Windows NT/2000/XP – Sun-Solaris, HP UX GNU Project on sourceforge – • Clients AND Clients 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/ IBA presentation : February 2004
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 20 th of June 2002 • 10 meetings have been held between both institutes to enhance TANGO • Elettra has joined the collaboration till end of 2003 IBA presentation : February 2004
Strengths of TANGO IBA presentation : February 2004
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 IBA presentation : February 2004
Tango is simple • Tango is a simple system • • Because concepts are easy to understand A tool to generate Device. Servers 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 IBA presentation : February 2004
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 PROXIMA Controls Systems TANGO Control System Monochromator Device Hardware IBA presentation : February 2004
Conclusion on TANGO IBA presentation : February 2004
Tango in one picture Ready-to-use High-level Applications Configuration. Monitoring Logging environments Users environments: Utilisateurs: MATLAB, IGOR, python, Labview Archivage Archiving Bindings TANGO Software Bus Logiciel TANGO The bus and Devices development tools Device Hardware (E/S…) IBA presentation : February 2004 (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 (Source. Forge projects) And to share feedback between TANGO’s users IBA presentation : February 2004
Annexe : To know more on TANGO IBA presentation : February 2004
What is a Device ? IBA presentation : February 2004
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 IBA presentation : February 2004
Commands • Generics commands • Specifics commands IBA presentation : February 2004
TANGO: device: interface: command • Has a communication interface – interface = commands + attributes • commands actions • attributes physical units TANGO Software Bus Interface Commands Attributes Generics Specifics Init State Status Power. On Power. Off - current Hardware control code IBA presentation : February 2004
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(“Axis. Backward") >> motor_phi. command_inout(“Go. To. Position“, 100) IBA presentation : February 2004
Attributes IBA presentation : February 2004
TANGO: device: interface • Has a communication interface – interface = commands + attributes • commands actions • attributes physical units TANGO Software Bus Interface Attributes Commands Generics Specifics Init State Status Power. On Power. Off - current Hardware control code IBA presentation : February 2004
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) • DEV_SHORT, DEV_LONG, DEV_DOUBLE Type – 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 values vs actual value IBA presentation : February 2004
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 ("position. X") print x. value=100 mouse. write_attribute (x) IBA presentation : February 2004
State IBA presentation : February 2004
TANGO: device: state • Tango internally manages a state Machine • Each Device has an associated state – Device behavior = fonction (internal state) • query -> internal state-> execute or error • internal status generated by the device developer – 14 predefined status • • ON, OFF, CLOSE, OPEN, INSERT, EXTRACT, MOVING, STANDBY, FAULT, INIT, RUNNING, ALARM, DISABLE, UNKNOWN • a color code defined by Tango is associated to each status IBA presentation : February 2004
- Part III High-level applications IBA presentation : February 2004
Configuration: needs ID Unique ens-[seg]/dom/elem. 1 my. Device Commands Attributes Statuses ens-[seg]/dom/elem. 3 • Properties Needs – – IBA presentation : February 2004 ens-[seg]/dom/elem. 2 several of them Define equipments present in the experiment Control/Command system Parameterize equipments • Parameters linked to the Hardware (GPIB address, etc. . ) • Min and max attributes values • Alarm thresholds • Etc
Configuration: database (static) • Configuration database – Critical element of the system – unique source of information for devices and clients • Implementation – 1 dedicated device = TANGO interface of a SGBD – The TANGO_HOST environment variable = host_name: host_port (ex: localhost: 20000) defines the static database that is used TANGO Software Bus 1 dedicated TANGO device = TANGO interface of a SGBD Configuration 1 information storage medium: 1 computing database IBA presentation : February 2004
Configuration: tool Jive Graphical Application for TANGO control system IBA presentation : February 2004
Supervision: needs • Needs – – – Interact with equipments directly Have an overview of the status of each equipment Monitor the evolution of any Device attribute • Device. Tree/ATK Panel • Generic applications to design and customize your graphical interfaces, displaying, for a set of equipments IBA presentation : February 2004
Supervision: tool – Custom Java Applications : • Using TANGO ATK library which provides Java GUI widgets which manage refresh of values, errors, connexion issues IBA presentation : February 2004
Logging: tool • Log. Viewer Visualise, filter and analyse errors and informations, emitted in « real time » by the different Devices of the control system IBA presentation : February 2004
ARCHIVING Attribut Voltage Device Powe. Supply : Archiving Historical database Time. Stamp Valeur 22 -04 -2003 : 15 h 23 mn 12 s 22 -04 -2003 : 15 h 23 mn 22 s 22 -04 -2003 : 15 h 23 mn 32 s 22 -04 -2003 : 15 h 23 mn 42 s 236 354 374 Archiving TANGO Software Bus • Record attributes values: – Device • Following specific criteria (frequency or other), the archiving system is supposed to memorize the values of any attribute of any Device of the control system. Extract values • – From client applications like a MATLAB application From “ready-to-use” MAMBO application IBA presentation : February 2004
Developper tool E 2 : POGO : Code generation • • Define TANGO Interface a Device with a graphical tool Generate html documentation of the Device IBA presentation : February 2004
- Slides: 61