Skip to Main Content Skip to Search
Product Documentation

Tutorial: Creating Web Views of Simulink Models

About This Tutorial

This tutorial takes you through the steps required to export a Simulink model to a Web view. If you have a detailed model of your own, you can use it for this example. Otherwise, use the example provided in this section.

There are several ways to create a Simulink model Web view. This tutorial creates a Web view from the Simulink model window using the sldemo_auto_climatecontrol model, which is provided with the Simulink software. This model simulates the working of an automatic climate control system in a car.

You do not need to know the Simulink product to follow this tutorial.

Specifying Web View Export Options

Before creating the Web view, specify export options:

  1. Start a MATLAB software session.

  2. At the command prompt, enter sldemo_auto_climatecontrol to open the Simulink model.

  3. Click File > Export to Web.

    A Web view window that includes data about the current model appears.

  4. In the Include systems selection list, select All to export all systems in this model.

  5. In the Look under masks selection list, select Masks with no workspace and no dialog to export only graphically masked blocks.

  6. Leave the Follow library links and Follow model reference blocks check boxes cleared.

Exported Layers appears in the lower part of the Web View window. This area lists the names of the systems to export to the Web view, along with their Simulink paths. Because you selected All in the Include systems selection list, all layers in the sldemo_auto_climatecontrol model appear.

Exporting Models

To export the model to a Web view, click OK in the Web View window.

The Web view of the model appears in the browser window.

Navigating Web Views

You can navigate Web views in ways similar to how you navigate models in the Simulink GUI. The following steps help you experiment with the types of navigation that are available.

  1. Notice the four navigation icons in the upper-left corner of the browser window.

  2. Hover over the Navigation Commands icon to see a list of keyboard shortcuts that allow you to move around the current window.

  3. Press some of the keyboard keys listed here to see how the model in the Web view reacts.

  4. Hover over the Temperature Control Chart diagram.

    The name next to the navigation icons becomes Temperature Control Chart.

  5. Hover over the System Trigger block.

    The name next to the navigation icons changes to System Trigger.

    In addition, the block parameter values for the System Trigger block appear.

  6. Hover over other blocks and subsystems in the model and observe the results.

  7. Click the Temperature Control Chart.

    The details of this Stateflow chart appear, and the middle two navigation icons are now enabled:

    • The View Home icon takes you up to the top level of the model.

    • The View Previous icon takes you back to the previously displayed level in the model.

  8. Click the setpoint_calc box in the Stateflow chart to see the details of that block.

  9. Click the View home icon to return to the model's top layer.

  10. Click the Show all layers icon. An overall view of the model appears.

    This high-level view of the model shows all layers of the model. In this figure, the arrow is hovering over the AC Control layer.

Try opening other Simulink models and exporting them to Web views, and experiment with the results.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS