Page 1 of 1

OpcUa_DoCom cost too much time

Posted: 14 Jun 2018, 11:33
by IceballSHooter
Hi, team

I am now using the ANSI C code to do UA communication with Siemens PLC UA Server, during the communication, i found that when i send/recv data as 1 ms cycle time that call SDK UaBase_DoCom() may takes more than 200 ms every step and cause date transfter to PLC with a great delay.

I have tried set DoCom time as 1000 ms which not works well and i wanna ask if there is any setting or method could solve the communication performance

Thanks
Best Regards

Re: OpcUa_DoCom cost too much time

Posted: 20 Sep 2018, 10:08
by Support Team
Hello IceballSHooter,

the timeout passed to UaBase_TimedDoCom is the maximum time the call will wait for socket events in the select call. Increasing this timeout can slow down the server, as the select call might take as long as the passed timeout (if no events occur at the sockets), which would delay the SDK's timers, leading to inaccurate timers and delayed reaction time of the server. This is why the timeout should be chosen to be in the few milliseconds range.

If you need the server to be more reactive, you should set a smaller timeout, in your use case setting it to 1ms might increase the performance. If that doesn't help, you should enable the trace and check it for hints about what delays the UaBase_TimedDoCom call.