pnn - 2012-01-15

Hi,

Let's say I have a cyclic task with appended 5 programs calls, and a cycle time set to 5ms (Codesys 2.3).
No watchdog.

What happens if the cycle time is not enough, how the system behaves?
Does it execute whatever is possible in the set time frame, say programs 1-2-3-4, then on the next cycle 5-1-2-3, next 4-5-1-2 and so on? What if execution of a program is in the middle when the time frame ends - is it finished?
Or maybe it executes everything exceeding the set time, and skips the next cycle?
In other words, does the system somehow self-adjust, or stops with error?

If the system stops with error, how to avoid that and achieve max. speed?
If I have one fast task (5ms) with priority=2 and one slow task (300ms - surely enough for execution) with priority 20, what's the best way to handle this? Set fast task as freewheeling and slow as cyclic, or both as freewheeling or what? Can freewheeling high priority task make low priority (cyclic or freewheeling) tasks non-responsive ?

Thanks