Presentation is loading. Please wait.

Presentation is loading. Please wait.

Elletra’s presentation : December 2003 A quick presentation of TANGO.

Similar presentations


Presentation on theme: "Elletra’s presentation : December 2003 A quick presentation of TANGO."— Presentation transcript:

1 Elletra’s presentation : December 2003 A quick presentation of TANGO

2 Elletra’s presentation : December 2003 Agenda TANGO a quick tour –Tango : a software bus –Tango : a distributed system Tango : main concepts –Device –Commands –Attributes Present current high level “ready to use” applications –Configuration –Supervision –Logging –Archiving Strengths of TANGO –On the Controls point of view –On the Software engineering point of view –Interest for beamline controls Tango is a small and simple system : LUCIA example Generic scan capabilities

3 Elletra’s presentation : December 2003 - Part I - A quick tour of TANGO

4 Elletra’s presentation : December 2003 TANGO system: A software bus

5 Elletra’s presentation : December 2003 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 TANGO software Bus interface But each card must respect a strict and well-defined interface in order to connect to the bus Hardware Device (motor…) Board

6 Elletra’s presentation : December 2003 Interface 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: Hardware control code Hardware Commands: - GoForward()… Attributes: - Speed (R/W)… An example of a Device Interface : A motor

7 Elletra’s presentation : December 2003 Tango provides much more than just the bus !!! Bus Logiciel TANGO User applications User’s development environments python,Labview MATLAB, IGOR, High level « ready to use » applications SCADA TANGO Devices Device Hardware Device Hardware Software bus TANGO Logging Configuration Archiving Monitoring

8 Elletra’s presentation : December 2003 TANGO : A software solution to integrate distributed and heterogeneous systems

9 Elletra’s presentation : December 2003 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

10 Elletra’s presentation : December 2003 Heterogeneous systems on hardware and software levels Slow industrial systems: PLC Fast acquisition systems : CPCI, VME, … 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 How to obtain a coherent whole from heterogeneous hardware and software?

11 Elletra’s presentation : December 2003 From concepts to computers reality Bus Logiciel TANGO User applications User’s development environments python,Labview MATLAB, IGOR, High level « ready to use » applications SCADA TANGO Devices Hardware Device Hardware Software bus TANGO Logging Configuration Archiving Monitoring

12 Elletra’s presentation : December 2003 From concepts to computers reality And the winner is : CORBA

13 Elletra’s presentation : December 2003 TANGO : introduction CORBA = 1 generic tool support to the development of distributed applications A powerful but cumbersome tool No functionalities «ctrl/cmd oriented» Control System CORBA

14 Elletra’s presentation : December 2003 TANGO : introduction a framework CORBA ctrl/cmd oriented –A toolbox to implement the system –A specialization of CORBA adapted to the needs CORBA Framework Control System TANGO CORBA

15 Elletra’s presentation : December 2003 TANGO: APIs and platforms Programming APIs/Languages –C++ (performances) –Java (portability) –Python (scripts) –Others (Matlab, Igor Pro, LabView) Platforms –Linux –Windows NT/2000/XP –Sun-Solaris Servers Clients

16 Elletra’s presentation : December 2003 - II - Main concepts

17 Elletra’s presentation : December 2003 What is a Device ?

18 Elletra’s presentation : December 2003 TANGO: device : definition device = 1 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

19 Elletra’s presentation : December 2003 Commands Generics commands Specifics commands

20 Elletra’s presentation : December 2003 TANGO: device : interface: command Has a communication interface –interface = commands + attributes commands  actions attributes  physical units Hardware control code Interface CommandsAttributes GenericsSpecificsGenericsSpecifics Init State Status PowerOn PowerOff - current TANGO Software Bus

21 Elletra’s presentation : December 2003 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)

22 Elletra’s presentation : December 2003 Attributes

23 Elletra’s presentation : December 2003 TANGO: device : interface Has a communication interface –interface = commands + attributes commands  actions attributes  physical units Hardware control code Interface CommandsAttributes GenericsSpecificsGenericsSpecifics Init State Status PowerOn PowerOff - current TANGO Software Bus

24 Elletra’s presentation : December 2003 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 values vs actual value

25 Elletra’s presentation : December 2003 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)

26 Elletra’s presentation : December 2003 State

27 Elletra’s presentation : December 2003 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

28 Elletra’s presentation : December 2003 - Part III - High-level applications

29 Elletra’s presentation : December 2003 Configuration of the control system

30 Elletra’s presentation : December 2003 Configuration: needs Properties ens-[seg]/dom/elem.1 ens-[seg]/dom/elem.2 ens-[seg]/dom/elem.3 several of them myDevice Commands Attributes Statuses ID Unique Needs –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

31 Elletra’s presentation : December 2003 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 1 information storage medium: 1 computing database Configuration

32 Elletra’s presentation : December 2003 Jive Graphical Application for TANGO control system Configuration: tool

33 Elletra’s presentation : December 2003 Supervision

34 Elletra’s presentation : December 2003 Supervision: needs Needs –Interact with equipments directly –Have an overview of the status of each equipment –Monitor the evolution of any Device attribute DeviceTree/ATK Panel Generic applications to design and customize your graphical interfaces, displaying, for a set of equipments

35 Elletra’s presentation : December 2003 Supervision: tool –Custom Java Applications : Using TANGO ATK library which provides Java GUI widgets which manage refresh of values, errors, connexion issues

36 Elletra’s presentation : December 2003 Logging

37 Elletra’s presentation : December 2003 LogViewer Visualise, filter and analyse errors and informations, emitted in « real time » by the different Devices of the control system Logging: tool

38 Elletra’s presentation : December 2003 Archiving

39 Elletra’s presentation : December 2003 TANGO Software Bus Archiving Historical database Device Device PoweSupply : Attribut Voltage TimeStamp Valeur 22-04-2003 : 15h 23mn 12 s 236 22-04-2003 : 15h 23mn22 s 354 22-04-2003 : 15h 23mn32 s 374 22-04-2003 : 15h 23mn42 s 374 Several databases Archiving Record attributes values: –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

40 Elletra’s presentation : December 2003 Developper tool

41 Elletra’s presentation : December 2003 E2 : POGO : Code generation Define TANGO Interface a Device with a graphical tool Generate html documentation of the Device

42 Elletra’s presentation : December 2003 - Part IV - Strengths of TANGO

43 Elletra’s presentation : December 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

44 Elletra’s presentation : December 2003 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 Monochromator Device Hardware Device TANGO Control System Device PROXIMA Controls Systems

45 Elletra’s presentation : December 2003 Tango is a small and simple system : LUCIA example LUCIA = SOLEIL beamline installed at SLS Only 2 computers for the Controls System –1 CPCI crate running Tango Controls System –1 PC running java and IGOR high level applications About 10 differents kinds of Device –Motion Control DeviceServer –Slits DeviceServer –Counter/Timer DeviceServer –Analog Input DeviceServer –MultiChannel analyser DeviceServer –PicoAmmeter DeviceServer, –ScanServer DeviceServer, etc.. About 50 devices running in the Controls System Tango fits well also for these small scale systems

46 Elletra’s presentation : December 2003 An interesting upcoming feature for beamlines: A generic Scan mechanism  Aim: build a generic scan server which can  scan any number and kind of Actuators (for instance motors)  read any number and kind of Sensors (for instance counters)  in different scanning modes e.g. 1d, 2d, 3d,  Commands (abstract):  SetActuators  SetSensors  SetBeginPositions, SetScanSteps, SetStepsNumber  Scan1D  Scan2D  ReadScan  WriteScan  Algorithm :  move actuators, wait, start sensors (counters), read sensors, write data First scanning modes implemented First Version running on LUCIA With a Java GUI interface

47 Elletra’s presentation : December 2003 - Part IV - Temporary conclusion on TANGO

48 Elletra’s presentation : December 2003 Tango in one picture Device Bus Logiciel TANGO LoggingMonitoring Configuration (motor…) Hardware (E/S…) Hardware Archivage environments Utilisateurs: MATLAB, IGOR, python,Labview Device TANGO Software Bus LoggingMonitoring Configuration Hardware (E/S…) Hardware Archiving Users environments: MATLAB, IGOR, python,Labview Bindings Ready-to-use High-level Applications The bus and Devices development tools

49 Elletra’s presentation : December 2003 Tango: more links The source code is available on SourceForge –http://sourceforge.net/projects/tango-cshttp://sourceforge.net/projects/tango-cs The ESRF site reference –http://www.esrf.fr/computing/cs/tango/index.htmlhttp://www.esrf.fr/computing/cs/tango/index.html The SOLEIL site reference –http://www-controle.synchrotron-soleil.fr:8001/http://www-controle.synchrotron-soleil.fr:8001/

50 Elletra’s presentation : December 2003 - Annexes - Various Details …

51 Elletra’s presentation : December 2003 TANGO: device : interface : command TANGODescMatlab DEV_VOIDno argin and/or no argout- DEV_STATEdevice status1-by-n char array DEV_STRINGcharacters array1-by-n char array DEV_BOOLEANboolean1-by-1 uint16 array DEV_SHORTSigned 16 bits integer1-by-1 int16 array DEV_USHORTUnsigned 16 bits integer1-by-1 uint16 array DEV_LONGSigned 32 bits integer1-by-1 int32 array DEV_ULONGUnsigned 32 bits integer1-by-1 uint32 array About argin & argout types… DEV_FLOAT32 bits floating point1-by-1 single array DEV_DOUBLE64 bits floating point1-by-1 double array DEVVAR_CHARARRAYtable of bytes (i.e. characters )1-by-n char array DEVVAR_ SHORTARRAYtable of signed 16 bits integers1-by-n int16 array DEVVAR_ USHORTARRAYtable of unsigned 16 bits integers1-by-n uint16 array DEVVAR_ LONGARRAYtable of signed 32 bits integers1-by-n int32 array DEVVAR_ ULONGARRAYtable of unsigned 32 bits integers1-by-n uint32 array DEVVAR_ FLOATARRAYtable of 32 bits floating points1-by-n single array

52 Elletra’s presentation : December 2003 TANGO: device server Dev Bus Logiciel TANGO Dev TANGO Software Bus Practically, 1 executable called DeviceServer –Is in charge of « connecting » several Devices to the bus –The system can be parameterized so as to change the list of Devices, which 1 DeviceServer has to administrate Device Server DServer Device


Download ppt "Elletra’s presentation : December 2003 A quick presentation of TANGO."

Similar presentations


Ads by Google