Professional OPC
Development Tools

logos

DA-XML: SubscribeItem with percentDeadBand causes COM exception

More
18 Dec 2019 08:33 #8091 by support
Hello,

please use:
        Client.SubscribeItem(
                "http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx",
                "Dynamic/Analog Types/Double",
                new DAGroupParameters(1000, 0.01F),
                (_, args) => Console.WriteLine(args.Exception ?? args.Vtq?.Value),
                null);
Best regards
The following user(s) said Thank You: goosvanbeek

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

More
17 Dec 2019 21:13 #8090 by goosvanbeek
Hello support,

Windows 10 IOT Enterprise and Windows 10 Enterprise
QuickOPC 5.56.475.1
Visual Studio 2019
Exception: System.Runtime.InteropServices.COMException (0x800401F3): Invalid class string

I'm using code as the test example below (for years). Subscribing with the first method works well, the second one causes a COMexception. (test project attached)
This issue occurred after rebuilding my application. On every Win10 machine I test it on. I uninstalled the latest Windows security updates, without result.
Is there a solution to solve this issue?

Regards,
Goos van Beek
namespace ConsoleApp1{
    #region usings
    using System;
    using OpcLabs.BaseLib.ComInterop;
    using OpcLabs.EasyOpc.DataAccess;
    #endregion
    class Program{
        private static readonly EasyDAClient Client = new EasyDAClient();
        static void Main(){
            Client.SubscribeItem(
                "http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx", 
                "Dynamic/Analog Types/Int", 
                1000, 
                (_, args)=>Console.WriteLine(args.Vtq?.Value), 
                null);
 
            // System.Runtime.InteropServices.COMException (0x800401F3): Invalid class string
            Client.SubscribeItem(
                string.Empty, 
                "http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx", 
                "Dynamic/Analog Types/Double", 
                VarTypes.Empty, 
                1000, 
                0.01F, 
                (_, args)=>Console.WriteLine(args.Exception ?? args.Vtq?.Value),
                null);
 
            Console.ReadKey();
        }
    }
}
 [attachment=821]ConsoleApp1.zip[/attachment]
Attachments:

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

Moderators: support
Time to create page: 0.164 seconds

      

 Recommend this on Google