Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

Changing Viewer Characteristics

The Scope Viewer Toolbar

The Scope Viewer toolbar is attached to each Scope Viewer. It has the following controls:

IconFunction

Opens the Print dialog box so you can print the contents of a Scope Viewer window.

Opens the Scope Parameters dialog for modifying display characteristics. For details, see Scope Viewer Parameters Dialog Box.

Simultaneously zooms in on the x and y axes. The zoom feature is not active while the simulation is running.

For more information, see Zooming In On Graph Regions.

Use this button to zoom in on the x axis only. The zoom feature is not active while the simulation is running.

For more information, see Zooming In On Graph Regions.

Use this button to zoom in on the y axis only. The zoom feature is not active while the simulation is running.

For more information, see Zooming In On Graph Regions.

Automatically scales the axis to fully display all signals.

Stores the current axis settings so you can apply them to the next simulation.

Restores the graph setting values saved by the most recent Save axes settings command.

Activates the Signal Selector. For more information, see The Signal Selector.

Docks and undocks the Scope Viewer. When you dock the Scope Viewer, it is placed within the MATLAB Command Window and automatically resized.

Scope Viewer Parameters Dialog Box

Open the Scope Parameters dialog box by clicking on the scope toolbar, or by selecting Scope parameters from the context menu. There are three tabs:

General Tab

With this tab you control the number of axes, the time range, and the appearance of your graph.

Number of axes.   Set the number of axes in this data field. Each axis is displayed as a separate graph within a single Scope Viewer.

An example of this is shown in Adding Multiple Signals to a Scope Viewer.

Time Range.   Change the x-axis limits by entering a number or auto in the Time range field.

Entering a number of seconds causes each screen to display the amount of data that corresponds to that number of seconds. Enter auto to set the x-axis to the duration of the simulation.

Tick labels.   Specifies whether to label axes ticks. The options are:

OptionEffect

all

Places ticks on the outside of all axes

inside

Places tick labels inside all axes (available only on signal viewers)

bottom axis only

Places tick labels outside the bottom axes

Scroll.   When you select this option, the scope continuously scrolls the displayed signals to the left to keep as much data in view as will fit on the screen at any one time.

In contrast, when this option is not selected, the scope draws a screen full of data from left to right until the screen is full, erases the screen, and draws the next screen full of data. This loop is repeated until the end of simulation time. The effects of this option are discernible only when drawing is slow, for example, when the model is very large or has a very small step size.

Data markers.   Displays a marker at each data point on the Scope Viewer screen.

Legends.   Displays a legend on the scope that indicates the line style used to display each signal.

Decimation.   Logs every Nth data point, where N is the number entered in the edit field.

For example, suppose that your model uses a fixed-step solver with a step size of 0.1 s. if you enter a value of 2, data points for this viewer will be recorded at times 0.0, 0.2, 0.4....

History Tab

With this tab you control the amount of data that the Scope Viewer stores, displays and stores to the workspace. The values that appear in these fields are the values that are used in the next simulation.

Limit data points to last.   Limits the number of data points saved to the workspace. Select the Limit data points to last check box and enter a value in its data field.

The Scope relies on its data history for zooming and autoscaling operations. If the number of data points is limited to 1,000 and the simulation generates 2,000 data points, only the last 1,000 are available for regenerating the display.

Save to model signal logging object.   At the end of the simulation, this option saves the data displayed on the Scope Viewer . The data is saved in the Simulink.ModelDataLogs object used to log data for the model (see Logging Signals for more information).

For this option to take effect, you must also enable signal logging for the model as a whole. To do this, check the Signal logging option on the Data Import/Export pane of the model's Configuration Parameters dialog box.

Logging Name.   Specifies the name under which to store the viewer's data in the model's Simulink.ModelDataLogs object. The name must be different from the log names specified by other signal viewers or for other signals, subsystems, or model references logged in the model's Simulink.ModelDataLogs object.

Performance Tab

Controls how frequently the Scope Viewer is refreshed. Reducing the refresh rate can speed up the simulation in some cases.

This tab contains the following controls.

Refresh Period.   Select the units in which the refresh period is expressed. Options are either seconds or frames, where a frame is the width of the scope's screen in seconds. This is the value of the scope's Time range parameter.

Refresh Slider.   Sets the refresh rate.

Drag the slider button to the right to increase the refresh period and hence decrease the refresh rate.

Freeze Button.   Controls refresh.

Click the button to freeze (stop refreshing) or unfreeze the Scope Viewer.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS