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.

Refresh event behaviour different if another OPC-UA software is monitoring event

More
30 Dec 2020 07:00 #9323 by support

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

More
29 Dec 2020 15:29 #9322 by Chiara-Dea
Just a quick update... Server required the client to specify the LocationId.

Thanks again for the support!

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

More
16 Dec 2020 16:08 #9287 by support
I would start looking for the problem on the server side first. So far there is no reason to think this issue has to do with the client side.
The mere fact that some client is connected should not have influence on what other clients are able to see.

I recommend that you ask the server provider under which conditions the server can provide different or no events to the client in the way you have described. If they can explain it, you will take it from there. If they claim that the server is not doing that, the next step would be to capture the communication between the server and the client using Wireshark, and analyze it. From that, it should be possible to tell which side is "to blame".

Best regards
The following user(s) said Thank You: Chiara-Dea

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

More
16 Dec 2020 09:45 #9285 by Chiara-Dea
Hello, I've noticed a strange behaviour inside a client software I've developed, so I took a step back and made some test with a simple client console application (NET. Core on windows)

The code is the following:
// Define which server we will work with.
            UAEndpointDescriptor endpointDescriptor = url;
            endpointDescriptor.UserIdentity = UserIdentity.CreateUserNameIdentity(usr, pwd);
            endpointDescriptor.UserName = usr;
            endpointDescriptor.Password = pwd;
 
            // Hook static events
            EasyUAClient.LogEntry += EasyUAClientOnLogEntry;
 
            // Instantiate the client object and hook events
            var client = new EasyUAClient();
            Console.WriteLine("Browsing event sources");
            // Obtain event sources
            UANodeElementCollection eventSourceNodeElementCollection = client.BrowseEventSources(endpointDescriptor, UAObjectIds.Server);
 
            // Display event sources
            if (eventSourceNodeElementCollection.Count != 0)
            {
                Console.WriteLine();
                Console.WriteLine("Event sources:");
                foreach (UANodeElement eventSourceNodeElement in eventSourceNodeElementCollection)
                {
                    Console.Write("- ");
                    Console.WriteLine(eventSourceNodeElement);
                }
            }
            UANodeElement eventSource = eventSourceNodeElementCollection.First();
 
 
            client.EventNotification += client_EventNotification;
 
            Console.WriteLine("Subscribing...");
            client.SubscribeEvent(endpointDescriptor, eventSource, 1000, new UAAttributeFieldCollection 
            {
                Operands.NodeId,
                    Operands.EventId,
                    Operands.EventType,
                    Operands.SourceNode,
                    Operands.SourceName,
                    Operands.Time,
                    Operands.ReceiveTime,
                    Operands.LocalTime,
                    Operands.Message,
                    Operands.Severity,
            });
 
            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);

I have two different behaviour. In the first one, I've launched only the console application. Here's the output:
Subscribing...
[] Success
Processing event notifications for 30 seconds...
[] Success; Refresh; RefreshInitiated
[] Success; Refresh; RefreshComplete
Unsubscribing...

In the second one, I connected the server to another application (UaExpert, it's the tool I was given to compare my application output). Then I've launched my console application.
Subscribing...
[] Success
Processing event notifications for 30 seconds...
[] Success; Refresh; RefreshInitiated
[] Success; Refresh; (10 field results) [PLC] 500! "700551 | Porta 1 operatore aperta" @12/11/2020 10:30:31 PM
[] Success; Refresh; (10 field results) [PLC] 500! "700552 | Porta 2 operatore aperta" @12/11/2020 10:30:31 PM
[] Success; Refresh; (10 field results) [PLC] 500! "700553 | Porta 3 servizio aperta" @12/14/2020 9:43:46 AM
[] Success; Refresh; RefreshComplete
Unsubscribing...

There are previous active events in the refresh event (as I expected).
I think the problem lies somewhere in the configuration, but I cannot figure out where.

The big difficulty is that I cannot attach a debugger: I'm working remotely and the OPC-UA server is behind an ad-hoc network, so the testing involves the deploy on the production enviroment on a computer that can reach the server.

I've attacched the extended log of both runs.
Attachments:

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

Moderators: support
Time to create page: 0.095 seconds