How to start a Device Server?
|
|
---|---|
Hello everyone, I'm quite new in programming and a total newbie in Tango, so forgive me if my question is straightforward. My setup is: Windows 10, tango 9.3.3, PyTango 9.3.2 and Python 3.6.8. I have also installed Taurus. I have successfully installed Tango and have the TangoTest up and running. My problem is when I try to run the PowerSupply server from the PyTango documentation (https://pytango.readthedocs.io/en/stable/quicktour.html). I register the device server in Jive but I don’t know how to start the server. I try to run the “python power_supply.py test” command but there is no response. In Jive the Device Info shows this: - Device Info —————————————- No IOR found in database for test/power_supply/1 (Maybe, the device has never been exported…) Server: PowerSupply/test Exported: false last_exported: ? last_unexported: ? - Polling Status ————————————- Desc -> test/power_supply/1 Not Exported ! Reason -> TangoApi_DEVICE_NOT_EXPORTED Origin -> Connection(test/power_supply/1) Desc -> Cannot import test/power_supply/1 Reason -> TangoApi_CANNOT_IMPORT_DEVICE Origin -> Connection.build_connection(test/power_supply/1) So from my understanding, do I need an executable to be exported? And to put it in the same folder I have the TangoTest? If so, how is an executable for the device server being created? Thank you |
|
|
---|---|
Hi Evaki. The installed packages you have sound good (https://www.tango-controls.org/community/forum/c/general/development/how-to-start-a-device-server/?page=1#post-4448). 1. What is the output when you run: python power_supply.py test? 2. What is the output when you run: python -c "import tango; print(tango.utils.info())" Regards, Anton |
|
|
---|---|
Hi Anton, As I said, I am a newbie and it is only appropriate that I found what I was doing wrong after I posted my question. I just hadn't activated my venv when running the command in cmd. (Although I had tried it in VS Code too without luck). So anyways, in case it helps anybody else the answers to your questions are: 1. (.venv) C:\PythonProj\TTtest>python power_supply.py test Unknown exception while trying to fill database cache… Ready to accept request 2. PyTango 9.3.1 (9, 3, 1) PyTango compiled with: Python : 3.6.8 Tango : 9.3.3 Boost : 1.70.0 PyTango runtime is: Python : 3.6.8 Numpy : 1.19.3 Tango : 9.3.3 Boost : 0.0.0 Thank you again! |
|
|
---|---|
Okay, great! (And now you are less of a "newbie"!) |
|
|
---|---|
Hi Evaki, can you tell me which instructions you followed to install Tango + PyTango on Windows? I am trying to do the same and cannot find the instructions. Andy |
|
|
---|---|
Hi Andy, I mainly used this for Tango https://tango-controls.readthedocs.io/en/9.2.5/getting-started/installation/tango-on-windows.html I had a problem with creating/starting the db and I used this workaround https://github.com/tango-controls/TangoDatabase/issues/16 As for PyTango I first installed all the prerequisites as they appear here https://pypi.org/project/pytango/ and then followed the instructions from the pytango website https://pytango.readthedocs.io/en/stable/start.html#getting-started Hope they help you. Eva |
|
|
---|---|
Eva, thanks a lot! I will try them. Andy |