User`s guide
Single- Versus Multitasking Environments
7-7
Figure 7-3: Pseudomultitasking Using Overlapped Interrupts
This diagram illustrates how overlapped interrupts are used to implement
pseudomultitasking. Note that in this case, Interrupt 0 does not return until
after Interrupts 1, 2, and 3.
Building the Program for Multitasking Execution
To use multitasking execution, select auto (the default) or multitasking as the
mode on the Solver page of the
Simulation Parameters dialog box. The Mode
pull-down menu is only active if you have selected fixed-step as the Solver
options type. Auto solver mode will result in a multitasking environment if
your model has more than two sample times or it has two different sample
times. In particular, a model with a continuous and a discrete sample time will
run in singletasking mode if the fixed-step size is equal to the discrete sample
time.
t0 t1 t2 t3 t4
Lowest Priority
Highest Priority
Interrupt 0
Begins
Interrupt 0
Ends
Interrupt 2
Ends
Interrupt 2
Begins
Interrupt 3Interrupt 1