Open captain-yoshi opened 9 months ago
Your first bullet point is the culprit. Remove TwinCAT and ADS from your benchmark and run it on a bare TCP connection. You will see most of your Jitter is systematic to TCP/IP.
ADS is not a fieldbus and was designed for acyclic communication. ADS notifications provide the option to collect data from every PLC cycle and you will not miss a value (cmp. to polling) of your 1Khz signal. But TCP/IP (even if UDP is used) as already mentioned and the OS (UM/RT context switching) will cause a jitter, even if your ADS client and PLC runs on the same system.
For deterministic TCP communication with TwinCAT systems you can use network variables (TwinCAT 2), EAP (TwinCAT 3) or TwinCAT 3 TCP/UDP RT function.
This is similar to #215. I need to get a reliable stream of data (304 Bytes) at 1kHz using the
AdsNotification
approach. I get inconsistent timing (see timing below). This can be due to:For the benchmark below, I have reduce my Twincat program to be as fast as possible and the callback on linux does nothing.
Is there a way to have a better timing tolerance between each packets received. Could the server side use a pool of threads or something else entirely to improve this behavior ?