Time Scope

Display time-domain signals

Description

The Time Scope block displays signals in the time domain. The Time Scope block accepts input signals with the following characteristics:

  • Continuous or discrete sample time

  • Real- or complex-valued

  • Fixed or variable size dimensions

  • Floating- or fixed-point data type

  • N-dimensional

  • Simulink® enumerations

You can use the Time Scope block in models running in Normal or Accelerator simulation modes. You can also use the Time Scope block in models running in Rapid Accelerator or External simulation modes, with some limitations. See the Supported Simulation Modes section for more information.

You can use the Time Scope block inside of all subsystems and conditional subsystems. Conditional subsystems include enabled subsystems, triggered subsystems, enabled and triggered subsystems, and function-call subsystems. See Conditional Subsystems in the Simulink documentation for more information.

See the following sections for more information on the Time Scope:

Displaying Multiple Signals

Multiple Signal Input

You can configure the Time Scope block to show multiple signals within the same display or on separate displays. By default, the signals appear as different-colored lines on the same display. The signals can have different dimensions, sample rates, and data types. Each signal can be either real or complex valued. You can set the number of input ports on the Time Scope block in the following ways:

  • Right-click the Time Scope block in your model to bring up the context menu. Point your cursor to the Signals & Ports > Number of Input Ports item on the context menu. You can then select the number of input ports for the Time Scope block. If the desired number of input signals is 1, 2, or 3, then click on the appropriate value. To configure a Time Scope block to have more than three input ports, select More, and enter a number for the Number of input ports parameter.

  • Open the Time Scope window by double-clicking the Time Scope block in your model. In the scope menu, select File > Number of Input Ports.

  • Open the Time Scope window by double-clicking the Time Scope block in your model. In the scope menu, select View > Configuration Properties and set the Number of input ports on the Main tab.

An input signal may contain multiple channels, depending on its dimensions. Multiple channels of data are always shown as different-colored lines on the same display.

Multiple Signal Names

By default, the scope names each channel according to either its signal name or the name of the block from which it comes. If the signal has multiple channels, the scope uses an index number to identify each channel of that signal. For example, a 2-channel signal named Signal1 would have the following default names in the channel legend: Signal1:1, Signal1:2. In the following example, there is one 3-channel input signal and one 4-channel input signal to the scope block, one signal named Signal1 and one unnamed signal coming from a block named Block2.

To see all the signal names, run the simulation and show the legend. To show the legend, select View > Configuration Properties, click the Display tab, and select the Show Legend check box. The following legend appears in the display.

    Note:   Continuous signals appear as straight lines in the legend. Discrete signals appear as step-shaped lines.

Multiple Signal Colors

By default, the scope has a black axes background and chooses line colors for each channel in the same manner as the Simulink Scope block. When the scope axes background is black, it assigns each channel of each input signal a line color in the order shown above.

If there are more than 7 channels, then the scope repeats this order to assign line colors to the remaining channels. To choose line colors for each channel in the same manner as the MATLAB® plot function, change the axes background color to any color except black. To change the axes background color to white, select View > Style, click the Axes background color button ( ), and select white from the color palette. Run the simulation again. The following legend appears in the display.

When the scope axes background is not black, it assigns each channel of each input signal a line color in order shown above.If there are more than 7 channels, then the scope repeats this order to assign line colors to the remaining channels. To manually modify any line color, select View > Style to open the Style dialog box. Next to Properties for line, select the signal name whose color you want to change. Then, next to Line, click the Line color button ( ) and select any color from the palette.

Multiple Time Offsets

You can offset all channels of an input signal by the same number of seconds or offset each channel independently. To offset all channels equally, select View > Configuration Properties, and specify a scalar value for the Time display offset parameter on the Main pane. To offset each channel independently, specify a vector of offset values. When you specify a Time display offset vector of length N, the scope offsets the input channels as follows:

  • When N is equal to the number of input channels, the scope offsets each channel according to its corresponding value in the offset vector.

  • When N is less than the number of input channels, the scope applies the values you specify in the offset vector to the first N input channels. The scope does not offset the remaining channels.

  • When N is greater than the number of input channels, the scope offsets each input channel according to the corresponding value in the offset vector. The scope ignores all values in the offset vector that do not correspond to a channel of the input.

Multiple Displays

You can display multiple channels of data on different displays in the scope window. In the scope toolbar, select View > Layout, or select the Layout button ( ) in the dropdown below the Configuration Properties button.

    Note:   The Layout menu item and button are not available when the scope is in snapshot mode.

This feature allows you to tile the window into a number of separate displays, up to a grid of 4 rows and 4 columns. For example, if there are three inputs to the scope, you can display the signals in separate displays by selecting row 3, column 1, as shown in the following figure.

After you select row 3, column 1, the scope window is partitioned into three separate displays, as shown in the following figure.

When you use the Layout option to tile the window into multiple displays, the display highlighted in yellow is referred to as the active display. The scope dialog boxes reference the active display.

Signal Display

Time Scope uses the simulation start time and stop time in order to determine the default time range. However, you can define the length of simulation time for which the Time Scope displays data. To change the signal display settings, select View > Configuration Properties to bring up the Configuration Properties dialog box. Then, modify the values for the Time span and Time display offset parameters on the Time tab. For example, if you set the Time span to 20 seconds and the Time display offset to 0, the scope displays 20 seconds' worth of simulation data at a time. The values on the time-axis of the Time Scope display remain the same throughout simulation.

To communicate the simulation time that corresponds to the current display, the scope uses the Time units, Time offset, and Simulation time indicators on the scope window. The following figure highlights these and other important aspects of the Time Scope window.

    Note:   To prevent the scope from opening when you run your model, right-click on the scope icon and select Comment Out. If the scope is already open, you can still comment it out in the model. When you do so, the scope displays a message, "No data can be shown because this scope is commented out." Select Uncomment to turn the scope back on.

  • Minimum time-axis limit — The Time Scope sets the minimum time-axis limit using the value of the Time display offset parameter on the Main tab of the Visuals—Time Domain Properties dialog box. If you specify a vector of values for the Time display offset parameter, the scope uses the smallest of those values to set the minimum time-axis limit.

  • Maximum time-axis limit — The Time Scope sets the maximum time-axis limit by summing the value of Time display offset parameter with the value of the Time span parameter. If you specify a vector of values for the Time display offset parameter, the scope sets the maximum time-axis limit by summing the largest of those values with the value of the Time span parameter.

  • Simulation status — Provides the current status of the model simulation. The status can be one of the following conditions:

    • Initializing

    • Ready

    • Running

    • Paused

    The Simulation status is part of the Status Bar in the Time Scope window. You can choose to hide or display the entire Status Bar. From the Time Scope menu, select View > Status Bar.

  • Time units — The units used to describe the time-axis. The Time Scope sets the time units using the value of the Time Units parameter on the Time tab of the Configuration Properties dialog box. By default, this parameter is set to Metric (based on Time Span) and displays in metric units such as milliseconds, microseconds, minutes, days, etc. You can change it to Seconds to always display the time-axis values in units of seconds. You can change it to None to not display any units on the time-axis. When you set this parameter to None, then Time Scope shows only the word Time on the time-axis.

    To hide both the word Time and the values on the time-axis, set the Show time-axis labels parameter to None. To hide both the word Time and the values on the time-axis in all displays except the bottom ones in each column of displays, set this parameter to Bottom Displays Only. This behavior differs from the Simulink Scope block, which always shows the values but never shows a label on the x-axis.

  • Time offset — The Time offset value helps you determine the simulation times for which the scope is displaying data. The value is always in the range 0Time offsetSimulation time. Therefore, add the Time offset to the fixed time span values on the time-axis to get the overall simulation time.

    For example, if you set the Time span to 20 seconds, and you see a Time offset of 0 (secs) on the scope window. This value indicates that the scope is displaying data for the first 0 to 20 seconds of simulation time. If the Time offset changes to 20 (secs), the scope displays data for simulation times from 20 seconds to 40 seconds. The scope continues to update the Time offset value until the simulation is complete.

  • Simulation time — When the model is running or simulation has been paused, the scope displays the current simulation time. This time is the amount of time that the Time Scope has spent processing the input. If the model simulation completes or is stopped, the scope displays the time at which the simulation stopped. The Simulation time is part of the Status Bar in the Time Scope window. You can choose to hide or display the entire Status Bar. From the Time Scope menu, select View > Status Bar .

      Note:   In some situations, the Time Scope block simulation time can be different from the Simulink simulation time. For multirate input signals, which have different sample times, and input signals originating from conditionally-executed subsystems, such as Triggered and Enabled subsystems, separate Time Scope blocks may report different simulation times. The Time Scope block reports the simulation time as the time corresponding to the last point in the display.

Axes Maximization

When the scope is in maximized axes mode, the following figure highlights the important indicators on the scope window.

To toggle this mode, in the scope menu, select View > Configuration Properties. In the Main pane, locate the Maximize axes parameter.

Specify whether to display the scope in maximized axes mode. In this mode, each of the axes is expanded to fit into the entire display. To conserve space, labels do not appear in each display. Instead, tick-mark values appear on top of the plotted data. You can select one of the following options:

  • Auto — In this mode, the axes appear maximized in all displays only if the Title and YLabel properties are empty for every display. If you enter any value in any display for either of these properties, the axes are not maximized.

  • On — In this mode, the axes appear maximized in all displays. Any values entered into the Title and YLabel properties are hidden.

  • Off — In this mode, none of the axes appear maximized.

This property is Tunable.

The default setting is Auto.

Reduce Updates to Improve Performance

By default, the scope updates the displays periodically at a rate not exceeding 20 hertz. If you would like the scope to update on every simulation time step, you can disable the Reduce Updates to Improve Performance option. However, as a recommended practice, leave this option enabled because doing so can significantly improve the speed of the simulation.

In the Time Scope menu, select Simulation > Reduce Updates to Improve Performance to clear the check box. Alternatively, use the Ctrl+R shortcut to toggle this setting.

Toolbar

The Time Scope toolbar contains the following buttons. You can control whether this toolbar appears in the Time Scope window. From the Time Scope menu, select View > Toolbar.

Configuration Properties Buttons

ButtonMenu LocationShortcut KeysDescription

View >
Configuration Properties

N/A

Open the Configuration Properties dialog box.

See the Configuration Properties Dialog Box section for more information.

View >
Style

N/A

You access the Style button from the menu under the Configuration Properties icon. Configure the scope display. You can change the color of the figure containing the displays, the background and foreground colors of display axes, and properties of lines in a display. See the Style Dialog Box section for more information.

View >
Layout

N/A

You access the Layout button from the menu under the Configuration Properties icon. Arrange the layout of displays in the Time Scope. This feature allows you to tile your screen into a number of separate displays, up to a grid of 4 rows and 4 columns. You may find multiple displays useful when the Time Scope takes multiple input signals. The default display is 1 row and 1 column. See the Multiple Displays section for more information.

Simulation Buttons

ButtonMenu LocationShortcut KeysDescription

Simulation >
Stepping Options

N/A

Open the Simulation Stepping Options dialog box. This button appears only when you have stepping backward disabled. See the Stepping Options section for more information.

Simulation >
Step Back

N/A

Advance the model simulation backward by one time step. This button appears only when you have stepping backward enabled and the model simulation is paused.

Simulation >
Run

Ctrl+T, p, Space

Start the model simulation. This button appears only when the model simulation is stopped.

Simulation >
Continue

p, Space

Continue the model simulation. This button appears only when the model simulation is paused.

Simulation >
Pause

p, Space

Pause the model simulation. This button appears only when the model simulation is running.

Simulation >
Step Forward

Right arrow, Page Down

Advance the model simulation forward by one time step. This button starts the model simulation, allows it to run for one time step, and then pauses it again. The scope window then updates with the latest data.

Simulation >
Stop

Ctrl+T, s

Stop the model simulation. This button appears only when the model simulation is running or paused.

View >
Highlight Simulink Block

Ctrl+L

Bring the model window forward, and highlight the Time Scope block whose display you are currently viewing. The Time Scope block that corresponds to the active Time Scope window flashes three times in the model.

Simulation >
Simulink Snapshot

N/A

You access the Simulation Snapshot button from the menu under the Highlight Simulink Block icon. Take a snapshot of the current scope display. This button temporarily freezes the scope display, while allowing simulation to continue running. To unfreeze the scope display and view the current simulation data, toggle this button to turn off snapshot mode. Snapshot mode is not available if the scope is commented out in the block diagram.

To see a full listing of the shortcut keys for these simulation controls, from the Time Scope menu, select Help > Keyboard Command Help.

Zoom and Axes Control Buttons

ButtonMenu LocationShortcut KeysDescription

Tools >
Zoom In

N/A

When this tool is active, you can zoom in on the scope window. To do so, click in the center of your area of interest, or click and drag your cursor to draw a rectangular area of interest inside the scope window.

Tools >
Zoom X

N/A

You access the Zoom X button from the menu under the Zoom In icon. When this tool is active, you can zoom in on the x-axis. To do so, click inside the scope window, or click and drag your cursor along the x-axis over your area of interest.

Tools >
Zoom Y

N/A

You access the Zoom Y button from the menu under the Zoom In icon. When this tool is active, you can zoom in on the y-axis. To do so, click inside the scope window, or click and drag your cursor along the y-axis over your area of interest.

Tools >
Pan

N/A

You access the Pan button from the menu under the Zoom In icon. When this tool is active, you can pan on the scope window. To do so, click in the center of your area of interest and drag your cursor to the left, right, up, or down, to move the position of the display.

Tools >
Scale Y-Axis Limits
Ctrl+A

Click this button to scale the axes in the active scope window.

Alternatively, you can enable automatic axes scaling by selecting one of the following options from the Tools menu:

  • Automatically Scale Axes Limits — When you select this option, the scope scales the axes as needed during simulation.

  • Scale Axes Limits after 10 Updates — When you select this option, the scope scales the axes after 10 updates. The scope does not scale the axes again during the simulation.

  • Scale Axes Limits at Stop — When you select this option, the scope scales the axes each time the simulation is stopped.

Tools >
Scale X-Axis Limits
N/A

You access the Scale X-Axis Limits button from the menu under the current Axis Limits icon. Click this button to scale the axes in the X direction in the active scope window.

Alternatively, you can enable automatic axes scaling by selecting one of the following options from the Tools menu:

  • Automatically Scale Axes Limits — When you select this option, the scope scales the axes as needed during simulation.

  • Scale Axes Limits after 10 Updates — When you select this option, the scope scales the axes after 10 updates. The scope does not scale the axes again during the simulation.

  • Scale Axes Limits at Stop — When you select this option, the scope scales the axes each time the simulation is stopped.

Tools >
Scale X & Y Axes Limits
N/A

You access the Scale X & Y Axes Limits button from the menu under the current Axis Limits icon. Click this button to scale the axes in both the X and Y directions in the active scope window.

Alternatively, you can enable automatic axes scaling by selecting one of the following options from the Tools menu:

  • Automatically Scale Axes Limits — When you select this option, the scope scales the axes as needed during simulation.

  • Scale Axes Limits after 10 Updates — When you select this option, the scope scales the axes after 10 updates. The scope does not scale the axes again during the simulation.

  • Scale Axes Limits at Stop — When you select this option, the scope scales the axes each time the simulation is stopped.

Measurements Buttons

Tools >
Triggers

N/A

Open or close the Triggers panel. This panel allows you to pause the display only when certain events occur. You can use the Triggers panel when you want to align or search for interesting events. Triggers can be configured to both select and align specific regions of interest in the display area of the scope.

See the Triggers Panel section for more information.

Tools >
Measurements
>
Cursor Measurements

N/A

Open or close the Cursor Measurements panel. This panel puts screen cursors on all the displays.

See the Cursor Measurements Panel section for more information.

Tools >
Measurements
>
Signal Statistics

N/A

You access the Signal Statistics button from the menu under the current Measurements icon. Open or close the Signal Statistics panel. This panel displays the maximum, minimum, peak-to-peak difference, mean, median, RMS values of a selected signal, and the times at which the maximum and minimum occur.

See the Signal Statistics Panel section for more information.

Tools >
Measurements
>
Bilevel Measurements

N/A

You access the Bilevel Measurements button from the menu under the current Measurements icon. Open or close the Bilevel Measurements panel. This panel displays information about a selected signal's transitions, overshoots or undershoots, and cycles.

See the Bilevel Measurements Panel section for more information.

Tools >
Measurements
>
Peak Finder

N/A

You access the Peak Finder button from the menu under the current Measurements icon. Open or close the Peak Finder panel. This panel displays maxima and the times at which they occur, allowing the settings for peak threshold, maximum number of peaks, and peak excursion to be modified.

See the Peak Finder Panel section for more information.

Measurements Panels

The Measurements panels are the panels that appear to the right side of the Time Scope GUI. These panels are labeled Trace selection, Cursor measurements,Signal statistics, Bilevel measurements, and Peak finder.

The Time Domain Measurements panels only appear if the Measurements tool is enabled in the Tools—Axes Scaling Properties dialog box. To open this dialog box, in the Time Scope menu, select File > Configuration and click the Tools pane. If you disable the tool by clearing the Enabled check box, the Time Domain Measurements tools no longer display in the Time Scope figure. You can reenable the tool at any time by selecting the Enabled check box. See the Tools—Axes Scaling Properties section for more information.

Measurements Panel Buttons

Each of the Measurements panels contains the following buttons that enable you to modify the appearance of the current panel.

ButtonDescription

Move the current panel to the top. When you are displaying more than one panel, this action moves the current panel above all the other panels.

Collapse the current panel. When you first enable a panel, by default, it displays one or more of its panes. Click this button to hide all of its panes to conserve space. After you click this button, it becomes the expand button .

Expand the current panel. This button appears after you click the collapse button to hide the panes in the current panel. Click this button to display the panes in the current panel and show measurements again. After you click this button, it becomes the collapse button again.

Undock the current panel. This button lets you move the current panel into a separate window that can be relocated anywhere on your screen. After you click this button, it becomes the dock button in the new window.

Dock the current panel. This button appears only after you click the undock button. Click this button to put the current panel back into the right side of the Scope window. After you click this button, it becomes the undock button again.

Close the current panel. This button lets you remove the current panel from the right side of the Scope window.

Some panels have their measurements separated by category into a number of panes. Click the pane expand button to show each pane that is hidden in the current panel. Click the pane collapse button to hide each pane that is shown in the current panel.

Trace Selection Panel

When you use the scope to view multiple signals, the Trace Selection panel appears if you have more than one signal displayed and you click on any of the other Measurements panels. The Measurements panels display information about only the signal chosen in this panel. Choose the signal name for which you would like to display time domain measurements. See the following figure.

You can choose to hide or display the Trace Selection panel. In the Scope menu, select Tools > Measurements > Trace Selection.

Triggers Panel

The Triggers panel allows you to pause the display only when certain events occur. You can use the Triggers panel when you want to align or search for interesting events. You can configure triggers to both select and align specific regions of interest in the display area of the scope. Triggers work across multiple displays. You can also choose to hide or display the Triggers panel. In the scope toolbar, click the Triggers button ( ). Alternatively, in the scope menu, select Tools > Triggers.

When the Triggers panel is displayed, triangle pointers appear at the top and right side of the axes on each display. These markers indicate the time position ( ) and level ( ) at the event. The color of the markers corresponds to the color of the source signal.

    Note:   The scope does not display an event until at least a full time span is completely viewable inside the display. To prevent data from being shown twice in the display, the scope suppresses the alignment of recurring events until a full time span has elapsed since the previous update.

 Main Pane

 Source / Type Pane

 Levels / Timing Pane

 Delay / Holdoff Pane

Cursor Measurements Panel

The Cursor Measurements panel displays screen cursors. You can choose to hide or display the Cursor Measurements panel. In the Scope menu, select Tools > Measurements > Cursor Measurements. Alternatively, in the Scope toolbar, click the Cursor Measurements button.

The Cursor Measurements panel is separated into two panes, labeled Settings and Measurements. You can expand each pane to see the available options.

You can use the mouse or the left and right arrow keys to move vertical or waveform cursors and the up and down arrow keys for horizontal cursors.

 Settings Pane

 Measurements Pane

Signal Statistics Panel

The Signal Statistics panel displays the maximum, minimum, peak-to-peak difference, mean, median, and RMS values of a selected signal. It also shows the x-axis indices at which the maximum and minimum values occur. You can choose to hide or display the Signal Statistics panel. In the Scope menu, select Tools > Measurements > Signal Statistics. Alternatively, in the scope toolbar, click the Signal Statistics button.

 Signal Statistics Measurements

When you use the zoom options in the Scope, the Signal Statistics measurements automatically adjust to the time range shown in the display. In the Scope toolbar, click the Zoom In or Zoom X button to constrict the x-axis range of the display, and the statistics shown reflect this time range. For example, you can zoom in on one pulse to make the Signal Statistics panel display information about only that particular pulse.

The Signal Statistics measurements are valid for any units of the input signal. The letter after the value associated with each measurement represents the appropriate International System of Units (SI) prefix, such as m for milli-. For example, if the input signal is measured in volts, an m next to a measurement value indicates that this value is in units of millivolts. The SI prefixes are shown in the following table:

AbbreviationNameMultiplier
aatto10^-18
ffemto10^-15
ppico10^–12
nnano10^-9
umicro10^-6
mmilli10^-3
  10^0
kkilo10^3
Mmega10^6
Ggiga10^9
Ttera10^12
Ppeta10^15
Eexa10^18

Bilevel Measurements Panel

The Bilevel Measurements panel shows information about a selected signal's transitions, overshoots or undershoots, and cycles. You can choose to hide or display the Bilevel Measurements panel. In the Scope menu, select Tools > Measurements > Bilevel Measurements. Alternatively, in the Scope toolbar, you can select the Bilevel Measurements button.

The Bilevel Measurements panel is separated into four panes, labeled Settings, Transitions, Overshoots / Undershoots, and Cycles. You can expand each pane to see the available options.

 Settings Pane

 Transitions Pane

 Overshoots/Undershoots

 Cycles

When you use the zoom options in the Scope, the bilevel measurements automatically adjust to the time range shown in the display. In the Scope toolbar, click the Zoom In or Zoom X button to constrict the x-axis range of the display, and the statistics shown reflect this time range. For example, you can zoom in on one rising edge to make the Bilevel Measurements panel display information about only that particular rising edge. However, this feature does not apply to the High and Low measurements.

Peak Finder Panel

The Peak Finder panel displays the maxima, showing the x-axis values at which they occur. This panel allows you to modify the settings for peak threshold, maximum number of peaks, and peak excursion. You can choose to hide or display the Peak Finder panel. In the scope menu, select Tools > Measurements > Peak Finder. Alternatively, in the scope toolbar, select the Peak Finder button.

The Peak finder panel is separated into two panes, labeled Settings and Peaks. You can expand each pane to see the available options.

 Settings Pane

 Peaks Pane

The Peak Finder displays the peak values in the Peaks pane. By default, the Peak Finder panel displays the largest calculated peak values in the Peaks pane in decreasing order of peak height. Use the sort descending button ( ) to rearrange the category and order by which Peak Finder displays peak values. Click this button again to sort the peaks in ascending order instead. When you do so, the arrow changes direction to become the sort ascending button ( ). A filled sort button indicates that the peak values are currently sorted in the direction of the button arrow. If the sort button is not filled ( ), then the peak values are sorted in the opposite direction of the button arrow. The Max Num of Peaks parameter still controls the number of peaks listed.

Use the check boxes to control which peak values are shown on the display. By default, all check boxes are cleared and the Peak Finder panel hides all the peak values. To show all the peak values on the display, select the check box in the top-left corner of the Peaks pane. To hide all the peak values on the display, clear this check box. To show an individual peak, select the check box directly to the left of its Value listing. To hide an individual peak, clear the check box directly to the left of its Value listing.

The Peaks are valid for any units of the input signal. The letter after the value associated with each measurement indicates the abbreviation for the appropriate International System of Units (SI) prefix, such as m for milli-. For example, if the input signal is measured in volts, an m next to a measurement value indicates that this value is in units of millivolts.

AbbreviationNameMultiplier
aatto10^–18
ffemto10^–15
ppico10^–12
nnano10^–9
umicro10^–6
mmilli10^–3
  10^0
kkilo10^3
Mmega10^6
Ggiga10^9
Ttera10^12
Ppeta10^15
Eexa10^18

Configuration Properties Dialog Box

The Configuration Properties dialog box controls various properties about the Time Scope displays. From the Time Scope menu, select View > Configuration Properties to open this dialog box. Alternatively, in the Time Scope toolbar, click the Configuration Properties button.

Main Pane

The Main pane of the Configuration Properties dialog box appears as follows.

Open at simulation start

Select this check box to ensure that the scope opens when the simulation starts. The following table summarizes the interaction between the Open at simulation start check box and the Scope figure.

Open at simulation startScope figure status when model savedScope figure opens
CheckedClosedAt simulation start
CheckedOpenAt model loading
Not checkedClosedOnly if you double-click the Scope block icon in the model
Not checkedOpenAt model loading

Display the full path in the title bar

Select this check box to display in the title bar the path of this scope in this model.

Number of input ports

Specify the number of input ports that should appear on the left side of the scope block.

Layout

Specify the arrangement of scope displays in the scope window. The display highlighted in blue is referred to as the active display. The scope dialog boxes reference the active display.

Buffer length

Specify the size of the buffer that the scope holds in its memory cache. If your signal has M rows of data and N data points in each row, M x N is the number of data points per time step. Multiply this result by the number of time steps for your model to obtain the required buffer length. For example, if you have 10 rows of data with each row having 100 data points and your run will be 10 time steps, you should enter 10,000 (which is 10 x 100 x 10) as the buffer length.

The default setting is 5000.

Sample time

Specify the sampling time in seconds. If you enter -1, the sample time of the input signal is used.

Input processing

Specify whether the Time Scope should treat the input signal as Columns as channels (frame based) or Elements as channels (sample based).

Frame-based processing is only available for discrete input signals. For more information about frame-based input channels, see the What Is Frame-Based Processing? section in the DSP System Toolbox™ documentation. For an example that uses the Time Scope block and frame-based input signals, see the Display Time-Domain Data section in the DSP System Toolbox documentation.

Maximize axes

Specify whether to display the scope in maximized axes mode. In this mode, each of the axes is expanded to fit into the entire display. To conserve space, labels do not appear in each display. Instead, tick-mark values appear on top of the plotted data. You can select one of the following options:

  • Auto — In this mode, the axes appear maximized in all displays only if the Title and YLabel properties are empty for every display. If you enter any value in any display for either of these properties, the axes are not maximized.

  • On — In this mode, the axes appear maximized in all displays. Any values entered into the Title and YLabel properties are hidden.

  • Off — In this mode, none of the axes appear maximized.

This property is Tunable.

The default setting is Auto.

Axes scaling

Specify when the scope should automatically scale the axes. You can select one of the following options:

  • Manual — When you select this option, the scope does not automatically scale the axes. You can manually scale the axes in any of the following ways:

    • Select Tools > Axes Scaling Properties.

    • Press one of the Scale Axis Limits toolbar buttons.

    • When the scope figure is the active window, press Ctrl and A simultaneously.

  • Auto — When you select this option, the scope scales the axes as needed, both during and after simulation. Selecting this option shows the Do not allow Y-axis limits to shrink check box.

  • After N Updates — Selecting this option causes the scope to scale the axes after a specified number of updates. Selecting this option shows the Number of updates edit box.

By default, this property is set to Auto. This property is Tunable.

    Note:   Click the link labeled Configure to the right of the Axes scaling property to see additional axes scaling properties. After you click this button, its label changes to Hide. To hide these additional properties, click the Hide link.

Number of updates

Enter the number of updates that occur before the scope scales the axes. This field shows only if you set Axes scaling to After N Updates.

Scale axes limits at stop

Select this check box to scale the axes when the simulation stops. The y-axis is always scaled. The x-axis limits are only scaled if you also select the Scale X-axis limits check box.

Do not allow Y-axis limits to shrink

When you select this property, the y-axis is allowed only to grow during axes scaling operations. If you clear this check box, the y-axis or color limits may shrink during axes scaling operations.

This property appears only when you select Auto for the Axis scaling property. When you set the Axes scaling property to Manual or After N Updates, the y-axis or color limits are allowed to shrink. Tunable.

Y-axis Data range (%)

Set the percentage of the y-axis that the scope should use to display the data when scaling the axes. Valid values are between 1 and 100. For example, if you set this property to 100, the Scope scales the y-axis limits such that your data uses the entire y-axis range. If you then set this property to 30, the scope increases the y-axis range such that your data uses only 30% of the y-axis range. Tunable.

Y-axis Align

Specify where the scope should align your data with respect to the y-axis when it scales the axes. You can select Top, Center, or Bottom. Tunable.

Autoscale X-axis limits

Check this box to allow the scope to scale the x-axis limits when it scales the axes. If Axes scaling is set to Auto, checking Scale X-axis limits only scales the data currently within the axes, not the entire signal in the data buffer. Tunable.

X-axis Data range (%)

Set the percentage of the x-axis that the Scope should use to display the data when scaling the axes. Valid values are between 1 and 100. For example, if you set this property to 100, the Scope scales the x-axis limits such that your data uses the entirex-axis range. If you then set this property to 30, the Scope increases the x-axis range such that your data uses only 30% of the x-axis range. Use the x-axis Align property to specify data placement with respect to the x-axis.

This property appears only when you select the Scale X-axis limits check box. Tunable.

X-axis Align

Specify how the Scope should align your data with respect to the x-axis: Left, Center, or Right. This property appears only when you select the Scale X-axis limits check box. Tunable.

Time Pane

The Time pane of the Configuration Properties dialog box appears as follows.

Time span

Specify the time span, either by selecting a predefined option or by entering a numeric value in seconds. You can select one of the following options:

  • Auto — In this mode, Time Scope automatically calculates the appropriate value for time span.

    The Time Scope block calculates the minimum and maximum time-axis limits as follows:

    • Minimum time-axis limit = Simulation Start time

    • Maximum time-axis limit = Simulation Stop time + max(FrameRate * (FrameSize–1) / FrameSize)

    FrameSize is a vector equal to the number of rows in each input signal. FrameRate is the reciprocal of the sample time for each frame. The Time Scope System object calculates the minimum and maximum time-axis limits as follows:

    • Minimum time-axis limit = min(TimeDisplayOffset)

    • Maximum time-axis limit = max(TimeDisplayOffset) + max(1/SampleRate.*FrameSize)

    where TimeDisplayOffset and SampleRate are the values of their respective properties. This property is Tunable.

  • One frame period — In this mode, the Time Scope uses the frame period of the input signal to the Time Scope block. This option is only available when the Input processing parameter is set to Columns as channels (frame based). This option is not available when you set the Input processing parameter to Elements as channels (sample based).

  • <user defined> — In this mode, you specify the time span by replacing the text <user defined> with a numeric value in seconds.

The scope sets the time-axis limits using the value of this property and the value of the Time display offset property. For example, if you set the Time display offset to 5e-6 and the Time span to 25e-6, the scope sets the time-axis limits as shown in the following figure.

This property is Tunable.

Time span overrun action

Specify how the scope displays new data beyond the visible time span. You can select one of the following options:

  • Wrap — In this mode, the scope displays new data until the data reaches the maximum time-axis limit. When the data reaches the maximum time-axis limit of the scope window, the scope clears the display. The scope then updates the time offset value and begins displaying subsequent data points starting from the minimum time-axis limit.

  • Scroll — In this mode, the scope scrolls old data to the left to make room for new data on the right side of the scope display. This mode is graphically intensive and can affect run-time performance. However, it is beneficial for debugging and monitoring time-varying signals.

This property is Tunable.

The default setting is Wrap.

Time units

Specify the units used to describe the time-axis. You can select one of the following options:

  • Metric — In this mode, the scope converts the times on the time-axis to the most appropriate measurement units. These can include milliseconds, microseconds, nanoseconds, minutes, days, etc. The scope chooses the appropriate measurement units based on the minimum time-axis limit and the maximum time-axis limit of the scope window.

  • Seconds — In this mode, the scope always displays the units on the time-axis as seconds.

  • None — In this mode, the scope does not display any units on the time-axis. The scope only shows the word Time on the time-axis.

This property is Tunable.

The default setting is Metric.

Time display offset

This property allows you to offset the values displayed on the time-axis by a specified number of seconds. When you specify a scalar value, the scope offsets all channels equally. When you specify a vector of offset values, the scope offsets each channel independently. Tunable.

When you specify a Time display offset vector of length N, the scope offsets the input channels as follows:

  • When N is equal to the number of input channels, the scope offsets each channel according to its corresponding value in the offset vector.

  • When N is less than the number of input channels, the scope applies the values you specify in the offset vector to the first N input channels. The scope does not offset the remaining channels.

  • When N is greater than the number of input channels, the scope offsets each input channel according to the corresponding value in the offset vector. The scope ignores all values in the offset vector that do not correspond to a channel of the input.

The scope computes the time-axis range using the values of the Time display offset and Time span properties. For example, if you set the Time display offset to 5e-6 and the Time span to 25e-6, the scope sets the time-axis limits as shown in the following figure.

Similarly, when you specify a vector of values, the scope sets the minimum time-axis limit using the smallest value in the vector. To set the maximum time-axis limit, the scope sums the largest value in the vector with the value of the Time span property. For more information, see Signal Display.

Time-axis labels

Specify how to display the time units used to describe the time-axis. The default setting is All. You can select one of the following options:

  • All — The time-axis labels appear in all displays.

  • None — The time-axis labels do not appear in the displays.

  • Bottom Displays Only — The time-axis labels appear in only the bottom row of the displays.

Tunable.

Show time-axis label

Select this check box to show the time-axis label on the scope display. This check box is not available if Time-axis labels is None.

Display Pane

The Display pane of the Configuration Properties dialog box appears as follows.

Active display

Specify the active display as an integer to get and set relevant properties. The number of a display corresponds to its column-wise placement index. Set this property to control which display should have its axes colors, line properties, marker properties, and visibility changed. Tunable

When you use the Layout option to tile the window into multiple displays, the display highlighted in blue is referred to as the active display. The default setting is 1.

Title

Specify the active display title as a string. Enter %<SignalLabel> to use the signal labels in the Simulink Model as the axes titles. By default, the active display has no title. Tunable.

Show legend

Select this check box to show the legend in the display. The channel legend displays a name for each channel of each input signal. When the legend appears, you can place it anywhere inside of the scope window. To turn the legend off, clear the Show legend check box. This parameter applies only when the Spectrum Type is Power or Power density. Tunable

You can edit the name of any channel in the legend. To do so, double-click the current name, and enter a new channel name. By default, the scope names each channel according to either its signal name or the name of the block from which it comes. If the signal has multiple channels, the scope uses an index number to identify each channel of that signal.

To change the appearance of any channel of any input signal in the scope window, from the menu, select View > Style.

Show grid

When you select this check box, a grid appears in the display of the scope figure. To hide the grid, clear this check box. Tunable

Plot signals as magnitude and phase

When you select this check box, the scope splits the display into a magnitude plot and a phase plot. By default, this check box is cleared. If the input signal is complex valued, the scope plots the real and imaginary portions on the same axes. These real and imaginary portions appear as different-colored lines on the same axes, as shown in the following figure.

Selecting this check box and clicking the Apply or OK button changes the display. The magnitude of the input signal appears on the top axes and its phase, in degrees, appears on the bottom axes. See the following figure.

This feature is particularly useful for complex-valued input signals. If the input is a real-valued signal, selecting this check box returns the absolute value of the signal for the magnitude. The phase is 0 degrees for nonnegative input and 180 degrees for negative input. Tunable

Y-limits (Minimum)

Specify the minimum value of the y-axis. Tunable

When you select the Plot signal(s) as magnitude and phase check box, the value of this property always applies to the magnitude plot on the top axes. The phase plot on the bottom axes is always limited to a minimum value of -180 degrees.

Y-limits (Maximum)

Specify the maximum value of the y-axis. Tunable

When you select the Plot signal(s) as magnitude and phase check box, the value of this property always applies to the magnitude plot on the top axes. The phase plot on the bottom axes is always limited to a maximum value of 180 degrees.

Y-label

Specify as a string the text for the scope to display to the left of the y-axis. Tunable

This property becomes invisible when you select the Plot signal(s) as magnitude and phase check box. When you enable that property, the y-axis label always appears as Magnitude on the top axes and Phase on the bottom axes.

Logging Pane

The Logging pane of the Configuration Properties dialog box appears as follows.

Log data to workspace

When you select this check box, the scope logs data in the format you select in Save format.

The default setting is unchecked and no data is logged.

Variable name

Specify as a string the name of the variable in the MATLAB workspace to which the scope logs data. Any existing variable is overwritten.

Save format

Select the format in which to save logged data. Unless otherwise noted, you can save logged data for single- and multi-port data, sample-based and frame-based data, variable-size data, MAT-file logging, and external mode archiving. Valid values for Save format are:

  • Structure With Time — Save logged data as a structure with associated time information to the MATLAB workspace. Structure With Time format does not support single- or multi-port frame-based data.

  • Structure — Save logged data as a structure to the MATLAB workspace. Structure format does not support multi-port, frame-based data.

  • Array — Save logged data as an array with associated time information to the MATLAB workspace. Array format does not support multi-port sample-based data, single- or multi-port frame-based data, or variable-size data.

  • Dataset — Save logged data as a dataset object to the MATLAB workspace. Dataset format does not support variable-size data, MAT-file logging, or external mode archiving. See Simulink.SimulationData.Dataset for information.

Limit data points to last

When you select this check box, the scope limits the number of data points that it stores in a variable. Specify as a positive integer the number of data points at the end of the simulation data that the scope logs.

The default setting is unchecked, so that all data is logged. When checked, the default is the last 5000 data points.

Decimation

When you select this check box, the scope logs every Nth data point, where N is the decimation factor you specify.

The default setting is unchecked, so that logged data is not decimated. When checked, the default decimation rate is 2.

Style Dialog Box

In the Style dialog box, you can customize the style of displays. You can change the color of the figure containing the displays, the background and foreground colors of display axes, and properties of lines in a display. From the scope menu, select View > Style or select the Style button ( ) in the dropdown below the Configuration Properties button to open this dialog box.

Properties

The Style dialog box allows you to modify the following properties of the scope figure:

Figure color

Specify the color that you want to apply to the background of the scope figure. By default, the figure color is gray.

Plot type

Specify the type of plot to use. The default setting is Line. Valid values for Plot type are:

  • Line — Displays input signal as lines connecting each of the sampled values. This approach is similar to the functionality of the MATLAB line or plot function.

  • Stairs — Displays input signal as a stairstep graph. A stairstep graph is made up of only horizontal lines and vertical lines. Each horizontal line represents the signal value for a discrete sample period and is connected to two vertical lines. Each vertical line represents a change in values occurring at a sample. This approach is equivalent to the MATLAB stairs function. Stairstep graphs are useful for drawing time history graphs of digitally sampled data.

  • Auto — Displays input signal as a line graph if it is a continuous signal and displays input signal as a stairstep graph if it is a discrete signal.

This property is Tunable.

Active display

Specify the active display as an integer to get and set relevant properties. The number of a display corresponds to its column-wise placement index. Set this property to control which display should have its axes colors, line properties, marker properties, and visibility changed. Tunable

When you use the Layout option to tile the window into multiple displays, the display highlighted in blue is referred to as the active display. The default setting is 1.

Axes colors

Specify the color that you want to apply to the background of the axes for the active display.

Properties for line

Specify the signal for which you want to modify the visibility, line properties, and marker properties.

Visible

Specify whether the selected signal on the active display should be visible. If you clear this check box, the line disappears.

Line

Specify the line style, line width, and line color for the selected signal on the active display.

Marker

Specify marks for the selected signal on the active display to show at data points. This property is similar to the Marker property for the MATLAB Handle Graphics® plot objects. You can choose any of the marker symbols from the following table.

SpecifierMarker Type
noneNo marker (default)
Circle
Square
Cross
Point
Plus sign
Asterisk
Diamond
Downward-pointing triangle
Upward-pointing triangle
Left-pointing triangle
Right-pointing triangle
Five-pointed star (pentagram)
Six-pointed star (hexagram)

Stepping Options

The Simulation Stepping Options dialog box lets you control the simulation behavior. You can pause the simulation at a specified time, enable stepping back, or specify options for stepping back. You can also modify the number of steps by which to step forward or backward. To open this dialog box, in the Time Scope menu, select Simulation > Stepping Options to open this dialog box. Alternatively, if stepping back is disabled, in the Time Scope toolbar, click the step back button.

The Simulation Stepping Options dialog box is not unique to Time Scope; it can also be launched from any Simulink model. To open this dialog box from any Simulink model, select Simulation > Stepping Options. For more information, see How Simulation Stepper Helps With Model Analysis and Simulation Stepping Options in the Simulink documentation.

Enable stepping back

Select this check box to enable the Time Scope to take steps back in time. When selected, Time Scope enables the step back button ( ) on the simulation toolbar.

Maximum number of saved back steps

Specify the maximum number of back steps that the Time Scope saves in memory. To maximize simulation speed, the value for this property should be kept small. The default setting is 10.

Interval between stored back steps

Specify the number of steps between back steps that the Time Scope saves in memory for stepping backward. Set this property to a larger number to increase the time span of a back step without increasing the amount of memory used. The default setting is 1.

Move back/forward by

Specify the number of steps forward or backward that the Scope progresses when you click the step forward ( ) and step back ( ) buttons. The default setting is 1.

Pause simulation when time reaches

Select this check box to enable the Scope to pause the simulation when it reaches a specified time.

Pause simulation when time reaches

Specify the time at which you want Scope to pause when the check box is selected.

Tools—Axes Scaling Properties

Select Tools > Axes Scaling Properties to open the Axes Scaling Properties dialog box. This dialog box provides you with the ability to automatically zoom in on and zoom out of your data, and to scale the axes of the Scope.

Properties

The Tools—Axes Scaling Properties dialog box appears as follows.

Axes scaling

Specify when the scope should automatically scale the axes. You can select one of the following options:

  • Manual — When you select this option, the scope does not automatically scale the axes. You can manually scale the axes in any of the following ways:

    • Select Tools > Axes Scaling Properties.

    • Press one of the Scale Axis Limits toolbar buttons.

    • When the scope figure is the active window, press Ctrl and A simultaneously.

  • Auto — When you select this option, the scope scales the axes as needed, both during and after simulation. Selecting this option shows the Do not allow Y-axis limits to shrink check box.

  • After N Updates — Selecting this option causes the scope to scale the axes after a specified number of updates. Selecting this option shows the Number of updates edit box.

By default, this property is set to Auto. This property is Tunable.

Do not allow Y-axis limits to shrink

When you select this property, the y-axis is allowed only to grow during axes scaling operations. If you clear this check box, the y-axis or color limits may shrink during axes scaling operations.

This property appears only when you select Auto for the Axis scaling property. When you set the Axes scaling property to Manual or After N Updates, the y-axis or color limits are allowed to shrink. Tunable.

Number of updates

Specify as a positive integer the number of updates after which to scale the axes. This property appears only when you select After N Updates for the Axes scaling property. Tunable.

Scale axes limits at stop

Select this check box to scale the axes when the simulation stops. The y-axis is always scaled. The x-axis limits are only scaled if you also select the Scale X-axis limits check box.

Y-axis Data range (%)

Set the percentage of the y-axis that the scope should use to display the data when scaling the axes. Valid values are between 1 and 100. For example, if you set this property to 100, the Scope scales the y-axis limits such that your data uses the entire y-axis range. If you then set this property to 30, the scope increases the y-axis range such that your data uses only 30% of the y-axis range. Tunable.

Y-axis Align

Specify where the scope should align your data with respect to the y-axis when it scales the axes. You can select Top, Center, or Bottom. Tunable.

Autoscale X-axis limits

Check this box to allow the scope to scale the x-axis limits when it scales the axes. If Axes scaling is set to Auto, checking Scale X-axis limits only scales the data currently within the axes, not the entire signal in the data buffer. Tunable.

X-axis Data range (%)

Set the percentage of the x-axis that the Scope should use to display the data when scaling the axes. Valid values are between 1 and 100. For example, if you set this property to 100, the Scope scales the x-axis limits such that your data uses the entirex-axis range. If you then set this property to 30, the Scope increases the x-axis range such that your data uses only 30% of the x-axis range. Use the x-axis Align property to specify data placement with respect to the x-axis.

This property appears only when you select the Scale X-axis limits check box. Tunable.

X-axis Align

Specify how the Scope should align your data with respect to the x-axis: Left, Center, or Right. This property appears only when you select the Scale X-axis limits check box. Tunable.

Supported Data Types

PortSupported Data Types

Input

  • Double-precision floating point

  • Single-precision floating point

  • Fixed point (signed and unsigned)

  • Boolean

  • 8-, 16-, and 32-bit signed integers

  • 8-, 16-, and 32-bit unsigned integers

  • Simulink enumerations

Supported Simulation Modes

You can use the scope block in models running the following supported simulation modes.

ModeSupportedNotes and Limitations

Normal

Yes

 

Accelerator

Yes

 

Rapid Accelerator

Yes

You can use Rapid Accelerator mode as a method to increase the execution speed of your Simulink model. Rapid Accelerator mode creates an executable that includes the solver and model methods. This executable resides outside MATLAB and Simulink. Rapid Accelerator mode uses External mode to communicate with Simulink. For more information about Rapid Accelerator mode, see Acceleration in the Simulink documentation.

PIL

No

 

SIL

No

 

External

Yes

You can use External mode to tune block parameters in real time and view block outputs in many types of blocks and subsystems. External mode establishes communication between a host system, where the Simulink environment resides, and a target system, where the executable runs after it is generated by the code generation and build process. For more information about External mode, see Host/Target Communication in the Simulink Coder™ documentation.

The scope does not support data archiving. See Set External Mode Data Archiving Parameters in the Real-Time Windows Target™ documentation.

For more information about these modes, see How Acceleration Modes Work in the Simulink documentation.

Was this topic helpful?