Is it possible to creat a text list of signal names in a bus?
7 次查看(过去 30 天)
显示 更早的评论
I have several simulink models that I e become responsible for. I'm interested in exporting the names of signals in a selected bus to a spreadsheet. Is this possible? TIA
0 个评论
采纳的回答
Fangjun Jiang
2022-10-28
See if this helps you. Your model must have passed model update (Ctrl+D) without error.
Select a BusSelector block where the input bus is the one you are interested. Run
b=get_param(gcb,'InputSignals')
b includes all the signals in the bus. It may have a hirarchy. Wirte a script to expand it if too many levels.
celldisp(b) will expand all. Copy and paste and do some processing.
2 个评论
Fangjun Jiang
2022-10-31
BusCreator block has only one output, the bus.
If you meant to ask about BusSelector block, then
get_param('BusSelectorBlock','OutputSignalNames')
or get_param('BusSelectorBlock','OutputSignals')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!