Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Correct way of handling easyUAClient.MonitoredItemChanged

More
19 Oct 2016 11:42 #4480 by support
I do not have an example at hand, but I think that using the ThreadPool.QueueUserWorkItem Method (WaitCallback, Object) for this would be easy ( msdn.microsoft.com/en-us/library/4yd16hza(v=vs.110).aspx - with an example, too).

Best regards

Please Log in or Create an account to join the conversation.

More
19 Oct 2016 06:52 #4478 by andis59
We have a program that makes a SubscribeMultipleMonitoredItems for a number (5) fields/tags with the event handler easyUAClient.MonitoredItemChanged += easyUAClient_MonitoredItemChanged;

In easyUAClient_MonitoredItemChanged, after checking that there is no exception, we check which tag that has given the event.

For each tag we save the value in a property and send the same value back to the PLC.

I found a note in one of the topics that is was not a good idea to call operations on EasyUAClient from inside an event handler. You recommend a queue that is processed in an another thread.

Would you please give an sample of how this would look like in C#.

We have all sorts of "strange" errors that maybe is caused by this...

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.051 seconds