
6 User Program
System Manual Compact Systems
Page 36 of 110
HI 800 141 E Rev. 2.02
i
The unused execution time of user programs that were not run cannot be exploited as residual
time by other user programs. User programs are not run if they are in one of the following
states:
STOP
ERROR
TEST_MODE
As a consequence, the number of CPU cycles required to process another user program cycle
could increase.
In such a case, if the value set for
Maximum Cycle Count
is too low, the maximum time
for processing a user program can be exceeded and result in an error stop!
Maximum processing time =
Max. Duration for Each Cycle [µs]
*
Maximum Number of
Cycles
Use multitasking mode 3 to verify the parameter setting!
3.
Multitasking Mode 3
does not use the unneeded duration for running the user programs,
rather, it waits until the
Max. Duration for Each Cycle [µs]
of the user program is reached and
then starts processing the next user program. This behavior results in CPU cycles of the
same duration.
Multitasking mode 3 allows users to verify if multitasking mode 2 ensures proper program
execution, even in the worst case scenario.
The example examines user programs named
Prg 1
,
Prg 2
and
Prg 3
:
t
Prg 1
Prg 3
Prg 2
First CPU cycle considered.
Second CPU cycle considered.
Third CPU cycle considered.
Max. Duration for Each Cycle [µs]
of
Prg 1
has expired,
Prg 2
starts.
Max. Duration for Each Cycle [µs]
of
Prg 2
has expired,
Prg 3
starts.
Max. Duration for Each Cycle [µs]
of
Prg 3
has expired, completion of the first
CPU cycle.
Prg 1
is resumed.
Completion of the
Prg 1
cycle. Waiting for
the remaining duration.
Max. Duration for Each Cycle [µs]
of
Prg 1
has expired.
Prg 2
is resumed.
Completion of the
Prg 2
cycle. Waiting for
the remaining duration.
Max. Duration for Each Cycle [µs]
of
Prg 3
has expired. Completion of the
second CPU cycle.
The next user program cycle of
Prg 1
starts.
Max. Duration for Each Cycle [µs]
of
Prg 1
has expired. The next user program
cycle of
Prg 2
starts.
Max. Duration for Each Cycle [µs]
of
Prg 2
has expired.
Prg 3
is resumed.
Completion of the
Prg 3
cycle. Standby
time until the
Prg 3
Max. Duration for
Each Cycle [µs
] has expired. Completion
of the third CPU cycle.
Figure 7: Multitasking Mode 3
Содержание HIMatrix F30
Страница 102: ...12 Disposal System Manual Compact Systems Page 102 of 110 HI 800 141 E Rev 2 02...
Страница 109: ......