You can create a target scope on the target computer using
These scopes have the full capabilities of the Scope block
Target mode, but do not persist past
the current execution.
This procedure uses the model
xpcosc. You must have already completed the
xpcosc. Set property Stop time
inf. On the Real-Time tab, select Run on Target > Stop Time and set Stop Time to
Connect to the target computer. On the Real-Time tab, toggle the Disconnected indicator to Connected.
Build and download the real-time application to the target computer. On the Real-Time tab, click Run on Target.
Open Simulink Real-Time Explorer. On the Real-Time tab, click Prepare > SLRT Explorer.
To configure a target scope:
In the Scopes pane, expand the xpcosc node.
To add a target scope, select Target Scopes and then click the Add Scope button on the toolbar.
The new scope appears under node Target Scopes, for example Scope 1.
Select Scope 1 and then click the Properties button on the toolbar.
In the Scope Properties workspace, click Signals. You add signals from the Applications Signals workspace.
In the Applications pane, expand the real-time application node and then node Model Hierarchy.
Select the model node and then click the View Signals button on the toolbar.
The Signals workspace opens, showing a table of signals with properties and actions.
In the Signals workspace, to add signal
Generator to Scope1, drag signal
Generator to the Scope1 properties
Integrator1 to Scope
1 in the same way.
The dialog box looks like this figure.
To start execution, click the real-time application and then click the Start button on the toolbar.
The application starts running. No output appears on the target computer monitor.
To start Scope 1, click Scope 1 in the Scopes pane and then click the Start Scope button on the toolbar.
Output for signals
Signal Generator and
on the target computer monitor.
To stop Scope 1, click Scope 1 in the Scopes pane and then click the Stop Scope button on the toolbar.
The signals shown on the target computer stop updating while the real-time application continues running. The target computer monitor displays a message like this message:
Scope: 1, set to state 'interrupted'
To stop execution, click the real-time application and then click the Stop button on the toolbar.
The real-time application on the target computer stops running, and the target computer displays messages like these messages:
minimal TET: 0.0000006 at time 0.001250 maximal TET: 0.0000013 at time 75.405500
The target computer screen looks like this figure.
You can create a target scope from the scope types list by clicking Add Scope next to scope type Target Scopes. You can add or remove signals from a target scope while the scope is either stopped or running.
To make both workspaces visible at the same time, drag one workspace tab down until the icon appears in the middle of the dialog box. Continue to drag the workspace until the cursor reaches the required quadrant, and then release the mouse button.
To save your Simulink Real-Time Explorer layout, click File > Save Layout. In a later session, you can click File > Restore Layout to restore your layout.