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 after SubscribeEvent with server with open62541.dll

More
05 Feb 2025 16:22 #13360 by Filippi
I confirm it well working for UaExpert and Traeger .net sdk client

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

More
05 Feb 2025 16:18 #13359 by support
Hello.

The first callback is special and indicates a successful connection to the server. It is generated on the client side. So that's fine with both servers.

The error reported with one of the servers comes from the server itself. Do you know for sure that the server can generate events like this? Have you verified it with some other OPC UA client?

Best regards

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

More
05 Feb 2025 14:59 #13358 by Filippi
First CallBack

Second CallBack
Attachments:

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

More
05 Feb 2025 14:57 - 05 Feb 2025 16:14 #13357 by Filippi
public static void MainSubScription()
        {
            UAEndpointDescriptor endpointDescriptor = "opc.tcp://localhost:4840";
 
            // Instantiate the client object and hook events.
            var client = new EasyUAClient();
 
            client.EventNotification += client_EventNotification;
 
            Console.WriteLine("Subscribing...");
            client.SubscribeEvent(endpointDescriptor, UAObjectIds.Server, 1000);
 
            Console.WriteLine("Processing event notifications for 30 seconds...");
            //System.Threading.Thread.Sleep(30 * 1000);
 
            Console.WriteLine("Unsubscribing...");
            //client.UnsubscribeAllMonitoredItems();
 
            Console.WriteLine("Waiting for 5 seconds...");
            //System.Threading.Thread.Sleep(5 * 1000);
 
            Console.WriteLine("Finished.");
        }
 
        private static void client_EventNotification(object sender, EasyUAEventNotificationEventArgs e)
        {
            // Display the event.
            if (e.EventData is null)
            {
                Console.WriteLine(e.ErrorMessage);
                return;
            }
            Console.WriteLine("All fields:");
            foreach (KeyValuePair<UAAttributeField, ValueResult> pair in e.EventData.FieldResults)
            {
                UAAttributeField attributeField = pair.Key;
                ValueResult valueResult = pair.Value;
                Console.WriteLine("  {0} -> {1}", attributeField, valueResult);
            }
        }
Last edit: 05 Feb 2025 16:14 by support. Reason: formatting

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

More
05 Feb 2025 14:29 #13356 by support
Hello.

It is not clear to me what are you trying to achieve. Can you post the code that show how you subscribe?

Regards

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

More
05 Feb 2025 13:34 #13355 by Filippi
After call the Subscrition event the callback has been called 2 times:
1. With a Success Event Args
2. with this error (see also the attachment)
(OPC UA service result - {BadNodeIdUnknown}. The node id refers to a node that does not exist in the server address space.
+ The node descriptor used was: NodeId="Server".
+ The client method called (or event/callback invoked) was 'EventNotification'.)


In case of other Server OPC-UA I callback has been called 2 times:
1. With a Success Event Args
2. With a Audit Initialized

I know I'm not so detailed in my report but the situation is a little bit confusing for me ...

Thanks for any help
Attachments:

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

Moderators: support
Time to create page: 0.082 seconds