matlab - Simulink 到 TargetLink 端口的转换
问题描述
我正在尝试用目标链接块(输入和输出)替换 Simulink 块。这些 TL Inports 和 Outports 存在于 TARGET 链接库中。
expModel = gcs;
Inports= find_system(expModel,'LookUnderMasks','all','FollowLinks','on','Regexp','on','SearchDepth',1,'BlockType','Inport');
Inports_Handle = get_param(Inports,'handle');
NewTL_Inport = replace_block(Inports_Handle,'Inport','tllib/InPort');
% Replace the user selected subsytem for Simulink I/O By Target Link I/O
Outports = find_system(expModel,'LookUnderMasks','all','SearchDepth',1,'LookUnderMasks','all','FollowLinks','on','BlockType','Outport');
Outports_Handle = get_param(Outports,'handle');
NewTL_Outport = replace_block(Outports_Handle,'Outport','tllib/OutPort');
- 此外,我面临 Outport 的错误“系统必须是有效的模型或子系统名称”-(原因可能是我要替换的输出端口连接到开关块而不是子系统)
- 有没有其他方法可以代替使用替换块功能
- 观察 - 模型中的 Inport 被替换。
谢谢你的支持。
解决方案
推荐阅读
- reactjs - React 使用 Redux-form , post 方法
- watson-assistant - IBM Watson 工作区编排
- javascript - 当事件附加到文档时,获取 elem 的 id
- python - 运行 Python 程序时出错(新手)
- python - django,以可视形式将对象从数据库获取到模板
- java - log4j 文件随机进入桌面
- javascript - 使用 USB 数据线从 Beacon 读取/写入数据
- android - 如何在启动另一个设备之前等待设备完成最后一个 adb 命令?
- php - PHP在两个字符串之间获取字符串
- ios - 按单词包装 UILabel 并以编程方式扩展 UITableViewCell 高度