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®.
Symbols identify a viewer attached to a signal line and signal names identify generators. Manage viewers and generators using the Signal & Scope Manager.
Viewers and generators are not blocks. Blocks are dragged from the Library browser and managed with block dialog boxes.
Open the Signal & Scope Manager. Right-click the input to a block and select Signal & Scope Manager.
To the right side of the Generators and Viewers pane, click the Parameters button .
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, Spectrum Scope, and Vector Scope), 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.
For example, open the Simulink browser and select File > New > Library.
Save the library.
For example, save it as
In the MATLAB Command Window, set the library type for the library.
For example, to set the library type of
To set 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.
Save the library
newlib. In the Simulink window, select File > Save.
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.