Dynamically create a bus testing harness in Simulink

버전 1.0.0.1 (5.83 KB) 작성자: Adam Filion
Dynamically create a test harness in Simulink given a bus object with arbitrary underlying structure
다운로드 수: 659
업데이트 날짜: 2016/9/1

라이선스 보기

This script will dynamically create a test harness in Simulink for a bus object of arbitrary nesting structure. To use the script just update the first two lines of the Initialization section to use the name of your main bus object.
The script works by starting with the top level bus object and looping through its elements. For any elements that are not bus objects, it will add a Constant block to the model and copy over the data type and signal size. For elements that are nested bus objects, it adds a Bus Creator block, sets it to use the bus object as a nonvirtual bus, and increments a counter to loop back through the new bus's elements. Each new block is connected to the Bus Creator above it in the hierarchy when it is added to the model. The blocks are then repositioned for visual clarity. Finally the model is updated to check if there were any problems with the setup.

A mat file with a sample set of nested bus objects is included. Load the mat file into the workspace then run the script to see it work with the sample bus objects.

인용 양식

Adam Filion (2024). Dynamically create a bus testing harness in Simulink (https://www.mathworks.com/matlabcentral/fileexchange/37232-dynamically-create-a-bus-testing-harness-in-simulink), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2012a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Inputs에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.1

Updated license

1.0.0.0