주요 콘텐츠

getAllForSDI

Get a list of instruments in a target object for data in the Simulation Data Inspector

Since R2026a

Description

getAllForSDI(target_object.Instruments) gets a list of instruments in a Target object for data in the Simulation Data Inspector.

example

Examples

collapse all

You can get a list of the instruments that have been added to Target objects for data in the Simulation Data Inspector.

  1. Create target object and connect to target computer. Open model and configure model for target computer. Build model. Create instrument object and add signal from real-time application.

    objTarg = slrealtime;
    connect(objTarg);
    model = 'slrt_ex_osc';
    openExample(model);
    modelSTF = getSTFName(objTarg);
    set_param(model,"SystemTargetFile",modelSTF);
    slbuild(model);
    mldatxname = 'slrt_ex_osc.mldatx';
    objTargInst = slrealtime.Instrument(mldatxname);
    objTargInst.Name = 'TargetInstrument';
    addSignal(objTargInst,'SigGen');
  2. Add an instrument to the Target object for data in the Simulation Data Inspector.

    addForSDI(objTarg.Instruments,objTargInst);
  3. Get a list of instruments in the Target object for data in the Simulation Data Inspector.

    getAllForSDI(objTarg.Instruments)
    ans = 
    
      slrealtime.Instrument handle with properties:
    
                     Enable: 1
                       Name: 'TargetInstrument'
               AxesTimeSpan: Inf
        AxesTimeSpanOverrun: 'scroll'
                Application: '<path omitted>\slrt_ex_osc.mldatx'
                  ModelName: 'slrt_ex_osc'
    
    Signals added by addSignal():
    	SigGen
    
    Signals added by connectScalar():
    
    Signals added by connectLine():
    
    Signals added by connectXYPlot():
    
    Callbacks added by connectCallback():

Input Arguments

collapse all

Object that represents target computer, specified as a Target object. The object provides access to methods that manipulate the target computer properties.

Example: tg

Version History

Introduced in R2026a