Main Content

removeSignal

Remove signal from real-time instrument object

Since R2020b

Description

example

removeSignal(instrument_object,blockPath,portIndex,Name,Value) removes a signal from a real-time instrument object by using the block path and the port index.

example

removeSignal(instrument_object,signalName,Name,Value) removes a signal from a real-time instrument object.

Examples

collapse all

Remove a signal from the real-time instrument object by using the block path and port index.

mldatxfile = 'slrt_ex_pendulum_100Hz.mldatx';
hInst = slrealtime.Instrument(mldatxfile);
addSignal(hInst,'slrt_ex_pendulum_100Hz/cartposition',1);
% . . . hInst streams data
removeSignal(hInst,'slrt_ex_pendulum_100Hz/cartposition',1);

Remove a signal from the real-time instrument object by using the signal name.

mldatxfile = 'slrt_ex_pendulum_100Hz.mldatx';
hInst = slrealtime.Instrument(mldatxfile);
addSignal(hInst,'cartposition');
% . . . hInst streams data
removeSignal(hInst,'cartposition');

Input Arguments

collapse all

To create the instrument object, use the Instrument function.

Example: hInst

For the selected block, gcb returns the full block path name.

Example: slrt_ex_pendulum_100Hz/Pendulum

For the selected signal, the output port index and signal name are visible in the signal hierarchy available in Simulink Real-Time explorer or in the Model Data Editor.

Example: 1

For the selected signal, the port index and signal name are visible in the signal hierarchy available in Simulink Real-Time explorer or in the Model Data Editor.

Example: cartposition

Version History

Introduced in R2020b