Main Content

removeSignal

Remove signal from real-time instrument object

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_tank.mldatx';
hInst = slrealtime.Instrument(mldatxfile);
addSignal(hInst,'slrt_ex_tank/ControlValue',1);
% . . . hInst streams data
removeSignal(hInst,'slrt_ex_tank/ControlValue',1);

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

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

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_tank/ControlValue

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: ControlValueOut

Introduced in R2020b