Main Content

Visualization and Animation for Debugging

Visualize and animate simulations in SimEvents® models using tools available in Simulink® and SimEvents software.

  • You can place many Simulink Sink blocks directly on the entity line to observe entities, including the To Workspace and dashboard scopes.

  • If the entity type is anonymous, you can place a Scope block.

  • To observe bus or structured type entities, use the Simulation Data Inspector or dashboard scopes. The Scope and Display blocks do not support buses.

Which Debugging Tool to Use

These tools help you explore various elements of a SimEvents model.

Items to ObserveVisualization Tool and Its Purpose

Statistics

  • Simulation Data Inspector — Show the statistic throughout the simulation. For more information, see Analyze Simulation Results.

  • Simulink To Workspace block — Write the data set to the MATLAB® workspace when the simulation stops or pauses.

  • Simulink Scope block — Create a plot using the statistic.

  • Simulink Display block — Show the statistic throughout the simulation.

  • Simulink To File block — Write the data set into a MAT-file.

  • Simulink Dashboard Scope block — Create a plot using the statistic.

Entities passing through model

Entity animation

Animation — Highlight active entities in the simulation.

Step of a Simulation

Simulink Simulation Stepper — Step forward and back through a simulation. For more information, see Step Through Simulation.

Custom animation

Use SimEvents custom visualization API — Create custom observers of the entities and events in a model. For more information, see Use SimulationObserver Class to Monitor a SimEvents Model.

Note

The Simulink Floating Scope does not support SimEvents models.

Simulation Data Inspector is a unified user interface for viewing both entities and signal (for example, statistics) data. For more information, see Analyze Simulation Results.

Observe Entities with Animation

During simulation, animation provides visual verification that your model behaves as you expect. Animation highlights active entities in a model as execution progresses. You can control the speed of entity activity animation during simulation, or turn off animation. In a model window, right-click and select Animation Speed.

  • Fast

  • Medium

  • Slow

  • None

The Fast animation speed shows the active highlights at each time step. To add delay with each time step, set the animation speed to Medium or Slow. To turn off the animation, select None.

Explore the System Using the Simulink Simulation Stepper

Simulation Stepper enables you to step through major time steps of a simulation. Use this tool to explore your discrete-event system. For more information, see Debug Simulations in the Simulink Editor.

Information About Race Conditions and Random Times

You can vary the processing sequence for simultaneous events or make the intergeneration times or service times random.

See Also

| | | | |

Related Topics