Professional OPC
Development Tools

logos

× If you are developing in .NET, but are using the OPC-UA (OPC Unified Architecture), please post in the QuickOPC-UA category instead.

Upgrading 5.23 to 2016.2 Deprecated Item handle

More
29 Jun 2017 18:07 #5301 by support

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

More
29 Jun 2017 17:59 - 29 Jun 2017 18:06 #5299 by Damian999
We are trying to upgrade our OPC comms layer from QuickOPC v5.23 to v 2016.2

We are getting compile errors with this line var subscribedItem = e.Handle; (see snippet below)

Complile Error "'EasyDAItemChangedEventArgs' does not contain a definition for 'Handle' and no extension method 'Handle' accepting a first argument of type 'EasyDAItemChangedEventArgs' could be found (are you missing a using directive or an assembly reference?)"

When we subscribe to an OPC tag using the SubscribeItem method we get back a unique integer that identifies this subscription.

We want to use the subscription identifier in the TagValueChangedCallback method. How can we access this identifier if e.Handle method is now obsolete?

private void TagValueChangedCallback(object sender, EasyDAItemChangedEventArgs e)
    {
        Debug.WriteLine(e.ToString());
 
        TagValueChangedCallback tagValueChangedCallback = null;
 
        try
        {
 
            var subscribedItem = [b]e.Handle;[/b]
            tagValueChangedCallback = _callbacks[subscribedItem];
        }
        catch (KeyNotFoundException)
        {
        }
Thanks
Damian
Last edit: 29 Jun 2017 18:06 by support.

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

Moderators: support
Time to create page: 0.351 seconds

      

 Recommend this on Google