Modbus+Tango+Taurus

Hello everyone, I am a little bit noobie in Tango & very bad programmer, but I really want to figure it out
So, I have Windows 7, where I have last Tango, PyTango & Taurus versions. Also I have a simple Digital Input-Output device with Modbus RTU protocol & RS-485/usb adapter.
I want make a demonstration, where there will be leds in Taurus widget, showing the value of each I/O.
So I had started a new Devise server, I had found Modbus Device server, but when I try to start this new server I get an error (image 1). I understand, that I need to show the path to the files of Modbus Device server, but I don't know how. Also I can't understand, how link TaurusLeds in Taurus Designer with device attributes. Please help, it's really difficult without mentoring!

I think it's not my last question at this topic, please be tolerant smile
Hello,
Concerning the Modbus server, did you manage to compile it ?
no, to my shame, I don't even know what files I need to download from Modbus Device class page
You can only download the source code via SVN and you need to compile it.
As I understand, you want a serial version so you need to compile with the serialline class.
It is not an obvious task.
I compiled a Win32 executable.
You can download it from:
http://www.esrf.eu/computing/cs/tango/tango_classes/Modbus/Modbus.exe
Hi,

First of all, I would split the task in smaller bits:
  1. start a TangoTest device server and check that you can read its attributes with PyTango. You may follow the instructions in the PyTango quick tour (you may skip the "server" section for now)
  2. Check that you can access the same server with a standard taurus form e.g. by doing "taurus form sys/tg_test/1/boolean_scalar" (if you are using taurus<4.6, it is "taurusform" instead of "taurus form")
  3. Regarding Taurus Designer: note that using the taurus designer is not always needed. The easiest way to create a taurus GUI is by using "taurus newgui" ("taurusgui –new-gui" in taurus <4.6). For your demo, it seems to me that creating a taurusgui and populating it with one TaurusForm panel whose model is "sys/tg_test/1/boolean_scalar" would be enough (and this can be done without programming). The use of taurus designer should be reserved to create specific custom widgets in case the existing ones are not enough. In any case, if you insist on using the designer, the answer to your question about how to connect a led with an attribute is by calling the "setModel()" method of the led with the name of the attribute. This can be done programmatically in your .py code (recommended) or from the designer itself by setting the "model" property of the led (All Taurus widgets have this property, but I personally recommend against setting it from designer because it hardcodes the model in the .ui file and it has also been reported as a cause of unstabilities in the past)
  4. Learn how to start the modbus server and repeat steps 2 and 3 with the relevant attribute(s) instead of "sys/tg_test/1/boolean_scalar". In this I cannot help much, sorry (but I expect that doing the previous steps may give you a hint). Also have a look at the general Tango docs, and specially the how to start a DS

I hope it helps,
Cheers,

Carlos
Edited 4 weeks ago
So, I don't really understand what is "serial version" and "serialline class", is this a big omission?
So I had downloaded it and I recieved: (image 1)
The Modbus.exe is statically linked with the serialine class so you need only this file.
You need now to configure the server using Jive.
Basically you need to create 2 devices (one for the modbus itself and an other for the serialline).
I don't use Modbus using serial line on Windows so I don't know what to put inside the serialine property (/dev/ttyR31) for accessing a serial port on windows.


I wonder if COM1, COM2 still work? According to this post yes:

http://gaiger-programming.blogspot.com/2015/07/methods-collection-of-enumerating-com.html
Carlos
Check that you can access the same server with a standard taurus form e.g. by doing "taurus form sys/tg_test/1/boolean_scalar" (if you are using taurus<4.6, it is "taurusform" instead of "taurus form")
1st step – ok, without difficults
2nd step – result at pinned image
Jean-Luc
Basically you need to create 2 devices (one for the modbus itself and an other for the serialline).
I had created 2 devices, but i can't start my new device server, an error at attachment
 
Register or login to create to post a reply.