Time gap and latency issues AC800M v6
After upgrading to v6 we sometimes get this issue with errors regarding time gaps between tasks.
Also alarms regarding latency between tasks is occuring sometimes.
Can someone explane why these errors occurs and how to fix them.
We have tried setting a different offset and the error changes to warning.
Voted best answer
The compiler is now more strict about how it verifies gaps between tasks. Its not clear from the documentation how the "rules" have changed ( in theory, the rules are the same, but now the compiler checks) , but from recent experience ...
- You must have a minumum time between the end of one task and the start of the next. Typically the compiler complains about less than one mSec.
- Tasks of equal priority cannot interrupt each other.
- Only the first execution of each task is checked. So if tasks collide later, you dont get an error
To resolve these issues ....
- Read the Error message CAREFULLY. Typically it is complaining about the minimum interval between tasks on the first execution of those tasks. Adjust the offset of the second task by a few millisec.
- Check the priority of your tasks. Dont have everything set to the same priority. If possible have each task set to a different priority.
Thanks Rob for your explanation.
I spend a lot of time in order to understand and fix those warning messages.
I have seen very often that warning messages came up and during the next compilation there was no warning anymore, even when i did not changed anything at all. So I guess there are still little bugs here in the control builder and I decided for myself not to spend too much time with it, especially when I receive messages like "time gaps between tasks". The graphical task diagram shows exactly how the task are called, execution time and so on. this is more importend for me.
It would be nice, if there is a manual who describes those error and warning messages in detail and show us how to avoid and fix them.
Anyway, there are some basic rules to follow. There exist a special Web Tech Talk by Torbjörn Ottosson (WT187 AC800M Task Tuning) which is really recommended. I you follow those rules, than you are save (almost) :)
Here is one article, which I collected for tasks issues.
As both of you found, sometimes it is not absolutelly clear how the compiler check it, but with small adjustments it will work. If I remember right, in ver. 5 there is an option in control builder to switch off task analyzes during download.