Using the Signal & Scope Manager you can manage viewers and generators from a central point.
The Signal and Scope Manager requires that you have Java® enabled when you start MATLAB®.
Viewers and generators are not blocks. Blocks are dragged from the Library browser and managed with block dialog boxes. Viewers and generators are added and managed through the Signal & Scope Manager.
Symbols identify a viewer attached to a signal line and signal names identify generators. Manage viewers and generators using the Signal & Scope Manager.
Open the Signal & Scope Manager. Right-click the input to a block and select Signal & Scope Manager.
In the list of Generators/Viewers in model, double-click the generator or viewer you want to change.
For a generator, the Generator Parameters dialog box opens.
For a viewer, a Viewer opens. From the viewer toolbar, select the parameters button . The Viewer parameters dialog box opens.
Review and change parameters.
Connect signals to new viewer or generator using the Signal & Scope Manager.
Open the Signal & Scope Manager window. Right-click a signal line, and then select Signal & Scope Manager.
From the Types pane, select a viewer or generator.
Click Attach to model.
Use the Signal Selector to connect the viewer or generator to a signal.
Use a Scope viewer available from the Signal and Scope Manager to view any signal that is defined as a test point in a referenced model. A test point is a signal that you can always see when using a Scope viewer in a model.
With some viewers (for example, XY Graph, To Video Display, Matrix Viewer), you cannot use the Signal Selector to select signals with test points in referenced models.
For more information, see Test Points.
You can add custom signal viewers or generators so that they appear in the Signal & Scope Manager. The
following procedure assumes that you have a custom viewer named
newviewer that you want to
Open a new Simulink® library by selecting File > New > Library.
Save the library as
In the MATLAB Command Window, set the library type to a viewer library:
To set the library type for generators, use the type
Set the display name of the library:
set_param('newlib','SSMgrDisplayString','My Custom Library')
Add the viewer or generator to the library.
If the viewer is a compound viewer, such as a subsystem with multiple blocks, make the top-level subsystem an atomic one.
iotype of the viewer. For example:
Save the library
Using the MATLAB editor, create a file named
sl_customization.m. In this file, enter a
directive to incorporate the new library as a viewer library.
For example, to save
newlib as a viewer library, add the following lines:
function sl_customization(cm) cm.addSigScopeMgrViewerLibrary('newlib') %end function
To add a library as a generator library, add a line like the following:
Add a corresponding
cm.addSigScope line for each viewer or generator library you want
sl_customization.m file on your MATLAB path. Edit this file to add new viewer or generator libraries.
To see the new custom libraries, restart MATLAB and start the Signal & Scope Manager.