SimulinkRealTime.SignalList

Create and manage signal list objects

Description

example

signalListObjectOut = SimulinkRealTime.SignalList() creates a signal list object.

add(signalListObjectIn,signalSelector) adds a signal to the signal list object, by either a signal name or by a block path with a port index.

remove(signalListObjectIn,signalSelector) removes a signal from the signal list object, by either a signal name or by a block path with a port index.

signalListObjectOut = validate(signalListObjectIn,rtApplication) validates a signal list object.

view(signalListObjectIn) displays the list of signals in a signal list object.

Examples

collapse all

Create a signal list object, mySignals.

mySignals=SimulinkRealTime.SignalList()
mySignals = 

  SignalList with no properties.

For model xpcosc, create a signal list object mySignals, name the signal Integ_out, and add the signal by name to the signal list.

mySignals=SimulinkRealTime.SignalList();
p = get_param('xpcosc/Integrator','PortHandles');
l = get_param(p.Outport,'Line');
set_param(l,'Name','Integ_out');
add(mySignals,'Integ_out');

For model xpcosc, create signal list object mySignals and add the signal by a block path with a port index to the signal list.

mySignals=SimulinkRealTime.SignalList();
add(mySignals,'xpcosc/Integrator',1);

For model xpcosc with named signals Integ_out and Integ1_out, list the signals in the signal list object mySignals.

view(mySignals)
Integ_out
Integ1_out

For input signal list object mySignals that contains named signals Integ_out, Integ1_out, and Integ2_out, check whether the named signals are available in real-time application xpcosc. Any unavailable signals are added to the output signal list object unavailSignals.

unavailSignals=validate(mySignals,'xpcosc');
view(unavailSignals)
Integ2_out

For input signal list object mySignals that contains named signal Integ2_out, remove the signal from the signal list object.

remove(mySignals,'Integ2_out')

Input Arguments

collapse all

The signalListObject argument selects the signal list object that the function modifies by adding or by removing signals.

Example: mySignals

The signalSelector argument identifies the signal that the function adds or removes from the signal list object. You can specify the selector by signalName or by the combination of blockPath,portIndex.

Example: 'Integ_out'

Example: 'xpcosc/Integrator'

The rtApplicationName argument identifies the real-time application that contains the signals listed in the input signal list object. The validation identifies any signals in the input signal list that are not available in the real-time application.

Example: xpcosc

Output Arguments

collapse all

The signalListObjectOut argument selects the signal list object that is created by the SimulinkRealTime.SignalList() function or by the validate() function.

Introduced in R2019a