User`s guide
Signal Tracing
3-33
Signal Tracing with xPC Target Scope Blocks
Use scopes of type host to log signal data triggered by an event while your
target application is running. This topic describes how to use the three scope
block types.
Note xPC Target supports ten scopes of type target and host, and eight
scopes of type file, for a maximum of 28 scopes.
Scope of Type Host
For a scope of type host, the scope acquires the first N samples into a buffer.
You can retrieve this buffer into the scope object property
sc.Data. The scope
then stops and waits for you to manually restart the scope.
The number of samples
N to log after triggering an event is equal to the value
you entered in the
Number of Samples parameter.
Select the type of event in the Block Parameters: Scope (xPC Target) dialog box
by setting
Trigger Mode to Signal Triggering, Software Triggering, or
Scope Triggering.
Scope of Type Target
For a scope of type target, logged data (sc.Data, sc.Time, and sc.StartTime)
is not accessible over the command-line interface on the host PC. This is
because the scope object status (
sc.Status) is never set to Finished. Once the
scope completes one data cycle (time to collect the number of samples), the
scope engine automatically restarts the scope. If you create a scope object, for
example,
sc = getscopes(tg,1) for a scope of type target, and then try to get
the logged data by typing
sc.Data, you get an error message:
Scope # 1 is of type 'Target'! Property Data is not accessible.
If you want the same data for the same signals on the host PC while the data
is displayed on the target PC, you need to define a second scope object with type
host. Then you need to synchronize the acquisitions of the two scope objects by
setting
TriggerMode for the second scope to 'Scope'.