Tango Control System using (E): Easy Client Test Device Server

Testing Device Server

When we finished creating Device Server, often require Debug, because it is Server, you need to test whether the client to connect, Device test all the elements, command, status is normal. =When using the client, make sure that Server is launched.
There are three ways to create a client:
1.Tango the Generic Client ATKPanel
2. code debugging
3.Taurusgui debugging

ATKPanel

ATKPanel Tango is to create a universal client interface.
Open the most direct way is to find a specific ATKpanel instantiated device from Jive, double-click to open the following interface.
Here Insert Picture Description
As shown above, the current can be seen in detail Device.
state: gray box, when the color definition when OFF, and the current state is the OFF
Device name: tmp / Test / device.1
Command: Command drop-down box, you can view the defined command, if the selection and executes the corresponding command.
status: Current Status Description
Attribute: name myAttribute is, a value of 0, if this attribute has write permissions, and can start and adjust the values on the right.

Code debugging

Device to test all functions by writing a simple client-side script code is working.
The current example is to write client-side script through the python, before writing client-side script must ensure that the pytango library has been installed.
If you want to get more device information, you can check pytango API to understand.
Library source code: https://github.com/tango-controls/pytango
API documentation: https://pytango.readthedocs.io/en/latest/
sample code:
Here Insert Picture Description
If you want to write a complete client and need to learn more about the API documentation.

Taurus

Taurus is based on the QT realized that the code can call, you can generate a common template by Taurusgui.
Enter taurusgui --tango-host = IP server at the command window: Port --new-gui, create a template interface.
Here Insert Picture Description
By then starts a configuration interface, add the device to be tested or device attribut by the prompt information. Finally, remember to save the file path created good. Eventually there will be a prompt to generate exe program using the pip.
Here Insert Picture Description
To open exe generated by the command line, remember to bring the server IP and port
Here Insert Picture Description
can both see the interface was configured to debug device via the appropriate keys.
Here Insert Picture Description

TaurusAPI debugging

The following code, you can call Taurus generate a screen with a single attribute.
API documentation: http://taurus-scada.org/Here Insert Picture Description

to sum up

Is the most direct and simple debugging tool, but can only run on the server can be opened by ATKPanel.
The pytango and taurus most important thing is to prepare for full client, when you want to remotely test script code can be written by both libraries for testing.

Published 41 original articles · won praise 9 · views 2532

Guess you like

Origin blog.csdn.net/youngdianfeng/article/details/105331766