User`s guide
xPC Target Scope Blocks
2-13
xPC Target Scope Blocks
Usually scope objects are defined using xPC Target functions or the graphical
interface after downloading your target application. An alternative is for you
to add special xPC Target scope blocks to you Simulink model. These blocks
should not be confused with standard Simulink scope blocks. The xPC Target
scope blocks have unique capabilities when used with xPC Target.
This section includes the following topics:
•“xPC Target Scope Blocks”
•“Adding xPC Target Scope Blocks”
•“Defining xPC Target Scope Block Parameters”
xPC Target Scope Blocks
An xPC Target scope block is added to your model the same way you add any
Simulink block. After adding an xPC Target scope block, you define the
properties of the scope object and the signals you want to display. When the
target application is downloaded to the target PC, the a scope is automatically
created on the target PC. No additional definitions are necessary.
Note The scope object created on the host PC is not assigned to a MATLAB
variable. To assign the scope object, use the target object function
getscope.
Also, if you use the function
remscope to remove a scope created during the
build and download process, and then you restart the target application, the
scope is recreated.
Alternative methods for creating xPC Target scopes — For information on
using xPC Target functions to create scopes, see “Signal Tracing with MATLAB
Commands” on page 3-35. For information on using the xPC Target graphical
interface to create scopes, see “Signal Logging with xPC Target Graphical
Interface” on page 3-20.
Adding xPC Target Scope Blocks
Adding xPC Target scope blocks to your Simulink model saves you the time to
define and select signals after you download the target application to the target
PC, and the information is saved with your model.