Your comments

Hi,

Thank you for your answer, but I am afraid that information is not helping me (or maybe I don't know how to use it to solve the problem).

I have been digging into the problem and, using Wireshark, I have been capable of watching the network data frames. One thing that I have discovered is this: When a value is missing, Unity receives, not a value, but a couple of them using a two elements array. More specifically, our OPC UA Server is updating the values each 100 milliseconds and, when a value is missing, the OPC UA server has sent, not one value, but two values. I don't know the reason but I venture to speculate that between the previous request and the new one, the OPC UA server has accumulated them.

Theoretically that is not a problem, because there is a queue for that purpose and, indeed, the function "OnSubsriptionValueChanged()" can "open" the array and extract both values. However, when the funcion "FixedUpdate()" is called, only the most recent value of the array is used. The other value is missing.

Any idea about this? Do you know whether this may be the origin of the problem?

Best.

Hi,


We have tested the last version. As a consequence of that, we have verified that the OPCUA server's values readings are right, without any data loss inside the function known as OnValueChanged() (OPCUA node). However, inside the function update(), where we make the joint rotation, we have detected that, sometimes, some values are missed / skipped.



This is a debug example extracted from the Unity console (we have used a local OPCUA simulator to avoid latency problems, as well as we have used 100 milliseconds as update time for the OPC UA variables):


OnValueChanged reads 17

Update reads 17 ( 18 times)


OnValueChanged reads 18

OnValueChanged reads 19

Update reads 19 (14 times)


What we have observed is that, despite the fact that the function update() is much faster that the 100 ms (10 Hz) used by the OPC UA simulator, sometimes some values are missed/skipped. Indeed, the function update() reads several times the same value, which proves that it is running very fast.


What may be the reason for this behaviour?


We have followed the examples provided by you to make the rotations, but we are still missing some values inside the funcion update().


Is there any time limit (in milliseconds) for the OPCUA simulation? Any threshold that we have to follow to avoid missing values?


We have also tested the same scenario using 300 milliseconds as a refresh rate in the OPC UA simulator, and we haven,' missed any value.

Best.

    I have the following error:

    Image 932

    Any idea about what is missing?

    Could you share your project? I want to test it on my setup, I am using virtual machines and I want to be sure there is no issue with that... And which version of the library are you using? Can you share it too?

    It happens always, with only one or many

    Correct, our problem is the following:

    We are trying to use the recommended subscription method to get the values of 6 robot axis. In NodeControl.cs you can see that we are using Start(), OnConnected(), NodeChanged() and Update() methods as described in the documentation, but we never see NodeValue in NodeChanged() change. However, the interfaces and subscriptions seem to be working according to debug messages, and the values are being received at OPCUA_Interface.cs by the method OnSubsriptionValueChanged(). So it appears that the library is working, but we can not get the values using the recommended method.

    Previously we tried using the "Not recommended method", polling the values constantly and it works... But the scalability was an issue when we tried to include more than one data source.

    Some more details:

    - On Start() we can see that the interface is launched. We are subscribing 6 values, debug lines:

    Image 927

    - On OnConnected() we can see the subscription is done, but always for the same ClientHandle (is that correct?):

    Image 928

    No relevant errors are shown, and the values are being received properly at method OnSubscriptionValueChanged() at OPCUA_Interface.cs .

    Is this number? I can not find this InvoicID... 

    Your order number: CPM38993/2021

    Ok, let me know if I can help. Just one comment, in UaExpert the address is defined in a single URL input box and it is working fine. Maybe is worthy to consider this aproach instead of using two separate fields for server IP and port.

    Thanks!

    You mean that you want remote access to test it? I can provide you temporary access through Teamviewer, but we need to be coordinated since the OPC UA server on the robotic controller is blocked every 2 hours and needs to be manually restarted.