TimeScopeConfiguration
Control Scope block appearance and behavior
Description
Scope configuration properties control the appearance and behavior of a scope
block. Create a scope configuration object with get_param
, and then
change property values using the object with dot notation.
Creation
myScopeConfiguration = get_param(gcbh,'ScopeConfiguration')
creates a scope configuration object for the selected scope block.
Properties
Name
— Title on a scope window
block name (default) | character vector | string scalar
Title on a scope window, specified as a character vector or string scalar.
Position
— Size and location of the scope
[left bottom width height]
Size and location of scope window, specified as a four-element vector consisting of the left, bottom, width, and height positions, in pixels.
By default, a scope window appears in the center of your screen with a
width of 560
pixels and height of 420
pixels.
Visible
— Visibility of scope window
true (default)
| false
Set this property to true to make the scope window visible.
OpenAtSimulationStart
— Open scope when starting simulation
true
(default for Time Scope) | false
(default for Scope)
Set this property to true
to open the scope when the
simulation starts.
DisplayFullPath
— Display full path
false
(default) | true
Set this property to true
to display the full path of
the scope relative to the model on top of the scope window. If you set this
property to false
, only the name of the scope block
appears on top of the scope window.
PreserveColorsForCopyToClipboard
— Preserve colors for copy to clipboard
false
(default) | true
Set this property to true
to maintain the background
color of the scope and the signal colors while copying the scope to
clipboard. When you paste this scope to a document or print this scope, the
colors are retained. If you set this property to false
and copy the scope to clipboard, colors change to a toner friendly version
when you paste or print the scope.
NumInputPorts
— Number of input ports
'1'
(default) | character vector
Number of input ports on a scope block, specified as a character vector or string scalar. The maximum number of input ports is 96.
LayoutDimensions
— Number of display rows and columns
[1 1]
(default) | [numberOfRows numberOfColumns]
Number of display rows and columns, specified with as a two-element vector. The maximum layout dimension is 16-by-16.
If the number of displays is equal to the number of ports, signals from each port appear on separate displays.
If the number of displays is less than the number of ports, signals from additional ports appear on the last y-axis.
SampleTime
— Time interval
'-1'
(default) | character vector | string scalar
Time interval between Scope block updates during a simulation, specified as a character vector or string scalar. This property does not apply to floating scopes and scope viewers.
FrameBasedProcessing
— Frame-based processing of signals
false
(default for Time Scope block) | true
(default for Scope block)
Set this property to true
to process signals as
frame-based.
false
— Process signal values in a channel at each time interval (sample based).true
— Process signal values in a channel as a group of values from multiple time intervals (frame based). Frame-based processing is available only with discrete input signals.
MaximizeAxes
— Maximize size of signal plots
'Auto'
(default) | 'On'
| 'Off'
Specify whether or not to maximize the size of signal plots:
'Auto'
— IfTitle
andYLabel
are not specified, maximize all plots.'On'
— Maximize all plots. Values inTitle
andYLabel
are hidden.'Off'
— Do not maximize plots.
Each of the plots expands to fit the full display. Maximizing the size of signal plots removes the background area around the plots.
MinimizeControls
— Hide menu and toolbar
false
(default) | true
Set this property to true
to hide the menu and
toolbar.
If you dock the scope, this property is inactive.
AxesScaling
— How to scale y-axes
'Manual'
(default) | 'Auto'
| 'Updates'
How to scale y-axes, specified as one of these values:
'Manual'
— Manually scale y-axes with the Scale Y-axis Limits button.'Auto'
— Scale y-axes during and after simulation.'Updates'
— Scale y-axes after specified number of block updates (time intervals).
Dependency
If this property is set to 'Updates'
, also specify
the property AxesScalingNumUpdates
AxesScalingNumUpdates
— Number of updates before scaling y-axes
'10'
(default) | character vector | string scalar
Number of updates before scaling y-axes, specified as a character vector or string scalar.
Dependency
Activate this property by setting AxesScaling to 'Updates'
.
TimeSpan
— Length of x-axis range to display
'0'
(default) | character vector | string scalar | 'Auto'
Length of x-axis range to display, specified as one of these values:
Positive real number — Any value less than the total simulation time specified as a character vector or string scalar.
'Auto'
— Difference between the simulation start and stop times.
The block calculates the beginning and end times of the
x-axis range using the
TimeDisplayOffset
and TimeSpan
properties. For example, if you set TimeDisplay
to
10
and the TimeSpan
to
20
, the scope sets the x-axis
range from 10
to 30
.
TimeSpanOverrunAction
— How to display data
'Wrap'
(default) | 'Scroll'
How to display data beyond the visible x-axis range, specified as one of these values:
'Wrap'
— Draw a full screen of data from left to right, clear the screen, and then restart drawing of data.'Scroll'
— Move data to the left as new data is drawn on the right. This mode is graphically intensive and can affect run-time performance.
You can see the effects of this option only when plotting is slow with large models or small step sizes.
TimeUnits
— Units to display on the x-axis
'Metric'
(default for Time Scope block) | 'None'
(default for Scope block) | 'Seconds'
Units to display on the x-axis, specified as one of these values:
'Metric'
— Display time units based on the length of theTimeSpan
property.'None'
— DisplayTime
on the x-axis.'Seconds'
— DisplayTime (seconds)
on the x-axis.
TimeDisplayOffset
— x-axis range offset
'0'
(default) | character vector | string scalar
x-axis range offset number, specified as a character vector or string scalar. For input signals with multiple channels, enter a scalar or vector of offsets.
Scalar — Offset all channels of an input signal by the same value.
Vector — Independently offset the channels.
TimeAxisLabels
— How x-axis labels display
'All'
(default for Time Scope block) | 'Bottom'
(default for Scope block) | 'None'
How x-axis labels display, specified as one of these values:
'All'
— Display x-axis labels on all displays.'Bottom'
— Display x-axis labels only on the bottom display.'None'
— Do not display labels and deactivateShowTimeAxisLabel
property.
Dependency
Set the ActiveDisplay
property before specifying
this property.
Set ShowTimeAxisLabel
to true
and set Maximize axes
to
'Off'
.
ShowTimeAxisLabel
— Display or hide x-axis labels
true
(default for Time Scope block) | false
(default for Scope block)
Set this property to true
to display the
x-axis labels.
Dependency
Set the ActiveDisplay
property before setting
this property.
If this property is set to true
, also set
TimeAxisLabels
. If
TimeAxisLabels
is set to
'None'
, this property is inactive.
ActiveDisplay
— Display for setting display-specific properties
'1'
(default) | character vector
Display for setting display-specific properties, specified as a character vector or string. The number of a display corresponds to its column-wise placement index. For multi-column layouts, the displays are numbered down and then across.
Dependency
Setting this property selects the display for setting the properties
ShowGrid
,
ShowLegend
, Title
,
PlotAsMagnitudePhase
,
YLabel
, and
YLimits
.
Title
— Title for display
'%<SignalLabel>'
(default) | character vector | string scalar
Title for a display, specified as a character vector or string scalar. The
default value %<SignalLabel>
uses the input signal
name for the title.
Dependency
Set the ActiveDisplay
property before setting
this property.
ShowLegend
— Signal legend
false
(default) | true
Set this property to true
to display the legend.
Names listed in the legend are the signal names from the model. For signals with multiple channels, a channel index is appended after the signal name. See the Scope block reference for an example.
Dependency
Set the ActiveDisplay
property before setting
this property.
ShowGrid
— Vertical and horizontal grid lines
true
(default) | false
Set this property to true to display vertical and horizontal grid lines.
Dependency
Set the ActiveDisplay
property before setting this
property.
PlotAsMagnitudePhase
— Magnitude and phase plots
false
(default) | true
Specify whether or not to display the magnitude and phase plots:
false
— Display signal plot.If the signal is complex, plot the real and imaginary parts on the same y-axis (display).
true
— Display magnitude and phase plots.If the signal is real, plot the absolute value of the signal for the magnitude. The phase is 0 degrees for positive values and 180 degrees for negative values.
Dependency
Set the ActiveDisplay
property before setting
this property.
YLimits
— Minimum and maximum values of y-axis
[-10 10]
(default) | [ymin ymax]
Minimum and maximum values of y-axis, specified as a two-element numeric vector.
Dependency
Set the ActiveDisplay
property before setting
this property.
When PlotAsMagnitudePhase
is
true
, this property specifies the
y-axis limits for the magnitude plot. The
y-axis limits of the phase plot are always
[-180 180]
.
YLabel
— Y-axis label
''
(default) | character vector | string scalar
y-axis label for active display, specified as a character vector or string scalar.
Dependency
Set the ActiveDisplay
property before setting
this property.
If PlotAsMagnitudePhase
is
true
, the value of YLabel
is
hidden and plots are labeled Magnitude
and
Phase
.
DataLogging
— Save scope data
false
(default) | true
Set this property to true
to save scope data to a
variable in the MATLAB® workspace.
This property does not apply to floating scopes and scope viewers.
Dependency
If this property is set to true
, you must also
specify the properties DataLoggingVariableName
and
DataLoggingSaveFormat
.
DataLoggingVariableName
— Variable name for saving scope data
'ScopeData'
(default) | character vector | string scalar
Variable name for saving scope data in the MATLAB workspace, specified as a character vector or string scalar. This property does not apply to floating scopes and scope viewers.
Dependency
Activate this property by setting DataLogging
to
true
.
DataLoggingLimitDataPoints
— Limit buffered data
false
(default) | true
Set to true
to limit buffered data before plotting and
saving data.
For simulations with Stop time set to
inf
, always set this parameter to
true
.
Dependency
If this property is set to true
, also specify the
number of data values to plot and save with the property
DataLoggingMaxPoints
.
DataLoggingMaxPoints
— Maximum number of data values
'5000'
(default) | character vector | string scalar
Maximum number of data values to plot and save, specified as a character vector or string scalar. The data values that are plotted and saved are from the end of a simulation. For example, setting this property to 100 saves the last 100 data points.
Dependency
Activate this property by setting
DataLoggingLimitDataPoints
to
true
. Specifying this property limits the data
values a scope plots and the data values saved in the MATLAB variable specified in
DataLoggingVariableName
.
DataLoggingDecimateData
— Reduce scope data
false
(default) | true
Set this property to true
to reduce scope data before
plotting and saving.
Dependency
If this property is set to true
, you must also
specify the DataLoggingDecimation
property.
DataLoggingDecimation
— Decimation factor
'1'
(default) | character vector | string scalar
Decimation factor applied to the signal data before plotting and saving,
specified as a character vector or string scalar. The scope buffers every
Nth data point, where
N is the decimation factor you specify. A value of
1
buffers all data values.
Dependency
Activate this property by setting
DataLoggingDecimateData
to
true
.
DataLoggingSaveFormat
— Variable format for saving scope data
'Dataset'
(default) | 'Structure With Time'
| 'Structure'
| 'Array'
Variable format for saving scope data to the MATLAB workspace, specified as one of these values:
'Dataset'
— Save data as a dataset object. This format does not support variable-size data, MAT-file logging, or external mode archiving. SeeSimulink.SimulationData.Dataset
.'StructureWithTime'
— Save data as a structure with associated time information. This format does not support single- or multiport frame-based data, or multirate data.'Structure'
— Save data as a structure. This format does not support multirate data.'Array'
— Save data as an array with associated time information. This format does not support multiport sample-based data, single- or multiport frame-based data, variable-size data, or multirate data.
This property does not apply to floating scopes and scope viewers.
Dependency
Activate this property by setting DataLogging
to
true
.
Examples
Create Scope Configuration Object
This example creates a scope configuration object using the 'vdp' model which models the van der Pol equation.
open_system('vdp') myScopeConfiguration = get_param('vdp/Scope','ScopeConfiguration'); myScopeConfiguration.NumInputPorts = '2';
Version History
Introduced in R2013a
See Also
Scope | Floating Scope | Time Scope (DSP System Toolbox)
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)