image thumbnail

Simulink Diagnostics Examples

by

 

07 May 2007 (Updated )

Example models that show the use of diagnostics to improve the model.

Simulink Diagnostics Examples

Simulink Diagnostics Examples

Contents

Solver Settings

Open diagnosticsSolverSettigns.mdl

open_system('diagnosticsSolverSettings')
set_param(bdroot,'SimulationCommand','update')
Warning: The model 'diagnosticsSolverSettings' does not have continuous states, hence using the solver 'VariableStepDiscrete' instead of solver 'ode45'. You can disable this diagnostic by explicitly specifying a discrete solver in the solver tab of the Configuration Parameters dialog, or setting 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics tab of the Configuration Parameters dialog.
Warning: Using a default value of 0.2 for maximum step size.  The simulation step size will be equal to or less than this value.  You can disable this diagnostic by setting 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics page of the configuration parameters dialog.

Mux as Bus Creator

Open diagnosticsMuxAsBusCreator.mdl

open_system('diagnosticsMuxAsBusCreator')
set_param(bdroot,'SimulationCommand','update')
Warning: The block diagram 'diagnosticsMuxAsBusCreator' improperly uses 1 Mux blocks as Bus Creators. This can lead to modeling errors (see the Mux block documentation for more information). To avoid such errors, replace the Mux blocks with Bus creator blocks and enable strict bus modeling (see slreplace_mux command). To enable strict bus modeling, set the 'Mux blocks used to create bus signals' option to 'error' in the Connectivity pane of the Diagnostics page in the Configuration Parameters Dialog.
 To avoid this warning (not recommended), set the option to 'none'.
 Individual warnings (up to a maximum of 10) are reported below for each Mux block.
Warning: The output of Mux block 'diagnosticsMuxAsBusCreator/Mux' is treated as a bus signal by block 'diagnosticsMuxAsBusCreator/Bus Selector1'.

Contact us