Using Simulink     Search    Help Desk 

The Diagnostics Page

You can indicate the desired action for many types of events or conditions that can be encountered during a simulation by selecting the Diagnostics tab on the Simulation Parameters dialog box. This dialog box appears:


For each event type, you can choose whether you want no message, a warning message, or an error message. A warning message does not terminate a simulation, but an error message does.

Consistency Checking

Consistency checking is a debugging tool that validates certain assumptions made by Simulink's ODE solvers. Its main use is to make sure that S-functions adhere to the same rules as Simulink built-in blocks. Because consistency checking results in a significant decrease in performance (up to 40%), it should generally be set to off. Use consistency checking to validate your S-functions and to help you determine the cause of unexpected simulation results.

To perform efficient integration, Simulink saves (caches) certain values from one time step for use in the next time step. For example, the derivatives at the end of a time step can generally be reused at the start of the next time step. The solvers take advantage of this to avoid redundant derivative calculations.

Another purpose of consistency checking is to ensure that blocks produce constant output when called with a given value of t (time). This is important for the stiff solvers (ode23s and ode15s) because, while calculating the Jacobian, the block's output functions may be called many times at the same value of t.

When consistency checking is enabled, Simulink recomputes the appropriate values and compares them to the cached values. If the values are not the same, a consistency error occurs. Simulink compares computed values for these quantities:

Disabling Zero Crossing Detection

You can disable zero crossing detection for a simulation. For a model that has zero crossings, disabling the detection of zero crossings may speed up the simulation but might have an adverse effect on the accuracy of simulation results.

This option disables zero crossing detection for those blocks that have intrinsic zero crossing detection. It does not disable zero crossing detection for the Hit Crossing block.

Disable optimized I/O storage

Checking this option causes Simulink to allocate a separate memory buffer for each block's I/O values instead of reusing memory buffers. This can substantially increase the amount of memory required to simulate large models. So you should select this option only when you need to debug a model. In particular, you should disable buffer reuse if you need to:

Relax boolean type checking (2.x compatible)

Checking this option causes blocks that would otherwise require inputs of type boolean to accept inputs of type double. This ensures compatibility with models created by versions of Simulink earlier than Simulink 3. For example, consider the following model.


This model connects signals of type double to a Logical Operator block that ordinarily requires inputs of type boolean. Consequently, this model runs without error only if the Relax boolean type checking option is selected.



[ Previous | Help Desk | Next ]