This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

start (hostScope)

Start execution of host scope on target computer

Syntax

scope_object_vector = start(scope_object_vector)

Description

example

scope_object_vector = start(scope_object_vector) starts one or more scopes on the target computer. Data acquisition depends on the trigger settings.

At the target computer command line, you can use the commands:

startscope scope_index
startscope all
If you use the keyword all at the command line, the kernel starts all of the scopes.

Examples

collapse all

Start scope 1. The model is xpcosc.

Get the object that represents scope 1.

tg = slrt;
sc1 = getscope(tg,1);

Start scope 1.

scope_object_vector = start(sc1)
scope_object_vector = 

Simulink Real-Time Scope
   Application          = xpcosc
   ScopeId              = 1
   Status               = Pre-Acquiring
   Type                 = Host
   NumSamples           = 250
   NumPrePostSamples    = 0
   Decimation           = 1
   TriggerMode          = FreeRun
   TriggerSignal        = 3  : Integrator
   TriggerLevel         = 0.000000
   TriggerSlope         = Either
   TriggerScope         = 1
   TriggerSample        = 0
   Signals              = 3  : Integrator

Start scopes 2 and 3.

Get the objects that represent scopes 2 and 3.

tg = slrt;
sc2 = getscope(tg,2);
sc3 = getscope(tg,3);

Start the scopes.

scope_object_vector = start([sc2 sc3])
scope_object_vector =
 
Simulink Real-Time Scope
   Application          = xpcosc
   ScopeId              = 2
   Status               = Pre-Acquiring
   Type                 = Host
   NumSamples           = 250
   NumPrePostSamples    = 0
   Decimation           = 1
   TriggerMode          = FreeRun
   TriggerSignal        = 3  : Integrator
   TriggerLevel         = 0.000000
   TriggerSlope         = Either
   TriggerScope         = 2
   TriggerSample        = 0
   Signals              = 3  : Integrator
                          5  : Signal Generator
                          4  : Integrator1

 Simulink Real-Time Scope
   Application          = xpcosc
   ScopeId              = 3
   Status               = Pre-Acquiring
   Type                 = Host
   NumSamples           = 250
   NumPrePostSamples    = 0
   Decimation           = 1
   TriggerMode          = FreeRun
   TriggerSignal        = 3  : Integrator
   TriggerLevel         = 0.000000
   TriggerSlope         = Either
   TriggerScope         = 3
   TriggerSample        = 0
   Signals              = 3  : Integrator
                          5  : Signal Generator
                          4  : Integrator1

Start all of the scopes on the target computer.

Get all of the scopes.

tg = slrt;
allscopes = getscope(tg);

Start the scopes.

scope_object_vector = start(allscopes)
scope_object_vector = 

Simulink Real-Time Scope
   Application          = xpcosc
   ScopeId              = 1
   Status               = Pre-Acquiring
   Type                 = Host
   NumSamples           = 250
   NumPrePostSamples    = 0
   Decimation           = 1
   TriggerMode          = FreeRun
   TriggerSignal        = 3  : Integrator
   TriggerLevel         = 0.000000
   TriggerSlope         = Either
   TriggerScope         = 1
   TriggerSample        = 0
   Signals              = 3  : Integrator

Simulink Real-Time Scope
   Application          = xpcosc
   ScopeId              = 2
   Status               = Pre-Acquiring
   Type                 = Host
   NumSamples           = 250
   NumPrePostSamples    = 0
   Decimation           = 1
   TriggerMode          = FreeRun
   TriggerSignal        = 3  : Integrator
   TriggerLevel         = 0.000000
   TriggerSlope         = Either
   TriggerScope         = 2
   TriggerSample        = 0
   Signals              = 3  : Integrator
                          5  : Signal Generator
                          4  : Integrator1

Simulink Real-Time Scope
   Application          = xpcosc
   ScopeId              = 3
   Status               = Pre-Acquiring
   Type                 = Host
   NumSamples           = 250
   NumPrePostSamples    = 0
   Decimation           = 1
   TriggerMode          = FreeRun
   TriggerSignal        = 3  : Integrator
   TriggerLevel         = 0.000000
   TriggerSlope         = Either
   TriggerScope         = 3
   TriggerSample        = 0
   Signals              = 3  : Integrator
                          5  : Signal Generator
                          4  : Integrator1

Input Arguments

collapse all

Get a scope object by calling the target object methods SimulinkRealTime.target.addscope or SimulinkRealTime.target.getscope.

Output Arguments

collapse all

This vector is the same as scope_object_vector, but with the changes that were made by the function call.

Introduced in R2014a