Tango Polling period for the attribute
|
|
---|---|
Hi All, First of all let me tell you that I am new to tango. I have a problem while setting the Tango polling period. Polling period is set on 1000 ms using jive(ATK paanel). So ideally attribute parameters which are connected with devices should update on every seconds. I created one GUI which uses PyQt and Taurus widget. When I execute my device server and GUI while and set 1000 ms polling period on jive, but it takes exactly 3 sec to update parameters on GUI. FYI my ATK panel is updating on every second but my GUI takes 3 sec time to updates. So is there any proper way to update GUI on every second? I am using Fedora 19, PyQt 4.11.3, Python 2.7.5, PyTango 8.1.5
Regards,
TCS_GMRT |
|
|
---|---|
Hi, The word "polling period" may refer to 2 different things. 1) the refreshing period of atkpanel. It can be configured with atkpanel using the tab Preferences->"Set refreshing period". This is the period atkpanel uses to poll the device. this period is known only in the context of atkpanel. 2) the polling period of the device server attributes. It can be configured with jive under the device leaf->Polling of the browsing tree. This is the period used by the server itself to poll it's attributes. Each attribute may have a different polling period. You can tune it with jive. Once this polling is configured, if you are using events, your GUI will receive a refresh event at this period. I hope it helps
Cheers
Jean-Michel |
|
|
---|---|
Hi again to complete my previous statement, when a device server attribute has its polling configured to 1 sec, it will automatically by default generate a periodic event each second. Then, your GUI will subscribe to it and get refreshed each second. The atkpanel refresh period is used only for refreshing the values of the attributes which are not polled in the device server. For the polled attributes, even if you change the refresh period, atkpanel will continue to receive events at the speed of the server internal polling (1 sec).
Cheers
Jean-Michel |
|
|
---|---|
Hi Jean Michel,Jean-Michel I did the same changes in jive, but still it won't reflect under GUI. I ave set 500 ms polling period. I am attaching the python file of GUI(test.py) as well as screenshot of the jive panel and polling attribute settings, So you can check that I have correctly set the polling period. Correct me if I done any thing wrong. Can you please share your mail-id so that I can mail you .rar file and you can easily find the problem. Here it is not possible to send more then 1 MB at a time. Thanks in Advance.
Regards,
TCS_GMRT |
|
|
---|---|
Hi, For me, I think you will have to set a change event propertie, relative or absolute in Jive on this device. With it set, you will have a change event sent depending on your criteria. Like Carlos Pascual noted on the taurs mailing list : Taurus handles this "intelligently" and it will only activate its own polling for a given attribute if neither Tango polling is active nor events are pushed at the server. I think since you haven't set the criteria for change event, you only get your taurus gui updating by the default 3000ms taurus polling period, because no event are sent. |
|
|
---|---|
Hi, First of all, like TCS_GMRT, I'm just working on Tango for few months. I'm developing device servers using PyTango and a GUI using Qt/Taurus. I'd like to implement the handling of change_event and I experiment the same problem as TCS_GMRT. I created a "Test" attribute (Scalar DevLong / ReadOnly) which is incremented by a Python Timer every seconds. In my GUI, I've put a label widget showing the Test value. Without doing anything else, the label is updated every three seconds. I understood that it is the default Taurus polling rate. I changed the polling settings using Jive (Polling : Polled, Period=1000ms) I changed the event settings using Jive (Event : Absolute=1, Relative=1) After DS and GUI restart, the label is updated approximately every ten seconds. If I look at the Jive Diagnostic tools, I see the polling counter changing properly but the event counters show "0". The tool reports : "Failed to narrow EventChannel from notification daemon (hint : make sure the notifd daemon is running on this host)" I tried to install and run notifyd, without any effect. I was told that Tango does not need notifyd anymore as it use zmq (Tango version 8.1.2b used, PyTango 8.1.6). Could you please tell me if I did something wrong ? Does I have to install zmq ? Thanks for your help. Best regards, Philippe VINCENT |
|
|
---|---|
Hi Philippe, Tango since its major release 8 is effectively using ZMQ for its event communication system. Therefore to have event(s) communication between client(s) and device(s), you need ZMQ library (we are actually using ZMQ release 4.0.5 even if it is not the last ZMQ release available). You do not need any notification daemon except if you need to have event communication with software using Tango release 7 and before (Which I think you do not have). Do not pay attention to messages Failed to narrow EventChannel from notification daemon (hint : make sure the notifd daemon is running on this host) It is there for compatibility with the old event system. But if you do not have ZMQ on your host, I do not really understand how it is possible to start software using Tango Cheers Emmanuel |
|
|
---|---|
Hi Philippe, like Emmanuel I do not understand how you manage to run PyTango 8.1.2 without zmq. Which operating system platform are you running on? How did you install TANGO? Andy |
|
|
---|---|
Hi Emmanuel, Hi Andy, Thanks a lot for your quick answers. I'm working on a Windows based machine (Windows 7 x64), I installed Tango with TangoSetup-8.1.2b_win32.exe and PyTango with PyTango-8.1.6.Win32-py2.7.exe. I did not say that zmq was not installed on my machine, I was just wondering if I had to install it separately. In fact I read on Tango web site that zmq was part of the Tango distribution for windows. I saw also zmq in Python27\Lib\site-packages. In this context, what is missing to have the events working from device servers to Taurus ? Best regards, Philippe |
|
|
---|---|
Hi Philippe You are right, for Windows, zmq libs are packaged in the distribution. Now, you have to check if your event system is working propertly. To do so, we are going to use the TangoTest device server (also included in the Windows distrib) plus Jive.
Is it OK in your installation Emmanuel |