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.

Data Change event detected more than once

More
03 Dec 2013 08:20 #1586 by support
You are welcome.

A related suggestion: Calling SubscribeMonitoredItem in a loop results in multiple calls to the target OPC-UA server, which is not efficient. If you experience slow performance of this loop, use a single call to SubscribeMultipleMonitoredItems instead.

Best regards

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

More
03 Dec 2013 06:42 #1585 by yaire
My bad,
your advice did the trick.

Thank you very much,
Ya'ir.

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

More
02 Dec 2013 12:05 #1583 by support
If you are calling the code below for each monitored item, then you are adding an event handler each time. And each instance of the event handler is, in turn, called.
Change your code to add the event handler just once.
The following user(s) said Thank You: yaire

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

More
02 Dec 2013 09:25 #1581 by yaire
Hello,

When my service is listening to more than one data change, OPC UA detects too many events.
For 2 tags data change, it doubles the events.
For 3 tags data change, it triples the events.
i.e. when tags increase by 1 every 1000 ms, and scan rate set to 1000 ms.
In a 60 second period, I expect 60 events for 1 tag data change, 120 events (60 per each) for 2 tags data change, and 180 events (60 per each) for 3 tags data change.
I get 60 events for 1 tag data change (as expected), 240 events (120 per each) for 2 tags data change, and 540 events (180 per each) for 3 tags data change.

I'm using this code snippet:
m_EasyUAClient.MonitoredItemChanged +=new EventHandler<EasyUAMonitoredItemChangedEventArgs>(m_EasyUAClient_MonitoredItemChanged);
m_EasyUAClient.SubscribeMonitoredItem(
i_TransactionInfo.OpcServerUrl,
nodeId,
i_TransactionInfo.ScanRateSeconds.Value * 1000,
state);

Ya'ir.

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

Moderators: support
Time to create page: 0.056 seconds