Tango on an embedded system

Hello,
I never used TANGO controls before and I have to develop an embedded application with a TCP/IP stack, which is fully compatible with TANGO.
The embedded system is based on LPC1768 from NXP and I use the C language. I am able to develop on it but I don't know how the information must be exchanged.
I read some parts of the tango.pdf and the ppts available on this website. I understood TANGO is object oriented but I still don't understand the link between tango and my system.

Someone can help me please? smile

Thank you.
I will try to explain my vision of your problem:

You want to access data from your embedded system in order to show them in a Tango Control System.

So from the Tango point of view, your embedded system will just be another "Device" in the system, like a motor, thermocouple or anything else.

You have to use TCP/IP for communicating with yout system, and that's not a problem at all. For Tango, it's just a device.

What you need is writing a device server which communicates with your system and which has some commands and attributes. Example, if you want to monitor the temperatur of your system, you will have a Temperature attributes. If you want to do a reset, implement a reset command. Just use Pogo to define your interfaces, and fill the blank.

This guidelines can help you too :

http://www-controle.synchrotron-soleil.fr:8001/docs/TangoGuidelines/TangoDesignGuidelines-GB4-3.pdf
Edited 9 years ago
Thank you for the pdf it should be helpful.

For your example, how tango could know the temperature attributes is coming from my device server? is there an adresse?

Pogo is helpful too but it generate C++, Python or java code but in my case I work with C.
For accessing an attribute on the bus, you must know its address, which looks like tango/test/my_device_test/my_attribute.

When you have declared a device server and the associated devices, you have defined unique names, so normally, we know where we are reading the temperature.

On your second question, I think you want to directly have a Tango device server running on your board, but I'm not sure if your card is compatible. There have been some test with BeagleBone card, or libera.

The C binding is here http://www.tango-controls.org/downloads/bindings/ but lack some functions.

I haven't used it so no advice on this part.

Maybe the simpliest way is to have a simple Socket Server on your card and an socket client as device server. You will just have to define the tokens for the communication.
For accessing the temperature attributes which software I should used? is it JIVE?

In my board, I can run a webserver but I don't know if a Tango server is possible.

I'm reading the c_binding source code but I am not sure this is necessary.

Sorry about all my question, I need to understand.

In fact, when you use Jive and do right click on a device you can choose multiple options.
"Monitor device" and "Test Device" create generic Tango client.
With thess clients you can read/write your attribute and execute commands.

But you can also :
- use the Tango client API in C++, Java or Python.
- use QTango (C++), ATKWidgets (Java) or Taurus (Python) to create a simple GUI with the available widgets.
- use one of the binding (Labview, matlab, igor Pro, panorama) to access your data.

For your board, if it has already a WebServer allowing you to read your data, maybe the solution is to communicate with this webserver inside your device server.
In my mind, reading the data from my webserver is a good idea.
But to be fully compatible with tango is it possible to read data from a webserver with tango tools?
With Tango, everything is possible smile

See the Tango API like a Layer, so you do your communictaion with your webserver, and then use this in your device server.

First, find a way to communicate with your webserver in the language you are familiar with (C++, python, java), you can design a class that is doing this purpose
Second, define your Tango interface with Pogo and fill the blank using the class you just created.
In my case, I don't have to do the TANGO API but my embedded system has to be compatible with Tango.
But to be sure I would like to develop one and test it.

To resume :
I have an eval board (MCB1700) from keil. I used uvision 5 to develop on it in C.
This board is connected to my laptop with an ethernet link.
This board has an IP and I have a webpage in my screen.
So I can change/send a string with this webpage.
With our example we can assume that this string is the temperature.

Sorry, I still don't understand what I am supposed to do with Tango at this step. :/



From my point of view you can have two approaches to have your board Tango compatible. I prefer to call it board to avoid confusion with Tango device:
  • Include Tango core in the image you will flash to the board. (In the esrf, Andy did something with Gumstix). Also the device server that controls whatever your board is doing shall be also included in the image.
  • Support in the board some [industrial] protocol (like scpi, modbus, among others).
Both options are not exclusive.

With the first the Tango device server can be launched inside the board (together with other tango services like the Starter, being one extra host in your tango system).

The second option will allow you to have a device server running in any another machine controlling it by the protocol you chose.

Perhaps the better (but the harder) is to do both then your device server can run in or out of your board.
 
Register or login to create to post a reply.