Exporting signal of bus creator blocks to excel.
조회 수: 4 (최근 30일)
이전 댓글 표시
I have a fairly complex model with several subsystems. The number of these subsystems is not fixed, and some have different structures. Each subsystem includes both an input and output stage (which are also subsystems), where multiple signals are aggregated using a bus creator. I would like to automate the process of exporting the names of all signals in the generated buses.
I haven’t found much information on this, except for some MATLAB code that seems to work only if the names of the subsystem containing the bus creator and the bus creator itself are well known.
댓글 수: 0
채택된 답변
praguna manvi
2025년 2월 11일
편집: praguna manvi
2025년 2월 11일
As I see, you are trying to programmatically access the names of all signals aggregated at different "Bus Creator" blocks. To perform this you could use "find_system" function as follows :
busCreators = find_system(bdroot, 'BlockType', 'BusCreator');
The above command finds all "Bus Creator" objects at various levels within the model. By default "find_system" searches at all levels for a "BlockType". The names of input signals or any other properties can be accesed using the "Handle" as followes:
busCreatorHandle = get_param(busCreators{1}, 'Handle'); %first busCreator object
signalNames = get_param(busCreatorHandle, 'InputSignalNames');
For more information on "get_param" and "find_system" functions, refer to the below documentation links:
Hope this helps!
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Subsystems에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!