This tutorial takes you through the steps to export a Simulink® model to a Web view.
You create a Web view from the Simulink model window using
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.
When you create the Web view, you can specify export options.
At the MATLAB® command prompt, enter
open the Simulink model.
In the Simulink Editor, select File > Export Model to > Web.
In the Include Options, select Masked Subsystems. This enables users of the Web view to interact with masked blocks.
In Systems to Exclude, select Temperature Control Chart.
Use the Folder edit box to specify
the name for the zip file for the exported Web view files.
Select the If package exists, increment name to prevent overwriting check box. Selecting this option prevents overwriting the Web view files if you export multiple Web views from the same model.
Exporting the selected systems to a Web view creates several support files, as well as an HTML file for displaying the systems. In this example, you change the defaults for the naming of the files.
The Web view files are exported, and the Web view appears in a Web browser.
The Temperature Control Chart appears in the top level of the model, but you cannot open that chart in the Web view to see its contents.
By default, if you export a whole model to a Web view, the Model Viewer pane shows the whole model. You can display specific systems in the Web view. For example:
In the model viewer, double-click the AC Control subsystem.
The AC Control subsystem appears in the model viewer. The tab label reflects the name of the currently displayed subsystem.
Open the model browser (hidden by default). Click Hide/Show Model Browser .
Open another system, in a separate tab. In the model browser, CTRL+click select the Heater Control system.
Drag the AC Control system to the top of model viewer. Place the cursor in the display area, hold down the mouse scroll wheel, and drag.
Zoom the display with the mouse scroll wheel.
In the model browser, select
Double-click the AC Control subsystem.
Click the Temp/enthalpy block to view the block parameter values. The Object Inspector pane groups the block parameters by the block parameter dialog box tabs.
Click the input signal for the Exit Temp (AC) block to display the signal properties.
Try navigating to other parts of the Web view.
Close the Web view.
In the MATLAB current folder (or wherever you saved the
zip file when you performed the steps in Export Specific Systems), extract the
file contents and open the