960 likes | 1.14k Vues
TANGO TRAINING User Session organised by SOLEIL Controls Group April 2003. Goals. Present basic concepts share a common vocabulary Understand what a TANGO interface is to get correct interfaces specifications Show current applications
E N D
TANGO TRAINING User Session organised by SOLEIL Controls Group April 2003
Goals • Present basic concepts • share a common vocabulary • Understand what a TANGO interface is • to get correct interfaces specifications • Show current applications • to show what the control system will actually be like
Audience • Users of control systems have to: • Share common concepts and vocabulary with the Computing Services. • Be trained to software tools proposed by the Control/Command group • Applications developers linked to the Control/Command Group : • Scientists, who collect, use, process data obtained by the Control/Command group • Engineers/Technicians from Equipment pools, who have to understand/monitor the behavior of their systems • Engineers from other institutes • Who wish to have a first glance at the TANGO tool developed by the ESRF/SOLEIL collaboration
Contributors • Alain Buteau • Majid Ounsy • Jean Chinkumo
Today’s Programme • Part I – what is TANGO ? • A software bus • A «computing tool» dedicated to the implementation of systems which are heterogeneous, distributed and control/command oriented • Chronology • Part II – Basic Concepts • Device • Interface • Commands • Attributes • Status • Device Server • Part III – Current high-level applications • Control system configuration • Properties • Monitoring • Logging • Archiving
- Part I - What is TANGO ?
TANGO system: Asoftware bus
A software bus • Analogy with an electronic 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
The device: a bus element TANGO software Bus interface Device HW (motor…)
Example: motor interface: MOTOR: Commands: - GoForward()… Attributes: - Speed (R/W)… Interface Hardware control code
Configuration Device And high-level modular applications Archiving Users Environments : MATLAB, IGOR, python, Labview Logging Monitoring Bindings TANGO Software Bus Device Hardware Hardware (E/S…) (motor…)
interface Device Mouse Exercise Attributes: • PositionX (R/W) • PositionY(R/W) Commands: - Center() TANGO Software Bus Hardware control code
TANGO system A «computing tool» dedicated to the implementation of distributed, heterogeneous and control systems
Control system challenge 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
Which computing tool do we need? • Distributed systems • Heterogeneous systems? • A computing tool, control/command oriented
Distributed systems • The system components are geographically distributed on machines interconnected by a computing network: • More than 100 Compact PCI frontend • More than 100 robots • Dozens of operator stations Process Management Supervision / Control : TANGO General Services: Archiving, Configuration, TANGO . ETHERNET CPCI board PLCs Profibus Profibus ETHERNET Motor board GALIL/midi engineering equipments equipments
Heterogeneous systems on hardware and software levels • Slow industrial systems: robots • Fast acquisition systems • Ready for 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?
A ctrl/command oriented computing tool • Beyond computing technologies to exchange information between systems Need for services specific to a control system (archiving, logging, warnings, …)
TANGO: introduction How does TANGO solve the constraints of activity distribution and of interoperability of the heterogeneous components?
Machine B Machine A Application 3 Application 1 L ? L Application 2 Application 4 ? L ? L SE1 SE2 TANGO: introduction
TANGO: introduction Machine B Machine A Application3 Application1 L L Application2 Application 4 L L SE1 SE2
Distributed Application TANGO: introduction
TANGO: introduction • An abstract concept: the «device» • Central element of the architecture • Tango is based on CORBA • a standard for the administration of communications between software components making up distributed and heterogeneous applications) Dev Dev Dev Dev Dev Dev TANGO software Bus Dev Dev Dev Dev Dev Dev
Device TANGO: device • 1 Device : • Is the software representative for an equipment in the control system • Represents absolutely different equipments under a common software structure Dev Dev Dev Dev Dev Dev TANGO Software Bus Dev Dev Dev Dev Dev Dev Hardware
TANGO Chronology
TANGO at the ESRF • Birth at the ESRF in 1999 • TANGO is an evolution of TACO • As a concept, TANGO is not an absolutely new system • However, TANGO and TACO are 2 source codes, which are totally disconnected • Put into production on the ESRF Machine and used for new developments • Synch. booster sextupole control, SR current transformer, vacuum equipment, fluid equipment, alarm system, image acquisition, global feedback • ID14/EH3 protein crystallography beamline
ESRF-SOLEIL Collaboration TANGO a strategical choice • First Software Development Plan defined in April 2002 • Cooperation Agreement in the Field of Control-Software for Accelerators and Beamlines: • Technical coordinators and regular meetings • Equal contributions from both parties • Intellectual properties and licensing policy (GNU) • Software plan: • Short-term developments to add essential missing features • Middle-term ones officially started the 20th of June 2002
ESRF-SOLEIL Collaboration • First realizations milestone : Q3 2002 • User environments bindings: MATLAB, IGOR , Python • Configuration tool: jive • Supervision tool : devicetree • Milestone : Q1 2003 • Historical Database • Logging services • Packaging and common source repository • Port to another CORBA layer: ORBACUS OMNIORB • Asynchronism: point-to-point communication scheme • Milestone : Q2 2003 • Events: many-to-many communication schemes • Python device servers DONE IN PROGRESS
TANGO – current Resources • ESRF • 4 (almost) fulltime programmers • 4 halftime programmers • Soleil • 3 fulltime programmers • 2 halftime programmers • We hope that other institutes will join TANGO as : • Regular users • Taking part in developments • FRM II: New German neutrons source • LLB: CEA/CNRS neutrons source • Elletra : third generation Italian Synchrotron • Others …
Tango: some more links • The source code is available on SourceForge • http://sourceforge.net/projects/tango-cs • There is still much to improve to make this distribution easily usable • The ESRF site is still a reference • http://www.esrf.fr/tango/index.html • The collaboration site SOLEIL/ESRF presents projects under development • http://www-controle.synchrotron-soleil.fr:8001/
- II - Basicconcepts
Dev Dev Dev Dev Dev Dev Application Répartie Control system O O O O O O Dev Dev Dev Dev Dev Dev O O O O O O TANGO: device • an abstract concept: the «device» • central element in the architecture
TANGO: device: definition • device = 1 <entity> to control • Hardware or software • «physical» device / «logical» device • device = 1 polymorphous object • 1 hardware (ex: 1 power supply) • 1 collection of equipment (ex: 1 motor + 1 coder) • 1 cluster of devices (ex: a beamline)
Single Identifier (SOLEIL list) TANGO: device: definition • device = 1 equipment • Most simple and standard case Interface HW Equipment Ctrl/power supply switch. Equipment Ionic pump Device BOO-B1/VI/PI55-3 SC User
phi Motor Device lambda Motor Device energy Monochromateur Device TANGO: device: definition • 1 Device is also a services provider, which • Describes services provided by a group of equipment Software Bus Theta Motor Device
Device LINAC Ou SCIENTA TANGO: device: definition • 1 Device is also a services provider, which • Describes the service provided by another system to which it is interconnected • note : this software interconnection must be made available: this possibility must be requested from suppliers TANGO Software Bus provider Control system
Commands Attributes Generics Specifics Generics Specifics Init State Status PowerOn PowerOff - current Hardware control code TANGO: device: interface • Each Device has a communication interface • interface = commands + attributes • commands actions • attributes physical units TANGO Software Bus Interface
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: genericscommand • Generics commands exist for EVERY type of Device • Their name is supposed to describe what is expected from them!! • Info: on which machine does the Device run, etc .. • Ping: tries to communicate with the Device • BlackBox: list of commands last executed on the Device • Init: reinitializes the Device • State: 1 of the 14 predefined states of TANGO: • ON, OFF, ALARM • Status: Device status in text format : • « motor has reached limit switch »
TANGO: device: interface: command • The specifics 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
TANGO: device: interface: command • About argin & argout types…
TANGO: device:interface: command • About argin & argout types…
TANGO: device: interface: command • Syntax from bindings • Prog. Env. OO (C++, Java, Python) argout = dev.command_inout (cmd_name, argin) • User Env. (Matlab, Igor Pro, …) argout = tango_command_inout (dev_name, cmd_name, argin) • Python example: >> from PyTango import * >> mouse= DeviceProxy ("px1/tdl/mouse") >> mouse.command_inout(“Center") >> mouse.command_inout(“ChangeCenter“,[10,10])