Main Content

Allow multiple tasks to access inputs and outputs

Option to treat root-level input and output ports as part of each connected task in rate-based model

Since R2021b

Model Configuration Pane: Solver


When root-level input or output ports in the top model or a model reference connect to multiple tasks with different sample times, use this parameter to determine how the software combines the task sample times to provide data to each task.

This parameter does not apply for export-function models.


off (default) | on

When multiple tasks access data for root-level input and output ports, the software uses the greatest common denominator sample time that has an implicit task.


The software assigns root-level input and output ports connected to multiple tasks a union sample time that includes each task sample time.

Recommended Settings

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

DebuggingNo impact
TraceabilityNo impact
Safety precautionNo recommendation

Programmatic Use

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

Version History

Introduced in R2021b