Real-Time Workshop User's Guide |
 |
Executing Multitasking Models
In cases where the continuous part of a model executes at a rate that is different from the discrete part, or a model has blocks with different sample rates, the code assigns each block a task identifier (tid
) to associate it with the task that executes at its sample rate.
Certain restrictions apply to the sample rates that you can use:
- The sample rate of any block must be an integer multiple of the base (i.e., the fastest) sample rate. The base sample rate is determined by the fixed step size specified on the Solver page of the Simulation parameters dialog box (if a model has continuous blocks) or by the fastest sample time specified in the model (if the model is purely discrete). Continuous blocks always execute via an integration algorithm that runs at the base sample rate.
- The continuous and discrete parts of the model can execute at different rates only if the discrete part is executed at the same or a slower rate than the continuous part (and is an integer multiple of the base sample rate).
| Single- Versus Multitasking Environments | | Multitasking and Pseudomultitasking |  |