Main Content

Sequence Viewer

Visualize messages, events, states, transitions, and functions


The Sequence Viewer visualizes message flow, function calls, and state transitions.

Use the Sequence Viewer to see the interchange of messages, events, function calls in Simulink® models, Simulink behavior models in System Composer™ and between Stateflow® charts in Simulink models.

In the Sequence Viewer window, you can view event data related to Stateflow chart execution and the exchange of messages between Stateflow charts. The Sequence Viewer window shows messages as they are created, sent, forwarded, received, and destroyed at different times during model execution. The Sequence Viewer window also displays state activity, transitions, and function calls to Stateflow graphical functions, Simulink functions, and MATLAB® functions. For more information, see .


The Sequence Viewer does not display function calls generated by MATLAB Function blocks and S-functions.

Sequence Viewer tool

Open the Sequence Viewer

  • Simulink Toolstrip: On the Simulation tab, in the Review Results section, click Sequence Viewer.


expand all

  1. To activate logging events, in the Simulink Toolstrip, under the Simulation tab, in the Prepare section, click Log Events.

  2. Simulate your model.

  3. To open the tool, in the Simulink Toolstrip, under the Simulation tab, in the Review Results section, click Sequence Viewer.

Related Examples


Number of digits for time increment precision. When using a variable step solver, change this parameter to adjust the time precision for the sequence viewer. By default the block supports 3 digits of precision. Minimum and maximum precision are 1 and 16, respectively.

Suppose the block displays two events that occur at times 0.1215 and 0.1219. Displaying these two events precisely requires 4 digits of precision. If the precision is 3, then the block displays two events at time 0.121.

Programmatic Use

Block Parameter: SequenceViewerTimePrecision
Type: character vector
Values: '3' | scalar
Default: '3'

Total number of events before the last event to display. Minimum and maximum number of events are 0 and 25000, respectively.

For example, if History is 5 and there are 10 events in your simulation, then the block displays 6 events, including the last event and the five events prior the last event. Earlier events are not displayed. The time ruler is greyed to indicate the time between the beginning of the simulation and the time of the first displayed event.

Each send, receive, drop, or function call event is counted as one event, even if they occur at the same simulation time.

Programmatic Use

Block Parameter: SequenceViewerHistory
Type: character vector
Values: '1000' | scalar
Default: '1000'

Version History

Introduced in R2020b