Floating Scope and Scope Viewer
Display signals generated during simulation without signal lines
Libraries:
Simulink /
Sinks
HDL Coder /
Sinks
Description
The Simulink® Scope Viewer and Floating Scope block display time domain signals with respect to simulation time. The Scope Viewer and Floating Scope block have the same functionality as the Scope block, but they are not connected to signal lines.
Scope Tab
This screenshot highlights the important aspects of the scope window.
Scope display features:
Simulation control — Run and debug models from a Scope window using Run, Step Forward, and Step Backward toolbar buttons.
Multiple signals — Plot multiple signals on the same display.
Multiple displays — Display signals on multiple subplots. All the y-axes of the subplots have a common time range on the x-axis. Control the layout of the subplots using the Display Grid parameter in the Scope tab of the toolstrip.
Modify parameters — Modify scope parameter values before and during a simulation.
Axis autoscaling — Autoscale axes during or at the end of a simulation. Margins are drawn at the top and bottom of the axes.
Display data after simulation — Scope data is saved during a simulation. If a scope is closed at the start of a simulation, when you open the scope after a simulation, the scope displays simulation results for attached input signals.
Note
If you have a high sample rate or long simulation time, you may run into issues with memory or system performance because the scope saves data internally. To limit the amount of data saved for scope visualization, use the
Limit data points to last
property.Scope window management –– Use the new scope container to dock multiple scope windows into a single window and to manage and organize the scopes. The scope container also enables you to view all the scopes in the model in a single window.
Measurements Tab
This screenshot highlights the important aspects of the measurements window.
Here is a list of all the measurements the Scope Viewer and Floating Scope block supports:
Triggers — Set triggers on repeating signals and pause the display when events occur.
Cursor Measurements — Measure signal values using vertical and horizontal cursors.
Signal Statistics — Display the maximum, minimum, peak-to-peak difference, mean, median, and RMS values of a selected signal.
Note
You must have a Simscape™ or DSP System Toolbox™ license to use the Peak Finder, Bilevel Measurements, and Signal Statistics.
Peak Finder — Find maxima, showing the x-axis values at which they occur.
Bilevel Measurements — Measure transitions, overshoots, undershoots, and cycles.
You must have a Simscape or DSP System Toolbox license to use the Peak Finder, Bilevel Measurements, and Signal Statistics.
For information on controlling a Floating Scope block from the command line, see Control Scope Blocks Programmatically.
Connect Signals
In the Floating Scope window or Scope viewer window, use the button to connect signals.
To add a viewer with a connected signal, select a signal in the model. Then, on the Simulation tab, in the Prepare gallery, click Add Viewer.
For more details, see Add Signals to Existing Floating Scope or Scope Viewer.
Key Features
Multiple y-axes (displays) — Display multiple y-axes. All the y-axes have a common time range on the x-axis.
Multiple signals — Show multiple signals on the same y-axis (display).
Modify parameters — Modify scope parameter values before and during a simulation.
Display data after simulation — If a scope is closed at the start of a simulation, scope data is still written to the scope during the simulation. If you open the scope after a simulation, the scope displays simulation results for input signals.
Examples
Limitations
When you use model configuration parameters that optimize the simulation, such as Signal storage reuse or Block reduction, Simulink eliminates storage for some signals during simulation. You are unable to apply a Floating Scope to these eliminated signals. To work around this issue, configure an eliminated signal as a test point. You can then apply a Floating Scope to the signal regardless of optimization settings. To configure test points, see Configure Signals as Test Points.
If you step back the simulation after adding or removing a signal, the Floating Scope clears the existing data. New data does not appear until the simulation steps forward again.
When connected to a constant signal, the scope plots a single point.
Simulink messages are not supported for Floating Scope block and Scope Viewer.
You cannot connect signals from for-each subsystems.
Scope displays have limitations in Rapid Accelerator mode. See Behavior of Scopes and Viewers with Rapid Accelerator Mode
Ports
Input
Properties
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|