Sinks Library The blocks in this library are mostly used for viewing data from the model.
Scope Scope plots inputs against time.
It has an extensive toolbar.
The magnifying glass icon allows you to zoom in and
out in the
𝑥
and
𝑦
direction simultaneously and
individually.
The hand allows you to pan or drag the plot around.
The scaling icons allow you to automatically scale axes individually or simultaneously in
the
𝑥
and
𝑦
directions.
The Cog icon opens a Configuration Menu. This allows you to set the:
number of input ports
layout of the plots
ranges of the axes
legend
enable data logging (see below)
The Logging Tab contains a tick box to ‘Log data to workspace’.
If this is enabled then whenever the simulation is run, a
variable is automatically populated in the MATLAB workspace.
You can name the variable and set the datatype.
Data Logging without Scope: To Workspace Block Data can also be sent to the MATLAB workspace using a To Workspace block. Any
input to the block is sent to the MATLAB workspace after the model has been run.
The variable name by default is ‘simout’ but can be changed along with data type.
See page 17 for more details.
Other Blocks in the Sinks Library Displays values in a textbox while the simulation is running.
Plots the top input X against lower input Y in a figure within Simulink.
Cannot easily change the axis labels or titles, so it is better to use the To
Workspace block to send data to MATLAB, then plot there.
Halts the simulation