Matlab/Simulink:如何以编程方式启用外部模式接口
在 Matlab/Simulink 中,你可以在 Simulink 模型加载后使用以下命令序列以编程方式启用外部模式接口:
matlab_enable_external_mode.m
% 启用接口 -> 外部模式
set_param(getActiveConfigSet(gcs), 'ExtMode', 'on')
% 将外部模式传输设置为 TCP/IP
set_param(getActiveConfigSet(gcs), 'ExtModeTransport', Simulink.ExtMode.Transports.getExtModeTransportIndex(getActiveConfigSet(gcs), 'tcpip'))Check out similar posts by category:
Matlab/Simulink
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow