| Simulink® | ![]() |

| On this page… |
|---|
Consecutive zero crossings violation Unspecified inheritability of sample time Automatic solver parameter selection |
Specify what diagnostic actions Simulink® software should take, if any, when it detects an abnormal condition with the solver.
Set the parameters displayed.
The options are typically to do nothing or to display a warning or an error message.
A warning does not terminate a simulation, but an error does.
Select the diagnostic action to take if Simulink software detects an algebraic loop while compiling the model.
Default: warning
Simulink software does not check for algebraic loops.
When Simulink software detects an algebraic loop, it displays a warning.
When Simulink software detects an algebraic loop, it terminates the simulation, displays an error message, and highlights the portion of the block diagram that comprises the loop.
An algebraic loop generally occurs when an input port with direct feedthrough is driven by the output of the same block, either directly, or by a feedback path through other blocks with direct feedthrough. An example of an algebraic loop is this simple scalar loop.

When a model contains an algebraic loop, Simulink software calls a loop solving routine at each time step. The loop solver performs iterations to determine the solution to the problem (if it can). As a result, models with algebraic loops run slower than models without them.
Use the error option to highlight algebraic loops when you simulate a model. This causes Simulink software to display an error dialog (the Diagnostics Viewer) and recolor portions of the diagram that represent the algebraic loops that it detects. Simulink software uses red to color the blocks and lines that constitute the loops. Closing the error dialog restores the diagram to its original colors.
See Algebraic Loops for more information.
| Parameter: AlgebraicLoopMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | error |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Select the diagnostic action to take if algebraic loop minimization cannot be performed for a subsystem because an input port of that subsystem has direct feedthrough.
Default: warning
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
If the port is involved in an algebraic loop, Simulink software can remove the loop only if at least one other input port in the loop lacks direct feedthrough.
Simulink software cannot minimize algebraic loops containing signals designated as test points (see Working with Test Points).
| Parameter: ArtificialAlgebraicLoopMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Select the diagnostic action to take if Simulink software detects a block priority specification error.
Default: warning
When Simulink software detects a block priority specification error, it displays a warning.
When Simulink software detects a block priority specification error, it terminates the simulation and displays an error message.
Simulink software allows you to assign update priorities to blocks. Simulink software executes the output methods of higher priority blocks before those of lower priority blocks.
Simulink software honors the block priorities that you specify only if they are consistent with the Simulink block sorting algorithm. If Simulink software is unable to honor a user specified block priority, it generates a block priority specification error.
| Parameter: BlockPriorityViolationMsg |
| Type: string |
| Value: 'warning' | 'error' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Select the diagnostic action to take if Simulink software detects that the next simulation step is smaller than the minimum step size specified for the model.
Default: warning
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
A minimum step size violation can occur if the specified error tolerance for the model requires a step size smaller than the specified minimum step size. See Min step size and Maximum order for more information.
Simulink software allows you to specify the maximum number of consecutive minimum step size violations permitted (see Number of consecutive min step size violations allowed).
| Parameter: MinStepSizeMsg |
| Type: string |
| Value: 'warning' | 'error' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Select the diagnostic action to take if Simulink software makes a minor adjustment to a sample hit time while running the model.
Default: none
Simulink software takes no action.
Simulink software displays a warning.
Simulink software might change a sample hit time if that hit time is close to the hit time for another task. If Simulink software considers the difference to be due only to numerical errors (for example, precision issues or round-off errors), it changes the sample hits of the faster task or tasks to exactly match the time of the slowest task that has that hit.
Over time, these sample hit changes might cause a discrepancy between the numerical simulation results and the actual theoretical results.
When this option is set to warning, the MATLAB® Command Window displays a warning like the following when Simulink software detects a change in the sample hit time:
Warning: Timing engine warning: Changing the hit time for ...
| Parameter: TimeAdjustmentMsg |
| Type: string |
| Value: 'none' | 'warning' |
| Default: 'none' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Select the diagnostic action to take when Simulink software detects that the number of consecutive zero crossings exceeds the specified maximum.
Default: error
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
If you select warning or error, Simulink software reports the current simulation time, the number of consecutive zero crossings counted, and the type and name of the block in which Simulink software detected the zero crossings.
For more information, see Preventing Excessive Zero Crossings.
| Parameter: MaxConsecutiveZCsMsg |
| Type: string |
| Value: 'none' | 'warning' |
| Default: 'error' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | warning or error |
Select the diagnostic action to take if this model contains S-functions that do not specify whether they preclude this model from inheriting their sample times from a parent model.
Default: warning
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
Not specifying an inheritance rule may lead to incorrect simulation results.
Simulink software checks for this condition only if the solver used to simulate this model is a fixed-step discrete solver and the periodic sample time constraint for the solver is set to ensure sample time independence
For more information, see Periodic sample time constraint.
| Parameter: UnknownTslnhSupMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Select the diagnostic action to take if Simulink software detects S-functions that have continuous sample times, but do not produce consistent results when executed multiple times.
Default: none
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
Consistency checking can cause a significant decrease in performance (up to 40%).
Consistency checking is a debugging tool that validates certain assumptions made by Simulink ODE solvers. Use this option to:
Validate your S-functions and ensure that they adhere to the same rules as Simulink built-in blocks.
Determine the cause of unexpected simulation results.
Ensure that blocks produce constant output when called with a given value of t (time).
Simulink software saves (caches) output, zero-crossing, derivative, and state values from one time step for use in the next time step. The value at the end of a time step can generally be reused at the start of the next time step. Solvers, particularly stiff solvers such as ode23s and ode15s, take advantage of this to avoid redundant calculations. While calculating the Jacobian matrix, a stiff solver can call a block's output functions many times at the same value of t.
When consistency checking is enabled, Simulink software recomputes the appropriate values and compares them to the cached values. If the values are not the same, a consistency error occurs. Simulink software compares computed values for these quantities:
Outputs
Zero crossings
Derivatives
States
| Parameter: ConsistencyChecking |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | warning |
| Traceability | No impact |
| Efficiency | none |
| Safety precaution | No impact |
Select the diagnostic action to take if Simulink software changes a solver parameter setting.
Default: warning
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
When enabled, this option notifies you if:
Simulink software changes a user-modified parameter to make it consistent with other model settings.
Simulink software automatically selects solver parameters for the model, such as FixedStepSize.
For example, if you simulate a discrete model that specifies a continuous solver, Simulink software changes the solver type to discrete and displays a warning about this change at the MATLAB command line.
| Parameter: SolverPrmCheckMsg |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | error |
Select the diagnostic action to take when a discrete signal appears to pass through a Model block to the input of a block with continuous states.
Default: error
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
This error can occur if a discrete signal passes through a Model block to the input of a block with continuous states, such as an Integrator block. In this case, Simulink software cannot determine with certainty the minimum rate at which it needs to reset the solver to solve this model accurately.
If this diagnostic is set to none or warning, Simulink software resets the solver whenever the value of the discrete signal changes. This ensures accurate simulation of the model if the discrete signal is the source of the signal entering the block with continuous states. However, if the discrete signal is not the source of the signal entering the block with continuous states, resetting the solver at the rate the discrete signal changes can lead to the solver being reset more frequently than necessary, slowing down the simulation.
If this diagnostic is set to error, Simulink software halts when compiling this model and displays an error.
| Parameter: ModelReferenceExtrNoncontSigs |
| Type: string |
| Value: 'none' | 'warning' | 'error' |
| Default: 'error' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Select the diagnostic action to take when a name is used for more than one state in the model.
Default: warning
Simulink software takes no action.
Simulink software displays a warning.
This diagnostic applies for continuous and discrete states during simulation.
This diagnostic applies only if you save states to the MATLAB workspace using the format Structure or Structure with time. If you do not save states in structure format, the state names are not used, and therefore the diagnostic will not warn you about a naming conflict.
| Parameter: StateNameClashWarn |
| Type: string |
| Value: 'none' | 'warning' |
| Default: 'warning' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
![]() | Optimization Pane | Diagnostics Pane: Sample Time | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |