主要内容

本页采用了机器翻译。点击此处可查看英文原文。

removeSignal

从实时仪表对象中移除信号

说明

removeSignal(instrument_object,blockPath,portIndex,Name,Value) 通过模块路径和端口索引,从实时仪表对象中移除一个信号。

示例

removeSignal(instrument_object,signalName,Name,Value) 将一个信号从实时仪表对象中移除。

示例

示例

全部折叠

使用模块路径和端口索引,从实时仪表对象中移除一个信号。

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

使用信号名称从实时仪表对象中移除一个信号。

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

输入参数

全部折叠

要创建仪表对象,请使用 Instrument 函数。

示例: hInst

对于选定的模块,gcb 返回完整的模块路径名称。

示例: slrt_ex_pendulum_100Hz/Pendulum

对于所选信号,其输出端口索引和信号名称可在 Simulink Real-Time 探索器或模型数据编辑器中的信号层次结构中查看。

示例: 1

对于所选信号,端口索引和信号名称可在 Simulink Real-Time explorer 或模型数据编辑器中的信号层次结构中查看。

示例: cartposition

版本历史记录

在 R2020b 中推出