How to identify buses used within a model
조회 수: 19 (최근 30일)
이전 댓글 표시
I am trying to create a script that will list all dependencies of a simulink model. So far I have successfully managed to list all referenced models and all library links within a model, however I cannot figure out how to list all bus definitions that are used within the model. Has anyone got any ideas?
cheers,
andy
댓글 수: 0
채택된 답변
ES
2013년 10월 23일
find_system(ModelName,'BlockType','BusCreator'); Be sure to turn follow links, look under mask in your find system query..
댓글 수: 2
ES
2013년 10월 24일
You can find any property of any component in a simulink model. For the Bus Creators and Bus selectors, there will Ports property. Using the Ports property you can reach the destinations or sources and find their datatypes. It is always possible..
추가 답변 (1개)
Duke
2013년 10월 24일
lines = find_system(bdroot, 'FindAll', 'on', 'Type', 'line');
for ii = 1:length(lines)
lineObject = get_param(get_param(lines(ii), 'SrcPortHandle'), 'SignalHierarchy');
if ~isempty(lineObject.BusObject)
% Do work
end
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Dependency Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!