Main Content

getSignals

Get real-time application signals

Since R2020b

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.

  1. 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]
  2. 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
  3. 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

Version History

Introduced in R2020b