xPC Target | ![]() ![]() |
Gets a scope object pointing to a scope already defined in the kernel
Syntax
scope _object_vector = getscope(target_object, scope_index) scope_object_vector = target_object.getscope(scope_index)
Arguments
Description
Method of a target object. Returns a scope object vector. If you try to get an nonexistent scope, the result is an error. The list of existing scopes may be retrieved using the method get(target_object, 'scopes') or target_object.scopes.
Examples
If your Simulink model has an xPC Target scope block, a scope of type target is created at the time the target application is downloaded to the target PC. To change the number of samples, you need to create a scope object and then change the scope object property NumSamples.
sc1 = getscope(tg,1) or sc1 = tg.getscope(1) sc1.NumSample = 500
To get the properties of all scopes on the target PC and create a vector of scope objects on the host PC. If the target object has more than one scope, creates a vector or scope objects.
scvector = getscope(tg)
See Also
The xPC Target target object methods addscope
and remscope
. The xPC target M-file demo scripts listed in xPC Target Demos.
![]() | getparamid | getsignalid | ![]() |