User`s guide
7 Scope Object Reference
7-8
Using Scope Objects
xPC Target uses scope objects to represent scopes on the target PC. This
section shows some of the common tasks that you use with scope objects.
This section includes the following topics:
•“Displaying Scope Object Properties for a Single Scope”
•“Displaying Scope Object Properties for All Scopes”
•“Setting the Value of a Scope Property”
•“Getting the Value of a Scope Property”
•“Using the Method Syntax with Scope Objects”
Displaying Scope Object Properties for a Single
Scope
To list the properties of a single scope object sc1:
1 In the MATLAB window, type
sc1 = getscope(tg,1) or sc1 = tg.getscopes(1)
MATLAB creates the scope object sc1 from a previously created scope.
2 Type
sc1
The current scope properties are uploaded to the host PC, and then
MATLAB displays a list of the scope object properties with the updated
values. Because
sc1 is a vector with a single element, you could also type,
sc1(1) or sc1([1]).
Note Only scopes with type host store data in the properties
scope_object.Time and scope_object.Data.
For a list of target object properties with a description, see “Target Object
Properties” on page 6-4.