Trace signals during simulation
Simulink / Dashboard
The Dashboard Scope block shows connected signals during simulation on a scope display. You can use the Dashboard Scope block with other Dashboard blocks to build an interactive dashboard of controls and indicators for your model. The Dashboard Scope block provides a complete picture of a signal's behavior over the course of the simulation. Use the Dashboard Scope block to display signals of any data type that Simulink® supports, including enumerated data types. The Dashboard Scope block can display up to eight signals from a matrix or bus.
Dashboard blocks do not use ports to connect to model elements. To connect dashboard blocks to signals in your model, use connect mode. Connect mode facilitates the process of connecting dashboard blocks in your model, especially when you want to connect multiple blocks at once. If you only want to connect a single dashboard block, you can also use the Connection table in the block dialog box.
Tip
You can modify dashboard block connections during normal and accelerator mode simulations.
To enter connect mode, select a dashboard block to connect and then on the block tab, click Connect. In connect mode, when you select one or more signals or blocks, a list of signals that are available for connection appears. Select a signal from the list to connect to the selected dashboard block. To connect another dashboard block, pause on the block you want to connect and click the Connect button above it. Then, select one or more signals and blocks in the model and choose a signal to connect.
When you finish connecting the dashboard blocks in your model, on the block tab, click Done Connecting.
Tip
You can hide the message shown on unconnected blocks using the
set_param
function with the
ShowInitialText
block parameter. The message also
disappears when you connect the block.
You can add data cursors to a Dashboard Scope block to inspect the displayed signals. The data cursors show when the Dashboard Scope block is selected. With the Dashboard Scope block selected, you can move cursors along the displayed signals to see the data values corresponding to each time sample. When you display two cursors, a box between the cursors along the time axis displays the time difference between the two cursors.
To add data cursors, right-click the Dashboard Scope block. Under the Data Cursors menu, select the number of cursors you want to add.
You can also zoom and pan to inspect your signals. To change zoom and pan modes, right-click the Dashboard Scope block, and select the zoom or pan mode you want.
You can modify the color and line style for signals connected to a Dashboard Scope block from the Connection table in the block dialog box. To modify the appearance of a connected signal:
Click the signal appearance preview for the signal in the Style column of the Connection table.
Choose a signal color from the palette of standard colors or specify a
custom color using RGB
values between
0
and 255
.
Select the line style from the solid, dotted, dashed, and dot-dashed options under the Style section in the signal appearance dialog.
Signal color and line style remain consistent for a signal throughout a model. You can configure the line style and color for a signal through the Instrumentation Properties for a logged signal and through the Dashboard Scope block dialog of a Dashboard Scope block connected to the signal. The Override style and color setting is selected by default and controls whether signal appearance options chosen through that Dashboard Scope block dialog box override signal appearance options configured elsewhere in the model. When you clear the Override style and color setting, changes made using the dialog box for that Dashboard Scope block are not applied.
When you connect signals to a Dashboard Scope block using the block dialog box, the connection table shows the default signal color and line style used for a signal you connect. As you check signals to connect, the Connection table updates the default style and color to be used for the next signal you connect from the remaining signals in the selection.
The Dashboard Scope block displays complex signals according to their Complex Format. You can configure the Complex Format for a signal using the Instrumentation Properties dialog box, accessible when you right-click the logging badge for the signal and select Properties.
A signal can have a Complex Format that is:
Real-Imaginary
Magnitude-Phase
Magnitude
Phase
When you set the Complex Format for a signal to Real-Imaginary or Magnitude-Phase, the Dashboard Scope block displays both components of the signal. The real or magnitude component displays in the color indicated in the Connection table. The imaginary or phase component displays in a different shade of the color indicated in the Connection table.
You cannot use the Connection table to connect a Dashboard block to a block that is commented out. When you connect a Dashboard block to a commented block using connect mode, the Dashboard block does not display the connected value until the you uncomment the block.
The toolstrip does not support dashboard blocks that are in a panel.
Dashboard blocks cannot connect to signals inside referenced models.
When you simulate a model hierarchy, Dashboard blocks inside referenced models do not update.
Dashboard blocks do not support rapid accelerator simulation.
You cannot connect a dashboard block to data or activity in Stateflow® during simulation.
Some signals are removed by optimization and are not available during accelerator mode simulations. To view such a signal using a dashboard block, mark the signal for logging.
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|