Main Content

Connect Dashboard Blocks to Stateflow

Dashboard blocks help you to control and visualize your Stateflow® chart during simulation and while your simulation is paused. Dashboard blocks can be used to bind to Stateflow in order to:

  • Monitor self, child, and leaf activity of a state.

  • Monitor local and output data within states, transitions, or graphical functions.

To connect a Dashboard block to data or to a Stateflow state, point to the Dashboard block. Above the block, a connect button appears.

The connect button on a dashboard block.

Click the Connect button, and navigate to the Stateflow object you want to connect to.

Note

The Double-click to connect feature is not supported in Stateflow.

Click a state or transition, and choose which activity or data you want to connect.

Choose the state activity to connect to a dashboard block.

Dashboard block connection is not supported for MATLAB® Functions, Simulink® Functions, or truth tables. For more information on Dashboard blocks, see Control Simulations with Interactive Displays.

Monitor a Boiler with Dashboard Blocks

In this Stateflow chart, Dashboard blocks are used to control the temperature setpoint for a boiler, visualize when the boiler is on or off and what mode it is operating in.

To open the model, in the command prompt type:

openExample('stateflow/DashboardBoilerExample')
sfDashboardBoiler

The Stateflow dashboard boiler model.

Dashboard blocks are also used to visualize the temperature output by the boiler, which should match the temperature setpoint.

When you simulate the model, the LED light flashes to show if the boiler is off or on. A red light indicates that the boiler is off, while a green light indicates that the boiler is on. The Boiler Activity - Hight/Normal/Off block shows you if the boiler is operating in high or normal mode. When the boiler is not active, this block displays OFF.

The dashboard panel is in the off mode.

The dashboard panel is in the on mode.

Related Topics