
80
SM-Applications Modules & Motion Processors User Guide
Issue Number: 4
Tasks have different priority levels, therefore it is possible for one task to interrupt
another task. In the above table, the higher the priority number the higher the priority is.
Therefore a POS0 task can interrupt a CLOCK task which can interrupt the
BACKGROUND task.
The following simple diagram illustrates the concept of tasks interrupting each other:
Key:
1. INITIAL task has exclusive control. No other tasks can run.
2. BACKGROUND task runs after INITIAL task has completed.
3. CLOCK task interrupts BACKGROUND task. The drive controls when the CLOCK
task will execute. BACKGROUND task is suspended.
4. CLOCK task has finished and now the BACKGROUND task can continue running -
until the next clock tick occurs.
Take particular note that the CLOCK task is run on a fixed timebase (in the diagram
above it is 5ms). This means that the instructions within the CLOCK task MUST take
less than 5ms to complete otherwise the BACKGROUND task will not be able to
execute, or a processor overload trip will occur.
The following diagram shows what happens when the POS tasks are set to run as well:
INITIAL
5ms
Time
CLOCK
(5ms tick)
BACKGROUND
1 2
3
4
INITIAL
5ms
Time
CLOCK
(5ms tick)
BACKGROUND
2ms
POS0/1
(2ms tick)
Содержание Digitax ST Indexer
Страница 131: ......
Страница 132: ...0471 0062 04...