Can UPCUA4Unity achieve PLC data synchronization well?

jinzi-unity 2 months ago in OPCUA4Unity updated by Zi Jin 1 month ago 6

Dear author, I want to buy your upcua4Unity, but I want to ask you a question. I need to collect data into Unity3d via KepServerEX's UPCUA protocol. I see OPCUAInterface and OPCUA_Node in the API. When the number of OPCUA_Nodes I need increases to 100+ or even 1000+, I can easily iterate the addresses corresponding to the PLC with low latency. Digital increment? Can you give me some better advice?


Concerning performance it all depends on the speed of signal change, if you subscribe or poll the nodes. If it is >1000 nodes you should design in your code to only sync / read or write what you need in the moment.

If threads read and write data synchronously, won't it cause a huge drop in FPS? Can it be designed to be asynchronous?

You could subscribe also for the nodes. Do you have currently performance problems?

Yes, it is a node subscription model. Whether the number of nodes is 100+ or 1000+, in a testing environment, my setup consists of CX-Programmer + kepserverEX + Unity 2022. Initially, Unity runs very stable, continually updating the debug.log data. However, at some point, for reasons unknown, it stops updating, and all data ceases to refresh. Data only updates once when the 'Read Node' is specifically clicked, without continuing to track further changes. Yet, my CX-Programmer and kepserverEX statuses appear normal~

Is there any chance that we can debug this on our computers?

Yes, I clicked on the ReadNode while it was running, which interrupted the update.

Secondly, I tested 1000+ quantities of continuous output in subscription mode. Will computer hibernation cause it to interrupt updates? When I went to do other things for about an hour, I came back and found that the subscription callback method would no longer be executed, that is, it would stop updating.