Detect multiple driving blocks executing at the same time step
Description
Select the diagnostic action to take when the software detects a Merge block with more than one driving block executing at the same time step.
Category: Diagnostics
Settings
Default:
error
none
Simulink® software takes no action.
warning
Simulink software displays a warning.
error
Simulink terminates the simulation and displays an error message only if the execution order of the driving blocks is not explicitly defined.
Tips
Connecting the inputs of a Merge block to multiple driving blocks that execute at the same time step can lead to inconsistent results for both simulation and generated code. Set Detect multiple driving blocks executing at the same time step to
error
to avoid such situations.This diagnostic action does not cross into referenced models. For example, a test harness does not detect when the model under test contains a Merge block with more than one driving block executing at the same time step. The model under test is referenced by a Model block in the test harness.
This diagnostic does not apply when one function-call initiator block, such as a Stateflow® Chart or MATLAB Function block, determines the execution order of the driving blocks that connect to the Merge block. In this case, the Merge block results are consistent despite having multiple driving blocks that execute at the same time step.
Command-Line Information
Parameter:
MergeDetectMultiDrivingBlocksExec |
Value:
'none' | 'warning' |
'error' |
Default:
'error' |
Recommended Settings
Application | Setting |
---|---|
Debugging | error |
Traceability | error |
Efficiency | No impact |
Safety precaution | error |