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.

Error when subscribing to A&E server

More
19 Aug 2020 06:53 - 19 Aug 2020 06:54 #8778 by support
Hello,

QuickOPC does not currently support COM-based OPC specifications under .NET Core. Check footnote (4) here: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...e.html#Product%20Editions.html .

Note: You are using a pre-release version of the software - please do not use them, unless instructed to do so. They are for our internal use only, are not supported and sometimes may be far from functional.

Best ragards
Last edit: 19 Aug 2020 06:54 by support.

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

More
18 Aug 2020 19:47 - 19 Aug 2020 06:48 #8777 by ScottEwine
I took a snippet of your code from the website and put it into a simple 'hello world' app to test it out. This is a console application with a .NET core 3.1 target using Visual Studio 2019. I am using QuickOPC 5.59.0-rev13. The full code is at the bottom of the post.

When I run the application I get this:

*** Failure: The requested OPC Alarms&Events technology 'Com' is not supported. Check the scheme "opcda" in server URL string "opcda:Matrikon.OPC.Simulation.1".

Note that I am trying to connect for A&E information, but it is appending "opcda:" to the beginning of the connection string that it returns. I get the same error when I use the OPCLabs event server.

using System;
using System.Diagnostics;
using System.Threading;
using OpcLabs.EasyOpc;
using OpcLabs.EasyOpc.AlarmsAndEvents;
using OpcLabs.EasyOpc.AlarmsAndEvents.OperationModel;
using OpcLabs.EasyOpc.DataAccess;
using OpcLabs.EasyOpc.OperationModel;
 
namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Main1();
        }
        public static void Main1()
        {
            using (var client = new EasyAEClient())
            {
                var eventHandler = new EasyAENotificationEventHandler(client_Notification);
                client.Notification += eventHandler;
 
                //int handle = client.SubscribeEvents("", "OPCLabs.KitEventServer.2", 1000);
                int handle = client.SubscribeEvents("", "Matrikon.OPC.Simulation.1", 1000);
 
                Console.WriteLine("Processing event notifications for 1 minute...");
                Thread.Sleep(60 * 1000);
 
                client.UnsubscribeEvents(handle);
            }
        }
 
        // Notification event handler
        static void client_Notification(object sender, EasyAENotificationEventArgs e)
        {
            if (!e.Succeeded)
            {
                Console.WriteLine("*** Failure: {0}", e.ErrorMessageBrief);
                return;
            }
            if (e.EventData != null)
                Console.WriteLine(e.EventData.Message);
        }
    }
}
Attachments:
Last edit: 19 Aug 2020 06:48 by support. Reason: code formatting

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

Moderators: support
Time to create page: 0.043 seconds