Documentation

Signal and Scope Manager

About the Signal & Scope Manager

Using the Signal & Scope Manager you can manage viewers and generators from a central point.

    Note:   The Signal and Scope Manager requires that you have Java® enabled when you start MATLAB®.

Viewer and Generator

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.

Change Scope Viewer Parameters

  1. Open the Signal & Scope Manager. Right-click the input to a block and select Signal & Scope Manager.

  2. 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.

  3. Review and change parameters.

Connect Viewers and Generators

Connect signals to new viewer or generator using the Signal & Scope Manager.

  1. Open the Signal & Scope Manager window. Right-click a signal line, and then select Signal & Scope Manager.

  2. From the Types pane, select a viewer or generator.

  3. Click Attach to model.

  4. Use the Signal Selector (seeSignal Selector ) to connect the viewer or generator to a signal.

View Test Point Data

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.

    Note:   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.

Customize Signal & Scope Manager

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 add.

  1. Open a new Simulink® library.

    For example, open the Simulink browser and select File > New > Library.

  2. Save the library.

    For example, save it as newlib.

  3. In the MATLAB Command Window, set the library type for the library.

    For example, to set the library type of newviewer to viewer,

    set_param('newlib','LibraryType','SSMgrViewerLibrary')

    To set library type for generators, use the type 'SSMgrGenLibrary'.

    For example,

    set_param('newlib','LibraryType','SSMgrGenLibrary')
  4. Set the display name of the library.

    For example,

    set_param('newlib','SSMgrDisplayString','My Custom Library')
  5. Add the viewer or generator to the library.

      Note:   If the viewer is a compound viewer, such as a subsystem with multiple blocks, make the top-level subsystem an atomic one.

  6. Set the iotype of the viewer.

    For example,

    set_param('newlib/newviewer','iotype','viewer')
  7. Save the library newlib. In the Simulink window, select File > Save.

  8. 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:

    cm.addSigScopeMgrGeneratorLibrary('newlib')

  9. Add a corresponding cm.addSigScope line for each viewer or generator library you want to add.

  10. Save the sl_customization.m file on your MATLAB path. Edit this file to add new viewer or generator libraries.

  11. To see the new custom libraries, restart MATLAB and start the Signal & Scope Manager.

See Also

| |

Related Examples

More About

Was this topic helpful?