Does the smallest task interval time need to be larger than the longest execution time?
We are experiencing task interuption warnings on all of our controllers.
I would asume that we need to set the smallest interval time (the Fast Task on our system) to be large enough to allow the longest excecution time (the Normal Task in most case) to run.
As an example on one of our controllers the Normal Task has a maximum execution time of 181ms and our Fast interval time is set to 100ms. With this setup we will always encounter interuption errors.
In this instance I assume we should set the Fast interval time to 200ms which would allow both the Normal (181ms) and Fast (10ms) tasks to run in the one interval.
Are there recommended min/max settings for the Fast task so that the accuracy of the totalizers is not degraded.
Answers
Hi,
task connections shall be multiple of the smallest task time, which you have already followed.
But the high priority tasks shall have small task time than the normal priority tasks, which is missed.
With this your task execution will not be proper.
Should be like
very fast - 50
fast - 100
fast - 150
Normal - 200
Slow - 400
very slow - 800 etc.,.
Cheers.
No, it does not NEED to be longer, but you get warnings. So everything is working as expected on your system.
The thing you are missing is task offsets. This controls when a task starts and is an important setting to prevent conflicts. You can also have more than one "normal" task running at the same interval and priority, but at a different offset. You can then spread programs onto different tasks to reduce interrupts.
Note that when you get a task interrupt, the calculated run time fir that task is increased. So if your normal task takes 100 msec to run, but is interrupted for 50 msec, then the displayed execution time is 150 msec.
Add new comment