1 / 36

TANGO main concepts

TANGO main concepts. Agenda. How Tango faces the main challenges for a modern Control System Distribution, heterogeneity, O-O paradigm How Tango faces these challenges Tango : main concepts Tango : a software bus Device Commands Attributes Properties and configuration A short summary.

makan
Download Presentation

TANGO main concepts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TANGO main concepts

  2. Agenda • How Tango faces the main challenges for a modern Control System • Distribution, heterogeneity, O-O paradigm • How Tango faces these challenges • Tango : main concepts • Tango : a software bus • Device • Commands • Attributes • Properties and configuration • A short summary

  3. - I - Challenges for a modern Control System

  4. Distributed systems • The control system components are geographically distributed on different machines interconnected by a computing network: • CPCI ,VME, industrial PC, PC • PLC • Ethernet devices • servers • Problem 1 : How to make all these systems communicate ?

  5. Object Oriented Paradigm • Object oriented approach is now commonly recognized as the best methodology for software construction • « A control system is a sea of networked objects ; every part of the control system should be a network object whether it is a low-level, high-level or application-oriented function » • Problem 2 : How to get such objects on a network level ?

  6. 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, electron analyzers, detectors, CCD …) • Heterogeneous operating systems • Scientific applications under WIN32/Linux/Solaris/HPUX • Drivers/libraries under WIN32 (or under Linux !) • Problem 3 : How to obtain a coherent whole from such heterogeneous hardware and software?

  7. Host B Host A Application 3 Application 1 L ? L Application 2 Application 4 ? L L OS1 OS2 Problem 1 :communication ? Ethernet - TCP/IP network

  8. Problem 2 : Working with objects at network layer Host B Host A Application3 Application1 L L Application2 Application 4 L L OS1 OS2

  9. Distributed Application Problem 3: a whole homogeneous and coherent

  10. CORBA (Common Object Request Broker Architecture) A software bus of objects

  11. Control System CORBA CORBA limitations • CORBA = 1 generic tool • support to the development of distributed applications • A powerful but cumbersome tool • No functionalities «Control oriented»

  12. Control System Framework CORBA TANGO : introduction • a framework CORBA ctrl/cmd oriented • A toolbox to implement the system • A specialization of CORBA adapted to the Control needs and challenges TANGO CORBA CORBA

  13. 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

  14. 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

  15. The overall picture Client side Servers side

  16. - II - Mainconcepts

  17. What is a Device ?

  18. TANGO: device: definition • Historically a device is an entity to control • Hardware or software • 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 e.g : • A scan device • A data fitter device But have in mind that a device is a real and good « Software Component » which respects O-O paradigm (encaspulation, reusability, ..)

  19. Commands • Generics commands • Specifics commands

  20. Commands Attributes Generic Specific Generic Specific 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

  21. 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 • Command are started from any client always in the same way : • call the command_inout method on the Device with the following arguments : • command name • In parameter of the command • Output: • result of command execution • Exemple from Python : >> my_motor_device.command_inout(“AxisBackward") >> my_motor_device.command_inout(“GoToPosition“,100)

  22. TANGO: device: interface: command TANGO Description • About argin & argout types… DEV_VOID no argin and/or no argout DEV_STATE device status DEV_STRING characters array DEV_BOOLEAN boolean DEV_SHORT Signed 16 bits integer DEV_USHORT Unsigned 16 bits integer DEV_LONG Signed 32 bits integer DEV_ULONG Unsigned 32 bits integer DEV_FLOAT 32 bits floating point DEV_DOUBLE 64 bits floating point DEVVAR_CHARARRAY table of bytes (i.e. characters ) DEVVAR_ SHORTARRAY table of signed 16 bits integers DEVVAR_ USHORTARRAY table of unsigned 16 bits integers DEVVAR_ LONGARRAY table of signed 32 bits integers DEVVAR_ ULONGARRAY table of unsigned 32 bits integers DEVVAR_ FLOATARRAY table of 32 bits floating points

  23. Attributes

  24. 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

  25. 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 access • set valuesvs actual value

  26. TANGO: device: interface: attribute • Obtain/modify the current value of an attribute from any client ? • Prog. Env. OO (C++, Java, Python) • dev.read_attribute(s) (attr_name_list) • dev.write_attribute(s) (attr_name_list) • Python Example: >> x = my_motor_device.read_attribute (”position") >> print x.value >> x.value=100 >> my_motor_device.write_attribute (x)

  27. State/status

  28. 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

  29. TANGO: device: status • How to be more precise than one of these 14 predefined states ? • To inform operator of an abnormal condition • To give the expert a detailed diagnostic • Or to say that everything is OK • Use the status information • which is a free text field • which must be managed by the device developper • “ Motor has reached backward limit switch” • “Power unit is in default ( internal driver error 435-ER)” • “Ready to move”

  30. Configuration of the control system through “Properties”

  31. Configuration: needs • How to Define devices present in the Control system • How to set devices parameters • Parameters linked to the Hardware (GPIB address, etc.. ) • Min and max attributes values • Alarm thresholds, etc .. • “Tango Properties” are the configuration parameters

  32. Configuration: static database • 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

  33. An invisible but mandatory Device : The “DeviceServer”

  34. Device Device Device TANGO: device server • 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 TANGO Software Bus Bus Logiciel TANGO Dev Dev Dev Dev Dev Dev DServer Device Server

  35. - III - Short summary

  36. A tango Device is a networked object • All Devices share the same Interface for clients applications Device State Status read_attribute(s) write_attribute(s) command_inout()

More Related