Download presentation
Presentation is loading. Please wait.
Published byLouise Foster Modified over 9 years ago
1
Tango workshop : ICALEPS / October 2005 TANGO main concepts
2
Tango workshop : ICALEPS / October 2005 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
Tango workshop : ICALEPS / October 2005 - I - Challenges for a modern Control System
4
Tango workshop : ICALEPS / October 2005 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
Tango workshop : ICALEPS / October 2005 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
Tango workshop : ICALEPS / October 2005 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
Tango workshop : ICALEPS / October 2005 Problem 1 :communication Host A OS 1 Application 1 Application 2 LL LL Host B Application 4 LL Application 3 LL OS 2 ? ? Ethernet - TCP/IP network ?
8
Tango workshop : ICALEPS / October 2005 Host A Application 1 Application 2 Host B Application 3 Application 4 LL LL LL LL OS 1 OS 2 Problem 2 : Working with objects at network layer
9
Tango workshop : ICALEPS / October 2005 Distributed Application Problem 3: a whole homogeneous and coherent
10
Tango workshop : ICALEPS / October 2005 CORBA ( Common Object Request Broker Architecture ) A software bus of objects
11
Tango workshop : ICALEPS / October 2005 CORBA limitations CORBA = 1 generic tool support to the development of distributed applications A powerful but cumbersome tool No functionalities «Control oriented» Control System CORBA
12
Tango workshop : ICALEPS / October 2005 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 CORBA Framework Control System TANGO CORBA
13
Tango workshop : ICALEPS / October 2005 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
14
Tango workshop : ICALEPS / October 2005 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
15
Tango workshop : ICALEPS / October 2005 The overall picture Servers side Client side
16
Tango workshop : ICALEPS / October 2005 - II - Main concepts
17
Tango workshop : ICALEPS / October 2005 What is a Device ?
18
Tango workshop : ICALEPS / October 2005 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
Tango workshop : ICALEPS / October 2005 Commands Generics commands Specifics commands
20
Tango workshop : ICALEPS / October 2005 TANGO: device : interface: command Has a communication interface –interface = commands + attributes commands actions attributes physical units Hardware control code Interface CommandsAttributes GenericSpecificGenericSpecific Init State Status PowerOn PowerOff - current TANGO Software Bus
21
Tango workshop : ICALEPS / October 2005 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 workshop : ICALEPS / October 2005 TANGO: device : interface : command Signed 32 bits integer Unsigned 32 bits integer Unsigned 16 bits integer Signed 16 bits integer boolean characters array device status no argin and/or no argout About argin & argout types… table of unsigned 32 bits integers table of 32 bits floating points table of signed 32 bits integers table of unsigned 16 bits integers table of signed 16 bits integers table of bytes (i.e. characters ) 64 bits floating point 32 bits floating point DEV_LONG DEV_ULONG DEV_USHORT DEV_SHORT DEV_BOOLEAN DEV_STRING DEV_STATE DEV_VOID TANGO DEVVAR_ ULONGARRAY DEVVAR_ FLOATARRAY DEVVAR_ LONGARRAY DEVVAR_ USHORTARRAY DEVVAR_ SHORTARRAY DEVVAR_CHARARRAY DEV_DOUBLE DEV_FLOAT Description
23
Tango workshop : ICALEPS / October 2005 Attributes
24
Tango workshop : ICALEPS / October 2005 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
25
Tango workshop : ICALEPS / October 2005 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 values vs actual value
26
Tango workshop : ICALEPS / October 2005 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
Tango workshop : ICALEPS / October 2005 State/status
28
Tango workshop : ICALEPS / October 2005 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 workshop : ICALEPS / October 2005 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
Tango workshop : ICALEPS / October 2005 Configuration of the control system through “Properties”
31
Tango workshop : ICALEPS / October 2005 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
Tango workshop : ICALEPS / October 2005 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 1 information storage medium: 1 computing database Configuration
33
Tango workshop : ICALEPS / October 2005 An invisible but mandatory Device : The “DeviceServer”
34
Tango workshop : ICALEPS / October 2005 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
35
Tango workshop : ICALEPS / October 2005 - III - Short summary
36
Tango workshop : ICALEPS / October 2005 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()
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.