Target.Stimulation
Description
A Target.Stimulation
object represents the stimulation of root
inports or Playback blocks of
the model running on the Speedgoat® target computer.
The object provides access to methods that:
Start and stop the root inport or Playback block stimulation.
Pause the root inport or Playback block stimulation.
Return the status of the root inport or Playback block stimulation.
Reload the data signal of the root inport or Playback block.
Creation
A Target.Stimulation
object is created when you create a Target
object
by using the slrealtime
command. After you create and
connect the machine to the Target
object,
you can access the Target.Stimulation
object. This example creates and
connects to Target
object
tg
, and then starts the stimulation of root inports or
Playback blocks on the target computer.
Open the model slrt_ex_osc_inport
and add an extra
inport.
tg = slrealtime; mdlSTF = getSTFName(tg); mdlName = 'slrt_ex_osc_inport'; openExample(mdlName); set_param(mdlName,"SystemTargetFile",mdlSTF); load('slrt_ex_inport_square.mat'); waveform = square; set_param(mdlName,'ExternalInput','waveform'); set_param(mdlName,'LoadExternalInput','on'); set_param(mdlName,'StopTime','Inf');
Build the model. Load the real-time application. Start execution. Start stimulation.
slbuild(mdlName); connect(tg); load(tg,mdlName); start(tg,'StartStimulation','off'); start(tg.Stimulation,'all');
Object Functions
getStatus | Return status of root inports stimulation of model on target computer |
pause | Pause stimulation of root inports of model on target computer |
reloadData | Reload data signal of root inports of model on target computer |
start | Start stimulation of root inports of model on target computer |
stop | Stop stimulation of root inports of model on target computer |
Examples
Version History
Introduced in R2021a