Main Content

getSignals

Get real-time application signals

Description

example

sigs_struct = getSignals(app_object) gets the application Signals values as structures in an array. Use the getSignals function to get signal information for signals that are marked for streaming to the Simulation Data Inspector from the Application object.

Examples

collapse all

You can get real-time application signals by using the getSignals function.

Create an application object.

my_app = slrealtime.Application('slrt_ex_param_tuning')
my_app = 

  Application with properties:

    ApplicationName: 'slrt_ex_param_tuning'
          ModelName: 'slrt_ex_param_tuning'
           UserData: []
            Options: [1×1 slrealtime.internal.ApplicationOptions]

Get the application Signals values as structures in an array.

my_sigs = getSignals(my_app)
my_sigs = 

  1×9 struct array with fields:

    BlockPath
    PortIndex
    SignalLabel

View application signals as array elements.

my_sigs(1).BlockPath
ans =

    'slrt_ex_param_tuning/Gain'

Input Arguments

collapse all

Provides access to methods that manipulate the real-time application files.

Output Arguments

collapse all

The Signals values are read-only. The structures in the array are:

  • BlockPath — block path of the signal in the application

  • PortIndex — port index of the signal in the application

  • SignalLabel — label of the signal in the application

Introduced in R2020b