| Gauges Blockset™ | ![]() |
| On this page… |
|---|
This example builds on the one described in Placing Controls in a Different Model, but places the Gauges Blockset™ blocks in a subsystem of the main model rather than a different model. This approach simplifies operations such as saving and closing the system because the system involves only a single .mdl file.
To open a completed version of this example, enter gauges_bounce_subsys in the MATLAB® Command Window. Notice that the model includes a subsystem called gui in the lower right.

To create the subsystem, follow these steps:
Open the bounce model and save it in your working directory as gauges_bounce_subsys.
Copy a Subsystem block from the Simulink® Signals & Systems library into the model window. Change the block's name to gui.
Copy a Generic Linear Gauge block from the Linear Gauges library into the subsystem. Change the block's name to Position.
Copy an Amp Meter block from the Angular Gauges library into the subsystem. Change the block's name to Velocity.
In the Block Parameters dialog box for each of the two gauge blocks, set the Connections parameter to neither and clear the Input property edit field.
To customize the gauge blocks, see Customizing the Gauges.
The procedure for associating the top-level ActiveX Control blocks with the gauge blocks that are inside the subsystem is similar to the procedure described in Associating the Main Model with the Gauges. The only difference is that the Handle location parameters have different values for a subsystem than for a separate model. The dialog boxes should look like those in the following figures.
For Displaying the Velocity

For Displaying the Position

![]() | Placing Controls in a Different Model | Placing Controls in a Figure Window | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |