Main Content

Detect multiple driving blocks executing at the same time step

Diagnostic behavior when execution order is not defined for blocks that drive same Merge block at the same time step

Model Configuration Pane: Diagnostics / Data Validity

Description

The Detect multiple driving blocks executing at the same time step parameter specifies the diagnostic action when a model does not explicitly define the execution order for blocks that drive the same Merge block at the same time step. Connecting blocks that execute in the same time step to the same Merge block can lead to inconsistent results in simulation and in generated code unless the model explicitly defines the execution order of the driving blocks.

To explicitly define the execution order of the driving blocks, use a function-call initiator block, such as a Stateflow® Chart or a MATLAB Function block.

This diagnostic does not detect this condition in referenced models. For example, suppose a test harness model references the system under test using a Model block. This diagnostic does not detect whether model for the system under test contains a Merge block driven by multiple blocks that execute in the same time step.

Settings

error (default) | warning | none
error

The software issues an error and terminates the simulation only if the execution order of the blocks that execute in the same time step is not explicitly defined.

Use this parameter value to avoid inconsistent results in simulation and generated code.

warning

The software issues a warning when multiple blocks that drive the same Merge block execute in the same time step.

none

The software does not issue a diagnostic.

Recommended Settings

ApplicationSetting
Debuggingerror
Traceabilityerror
EfficiencyNo impact
Safety precautionerror

Programmatic Use

Parameter: MergeDetectMultiDrivingBlocksExec
Type: string | character vector
Values: 'none' | 'warning' | 'error'
Default: 'error'

Version History

Introduced in R2008b