Bird
Raised Fist0
Simulinkdata~10 mins

Sink blocks (Scope, Display, To Workspace) in Simulink - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - Sink blocks (Scope, Display, To Workspace)
Simulink Model Runs
↓
Signal Generated
↓
Signal Sent to Sink Block
↓
Scope: Visualize Signal
↓
Display: Show Numeric Value
↓
To Workspace: Save Data
↓
End of Simulation
The model runs and generates signals that are sent to sink blocks. Each sink block handles the signal differently: Scope shows a graph, Display shows a number, and To Workspace saves data for later use.
Execution Sample
Simulink
signal = sin(t);
scope(signal);
display(signal);
to_workspace(signal);
Simulink sends a sine wave signal to Scope, Display, and To Workspace blocks to visualize, show, and save the data.
Execution Table
StepSignal Value (t)Scope OutputDisplay OutputTo Workspace OutputAction
10.0Plot point at 0.00.0[0.0]Signal generated and sent to sinks
20.5Plot point at 0.4790.479[0.0, 0.479]Signal updated and sinks updated
31.0Plot point at 0.8410.841[0.0, 0.479, 0.841]Signal updated and sinks updated
41.5Plot point at 0.9970.997[0.0, 0.479, 0.841, 0.997]Signal updated and sinks updated
52.0Plot point at 0.9090.909[0.0, 0.479, 0.841, 0.997, 0.909]Signal updated and sinks updated
62.5Plot point at 0.5980.598[0.0, 0.479, 0.841, 0.997, 0.909, 0.598]Signal updated and sinks updated
73.0Plot point at 0.1410.141[0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141]Signal updated and sinks updated
83.5Plot point at -0.350-0.350[0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141, -0.350]Signal updated and sinks updated
94.0Plot point at -0.757-0.757[0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141, -0.350, -0.757]Signal updated and sinks updated
104.5Plot point at -0.977-0.977[0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141, -0.350, -0.757, -0.977]Signal updated and sinks updated
115.0Plot point at -0.959-0.959[0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141, -0.350, -0.757, -0.977, -0.959]Simulation ends
💡 Simulation ends after final time step; all sink blocks have received and processed the signal.
Variable Tracker
VariableStartAfter 1After 2After 3After 4After 5After 6After 7After 8After 9After 10Final
signal(t)0.00.4790.8410.9970.9090.5980.141-0.350-0.757-0.977-0.959-0.959
Scope OutputPlot point at 0.0Plot point at 0.479Plot point at 0.841Plot point at 0.997Plot point at 0.909Plot point at 0.598Plot point at 0.141Plot point at -0.350Plot point at -0.757Plot point at -0.977Plot point at -0.959Plot point at -0.959
Display Output0.00.4790.8410.9970.9090.5980.141-0.350-0.757-0.977-0.959-0.959
To Workspace Output[0.0][0.0, 0.479][0.0, 0.479, 0.841][0.0, 0.479, 0.841, 0.997][0.0, 0.479, 0.841, 0.997, 0.909][0.0, 0.479, 0.841, 0.997, 0.909, 0.598][0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141][0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141, -0.350][0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141, -0.350, -0.757][0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141, -0.350, -0.757, -0.977][0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141, -0.350, -0.757, -0.977, -0.959][0.0, 0.479, 0.841, 0.997, 0.909, 0.598, 0.141, -0.350, -0.757, -0.977, -0.959, -0.959]
Key Moments - 3 Insights
Why does the Display block only show one number at a time, while the To Workspace block saves many?
The Display block shows the current signal value at each step (see execution_table Display Output column), while the To Workspace block collects all values over time into an array (see To Workspace Output column).
How does the Scope block show the signal over time?
The Scope block plots each signal value as a point on a graph at each time step (execution_table Scope Output). It accumulates points to show the signal's shape over time.
What happens if the simulation stops before the final time?
The sink blocks will only have data up to the last simulation step (see exit_note). The To Workspace block will save fewer points, and Scope and Display will show data only up to that point.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table at Step 5. What is the Display Output value?
A0.997
B0.909
C0.598
D0.841
💡 Hint
Check the Display Output column at Step 5 in the execution_table.
At which step does the To Workspace Output first contain 5 values?
AStep 3
BStep 7
CStep 5
DStep 10
💡 Hint
Look at the length of the array in To Workspace Output column in execution_table.
If the simulation ended at Step 6, what would be the last value in the Scope Output?
APlot point at 0.598
BPlot point at 0.141
CPlot point at 0.909
DPlot point at 0.997
💡 Hint
Check Scope Output at Step 6 in the execution_table.
Concept Snapshot
Sink blocks receive signals in Simulink models.
Scope shows signal as a graph over time.
Display shows the current numeric value.
To Workspace saves all signal values for later use.
They help visualize and save simulation data easily.
Full Transcript
In Simulink, sink blocks like Scope, Display, and To Workspace receive signals from the model. The Scope block plots the signal over time, showing how it changes. The Display block shows the current value of the signal at each simulation step. The To Workspace block saves all the signal values into an array for later analysis. During simulation, the signal updates at each time step, and all sink blocks update accordingly. When the simulation ends, the data collected by these blocks can be viewed or used for further processing.

Practice

(1/5)
1. Which Simulink sink block is best for showing a live numeric value during simulation?
easy
A. Display block
B. Scope block
C. To Workspace block
D. Gain block

Solution

  1. Step 1: Understand the purpose of Display block

    The Display block shows numeric values updating live during simulation.
  2. Step 2: Compare with other sink blocks

    Scope shows graphs, To Workspace saves data, Gain modifies signals, so they don't show live numbers directly.
  3. Final Answer:

    Display block -> Option A
  4. Quick Check:

    Live numeric value = Display block [OK]
Hint: Display shows live numbers; Scope shows graphs [OK]
Common Mistakes:
  • Confusing Scope with Display
  • Thinking To Workspace shows live values
  • Selecting Gain which is not a sink block
2. Which of the following is the correct way to configure a To Workspace block to save data as a structure?
easy
A. Set 'Save format' to 'Array'
B. Set 'Save format' to 'Timeseries'
C. Set 'Save format' to 'Structure with time'
D. Set 'Save format' to 'Matrix'

Solution

  1. Step 1: Identify the save format options in To Workspace block

    To Workspace block allows saving data as Array, Structure with time, Timeseries, or Matrix.
  2. Step 2: Choose the option that saves data as a structure

    'Structure with time' saves data as a structure containing time and signals.
  3. Final Answer:

    Set 'Save format' to 'Structure with time' -> Option C
  4. Quick Check:

    Structure save format = 'Structure with time' [OK]
Hint: Structure format is named 'Structure with time' in To Workspace [OK]
Common Mistakes:
  • Choosing 'Array' which saves plain arrays
  • Confusing 'Timeseries' with structure
  • Selecting 'Matrix' which is not a valid option
3. Given this Simulink model snippet:
Signal -> To Workspace block (Save format: Array)

After simulation, what is the format of the saved data in MATLAB workspace?
medium
A. A numeric array containing signal values only
B. A structure with time and signals fields
C. A timeseries object with time and data
D. A cell array with signal data

Solution

  1. Step 1: Understand 'Array' save format in To Workspace block

    When 'Array' is selected, only the signal values are saved as a numeric array without time info.
  2. Step 2: Compare with other formats

    Structure and Timeseries formats include time; cell arrays are not used here.
  3. Final Answer:

    A numeric array containing signal values only -> Option A
  4. Quick Check:

    Save format 'Array' = numeric array [OK]
Hint: Array format saves only values, no time info [OK]
Common Mistakes:
  • Assuming time is saved with Array format
  • Confusing Array with Timeseries
  • Expecting a structure instead of array
4. You added a Scope block but see no graph during simulation. What is the most likely cause?
medium
A. The simulation time is zero
B. The Display block is missing
C. The To Workspace block is set to 'Array' format
D. The Scope block is not connected to any signal

Solution

  1. Step 1: Check Scope block connection

    Scope requires a connected signal to display data; no connection means no graph.
  2. Step 2: Evaluate other options

    Display block absence doesn't affect Scope; To Workspace format doesn't affect Scope display; simulation time zero means no data but usually simulation runs longer.
  3. Final Answer:

    The Scope block is not connected to any signal -> Option D
  4. Quick Check:

    Scope needs signal connection [OK]
Hint: Scope shows graphs only if connected to signals [OK]
Common Mistakes:
  • Thinking Display block affects Scope
  • Confusing To Workspace settings with Scope display
  • Ignoring signal connections
5. You want to analyze simulation data after running a model. Which sink block should you use to save the data for MATLAB post-processing, and how should you configure it to include time information?
hard
A. Use Scope block; enable data logging
B. Use To Workspace block; set 'Save format' to 'Structure with time'
C. Use Display block; no configuration needed
D. Use To Workspace block; set 'Save format' to 'Array'

Solution

  1. Step 1: Identify the sink block for saving data

    To Workspace block is designed to save simulation data to MATLAB workspace for post-processing.
  2. Step 2: Choose the save format to include time

    Setting 'Save format' to 'Structure with time' saves both signal data and time stamps.
  3. Final Answer:

    Use To Workspace block; set 'Save format' to 'Structure with time' -> Option B
  4. Quick Check:

    Save data with time = To Workspace + 'Structure with time' [OK]
Hint: To save with time, use To Workspace + 'Structure with time' [OK]
Common Mistakes:
  • Using Display or Scope blocks to save data
  • Choosing 'Array' format which lacks time info
  • Not configuring save format properly
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard