System philosophy
HARDWARE REFERENCE MANUAL
35
Revision 5.0
In each of the three CPU slots (1, 2 and 4) the type (High or Low priority
BASIC programs or PLC) is executed which comes first in the list. Only
processes of that type will then be executed in that slot. Processes of the
same type will be executed alternately.
2.6.4
Multi-tasking examples
fig. 25
In the example 1, there are two high-priority processes (20 and 21) and
3 low-priority processes (0, 1 and 2). The first slot will execute low-priority
processes (first in the list). The second and fourth slots will execute the high-
priority processes. In this example the high-priority processes are executed
every cycle. The low-priority processes are executed once every 3 cycles.
Therefore the high-priority processes run 3 times faster than the low-priority
processes.
In the middle example, there is only one high-priority process (21). The high-
priority process now runs twice every cycle and therefore runs 6 times faster
than the low-priority processes.
In the lower example, there are no high-priority processes. Therefore, all
slots can be used for the low-priority processes. All 3 processes get (in
average) the same number of slots per cycle and therefore run with the
same speed.
CPU slot 4
Execute whichever comes first in the list:
•
High priority BASIC Program, or
•
PLC, or
•
Low priority BASIC Program
CPU slot
Operation
2
1
21
20
2
SYS
1ms
1ms
1ms
1ms
21
20
1
SYS
21
20
0
SYS
21
20
2
SYS
21
21
2
SYS
1ms
1ms
1ms
1ms
21
21
1
SYS
21
21
0
SYS
21
21
2
SYS