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
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
First of all, I would split the task in smaller bits:
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)
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”)
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)
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
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.
Your server is badly configured. You have created a server “test/modbus”.
You have to create a server with the following syntax: “executable_name/instance”. eg Modbus/test and then you can launch the process from the command line.
[quote=“Jean-Luc”]Your server is badly configured. You have created a server “test/modbus”.
You have to create a server with the following syntax: “executable_name/instance”. eg Modbus/test and then you can launch the process from the command line.
Modbus.exe test
[/quote]
yes, I made it correctly, of course I got problems with serialport address, but it’s a big progress for me, thank you!
Ok, What happens if you try to execute a ReadHoldingRegister command with 0,1 as input argument using Jive (right click on the modbus device node)->Test Device ?
So, Taurus tells me, I haven’t module “guiqwt”, could I create newgui with that error or no?
(as I understand, that error appears because I had installed Taurus on Python3)
Actually, guiqwt can be installed in py3. In conda, just do conda install guiqwt
Do not mistake it with “PyQwt5” which is not related. PyQwt5 is only supported in py and qt4 environments and is necessary only for the taurus.qt.qtgui.plot and taurus.qt.qtgui.qwt5 submodules which are now deprecated in favour of the taurus.qt.qtgui.tpg module provided by the taurus_pyqtgraph plugin
Finally, one suggestion: for taurus-specific questions, you will probably get more specialized support by opening an issue in GitHub · Where software is built