-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use subscriptions for data changes #63
Comments
Hi, this is a good idea. I have looked at it lately in another context, i think it should be possible. The group reading stuff would need some love (aka refactoring) since it is mostly untouched from since the old openopc library. Would you like to giv e it a try and create a pullrequest? |
I am using group read successfully, reading 18000 items each 10 seconds without issues. Correct me if I'm wrong, the steps would be:
Edit: I'm Justino, was logged with the company user in the phone. |
It didn't work as i expected. I think the queue is just to wait for one new value inside a read request call. I don't understand what the update parameter means, as changing it does nothing in my tests. Also if I don't explicitly ask for device values the server always return cached values. |
I think it is not implemented as you expect. But OPC DA supports event based update of groups via a subscription to a group object. Check out the OpcDa Specificaition of the OPC Foundation, and the fine graybox_opc_automation_wrapper.py helps you as well. But if you don't want to invest that much time, i go quite good results with normal group reading and polling. |
I wanted to follow up and ask if there have been any advancements or updates regarding the subscription model implementation. |
We did not plan to work on this issue. But every contribution (Pull request) is welcome. When you create a group and read this synchronously you can easily read more than 10 times a second... Most OPC DA applications (I know) don't have a higher update rate than 100ms. Then you can do the change detection in your application. Please write down what you want to achieve and provide a code example that works with the matricon simulation server. Try to write it as precisely as possible. |
Does self.callback_queue = Queue() member of the client class work? Would it be possible to use it for automatic enqueuing of changing data of some group? Would it be possible to use use through the gateway?
Thank you!
The text was updated successfully, but these errors were encountered: