Is it possible to have a generic bus selector?
3 次查看(过去 30 天)
显示 更早的评论
while selecting the signal from bus selector, we need to go bus selector parameter and need to select the required signal manually. I want a bus selector to be a part of a masked subsystem. The signal to be selected by the bus selector will be given through masked parameter. For e.g. I have two signals 'a' and 'b' as input to bus selector. I will mask this subsystem and will give a mask parameter 'Which signal to select'. User can give either 'a' or 'b' and accordingly bus selector should select the signal. Is it possible? I am using matlab2006b.
Thanks in advance.
0 个评论
采纳的回答
TAB
2012-6-18
Set Index Option as Index vector (dialog) and enter the bus element index value which is to be selected.
[Edited 19 June 2012]
get_param('BusSelectorBlock','InputSignals')
returns the name of the signals present in the bus which is input to the bus selector block and...
set_param('BusSelectorBlock','OutputSignals','SignalName')
sets the signal to be selected as output of bus selector.
Using these two commands in the callbacks of your masked subsystem, you can implement your requirement.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Model Editing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!