04-11-2018 12:20 PM - edited 04-11-2018 12:22 PM
Hi. I had use "timed loop structure" when I comunicate whith device via ModbusTCP protocol. I need maintaining original frequency of poll the device. Then i have one of two "mode" settings of timed loop structure:
1. Process missed periods, maintain original phase;
2. Discard missed periods, maintain original phase.
But, second variant is slower. Why is it? In this case it can drop frames and saving time!
In my case first variant is 6 ms long, second - 13 ms.
04-12-2018 01:36 AM
04-12-2018 06:11 AM
@0Forest0 wrote:
Hi. I had use "timed loop structure" when I comunicate whith device via ModbusTCP protocol. I need maintaining original frequency of poll the device. Then i have one of two "mode" settings of timed loop structure:
1. Process missed periods, maintain original phase;
2. Discard missed periods, maintain original phase.
But, second variant is slower. Why is it? In this case it can drop frames and saving time!
In my case first variant is 6 ms long, second - 13 ms.
1) will process all iterations, 2) will potentially dismiss iterations. So 2) will have less iterations, so less throughput.
If first iteration takes 7 ms (period of 6 ms), the second period is missed. 1) will execute the second period anyway, 2) will wait for the next multiple, that will be 5 ms later.