Main Content

Treat each discrete rate as a separate task

Option to enable multitasking execution

Model Configuration Pane: Solver


Specify whether the software executes blocks with periodic sample times individually or in groups.

To use this parameter, clear the Use local solver when referencing model parameter.

A model with multiple tasks cannot reference a multirate model that uses single tasking mode.


To enable this parameter, set the solver Type to Fixed-step.


off (default) | on

All blocks are processed through each stage of simulation together (for example, calculating output and updating discrete states). Use single-tasking execution if:

  • Your model contains one sample time.

  • Your model contains a continuous and a discrete sample time, and the fixed step size is equal to the discrete sample time.


Groups of blocks with the same execution priority are processed through each stage of simulation based on task priority. The multitasking mode helps to create valid models of real-world multitasking systems, where sections of your model represent independent tasks.


Use the Single task data transfer and Multitask data transfer parameters to control the diagnostic behavior for sample rate transitions between blocks that have different sample times.

Recommended Settings

The table summarizes recommended values for this parameter based on considerations related to code generation.

DebuggingNo impact

No impact for simulation or during development

Off for production code generation

EfficiencyNo impact
Safety precaution

No recommendation

Programmatic Use

Parameter: EnableMultiTasking
Type: string | character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2016b