在 Simulink 中查看信号是否源自总线
我们有一个在 Simulink 中不支持总线信号的 S-Function,因此我试图以编程方式找到一种方法来确定输入/输出端口的信号类型是否源自总线或前往总线,以便我可以对总线进行解复用和复用根据需要自动发出信号。不幸的是,我能找到的唯一可以可靠地判断端口是否来自总线或前往总线的块属性是它是否从总线继承属性,这可能并非在所有情况下都是如此。关于如何解决这个问题有什么想法吗?
We have an S-Function that does not support bus signals in Simulink, so programmatically I am trying to find a way to determine if the signal type of an inport/outport originates from/is going to a bus so I can demux and mux the signal automatically as needed. Unfortunately, the only block property I can find that reliably tells if the port comes from or goes to a bus is if it inherits properties from the bus, which might not be true in all cases. Any idea on how to figure this out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我从 Matlab 支持人员那里得到了答复,我已经尝试过并测试了它,它有效,唯一的是 Mathworks 建议使用总线选择器而不是 DEMUX 块。简而言之,您要做的就是:
“CompiledBusType”返回“NOT_BUS”、“VIRTUAL_BUS”和“NON_VIRTUAL_BUS”。
希望这个问题可以帮助其他人解决问题,Matlab 等了一周才回复我。
Well, I got an answer back from Matlab support, I have tried this and tested this and it works, the only thing is that Mathworks recommends using a Bus Selector instead of a DEMUX block. In a nutshell, here is what you do:
'CompiledBusType' returns 'NOT_BUS', 'VIRTUAL_BUS', and 'NON_VIRTUAL_BUS'.
Hope this question helps someone else out, had to wait a week for Matlab to get back to me.