
5 Programming
HIMax System
HI 801 001 E Rev. 4.01
Page 68 of 122
In such cases, the corresponding status variables must also be forced!
5.4 Multitasking
Multitasking refers to the capability of the HIMax system to process up to 32 user programs
within the processor module.
This allows the project's sub-functions to be separated from one another. The individual
user programs can be started, stopped and loaded independently by performing a reload.
SILworX displays the states of the individual user programs on the Control Panel and
allows the user to operate them.
In a simplified overview, the processor module cycle (CPU cycle) of only one user program
is composed of the following phases:
1. Process the input data.
2. Run the user program.
3. Supply the output modules with output data.
The overview does not include special tasks that might be executed within a CPU cycle
such as reload or synchronization of processor modules.
Using multitasking, the second phase changes so that a CPU cycle runs as follows:
1. Process the input data.
2. Process all the user programs.
3. Supply the output modules with output data.
In the second phase, the HIMax can run up to 32 user programs. Two scenarios are
possible for each user program:
An entire user program cycle can be run within a single CPU cycle.
A user program cycle requires multiple CPU cycles to be completed.
These two scenarios are even possible if only
one
user program exists.
It is not possible to exchange global data between user programs within a single CPU
cycle. Data written by a user program is made available immediately before phase 3, but
after the user program execution has been completed. This data can thus first be used as
input values at the next start of another user program.
The example in Figure 122 shows both scenarios in a project containing two user
programs.
Содержание HIMax
Страница 1: ...SYSTEM HIMax System Manual...