Open Nick135 opened 3 years ago
I made a simple test with an other OPC UA Client Lib and measure the time between value change and get response inside the plc. With the other lib there is no lack of 140-200ms.
@Nick135 ,
Does the issue reproduce also against the ReferenceServer of this repository? Or only with S71500 Server? Could you please provide the sample code used to test this issue?
I only test with the S71500 Server.
@AlinMoldovean I can´t test with the ReferenceServer of this repo. (UA-.NETStandard-Samples) The NetCore Console UA-Server don´t accept the certificate from UAExpert and the WinForm UA-Server works with UAExpert, but not with my console example. Problem is always the certificate. This Library is very complicated in this part.
I don´t have the delay problem with this UA-Client and S71500 Server. https://github.com/convertersystems/opc-ua-client
Checking back @Nick135 if this could be related to S7. Have you tried registered Read to improve the read perf? It is also unclear to me:
@mregen I don´t know how to do registered Read. But the normal read performance of 3-12ms is good enough.
About your Questions.
I measured the time of a read request
s0 = Stopwatch.StartNew();
var a = client.ReadVariable(nodeIdCyclic);
s0.Stop();
I subscripe to a PLC variable e.g. "NewCommand" Then I read or write a complete Struct from/to the plc with the job info. For this problem, I only read a single variable in a loop as the behavior is the same but easier to understand and reproduce.
Wireshark: Issue1397.zip
Type of Issue
Describe the Issue
First or second read request after subscribe is much slower as other requests. Also the first read request on notification is much slower.
To Reproduce Steps to reproduce the behavior:
Subscribe to node
ReadValue
Subscribe to node
ReadValue inside of the notification
Expected behavior Same performance as other requests
Log output
Environment (please complete the following information):