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.

Difference between "SubscribeDataChange" and "SubscribeMonitoredItem" ?

More
06 Oct 2020 15:59 #8981 by support
"Significant change" is normally any change in the value or status, but can be explicitly defined by the data change filter (in monitoring parameters) - with the filter, you can e.g. that the significant change is only over a certain percentual or absolute deadband, or that it must include each timestamp change (even if the value itself has not changed).

The documentation should probably be more consistent - the two methods are the same in this respect.

OPC UA has one underlying mechanism for subscriptions, and the mechanism is further differentiated by the arguments used and the types of notifications generated. The general subscription mechanism refers to "monitored items", and in the current OPC UA version, the monitored item can represent two types of subscriptions: a subscription to either data changes, or events. The distinction is made by the type of filter specified with the subscription (in its monitoring parameters): It is either a data change filter, or an event filter. Depending on which type of subscription (filter) the monitored item uses, either data change notifications, or event notifications, are generated by the subscription.

Subscription methods that have "MonitoredItem" in their name are the most general ones. They allow you to create either data change or event subscriptions, depending on the data you pass in.

Subscription methods that have "DataChange" in their name are designed to create data change subscriptions only. Because of this specialization, they can have simplified set of arguments that makes most sense with data change subscriptions. These methods, however, do not do anything new as far as OPC UA subscriptions go: They just call the SubscribeMultipleMonitoredItems method internally, creating the generalized input arguments for it as needed.

Subscription methods that have "Event" in their name are designed to create event subscriptions only. Because of this specialization, they can have simplified set of arguments that makes most sense with event subscriptions. These methods, however, also do not do anything new as far as OPC UA subscriptions go: They just call the SubscribeMultipleMonitoredItems method internally, creating the generalized input arguments for it as needed.

You can use the more specialized methods if they provide the functionality you need, and give shorter code. In some cases, the more advanced functionality might be missing from the specialized methods, and in that case you should use the generalized methods and assemble the input arguments yourself.

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

More
06 Oct 2020 12:58 #8975 by Dan
Both methods seem to do the same but in the documentation SubscribeMonitoredItem has the addition of "For each significant monitored item change". SubscribeDataChange does not have this addition. Does that mean SubscribeDataChange fires more often than SubscribeMonitoredItem? What does significant change mean?

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

Moderators: support
Time to create page: 0.044 seconds