Best way to call Simulink subsystem with various input parameters by skript
이전 댓글 표시
Hello community, I have a large Simulink model and want to test a specific subsystem for different inputs by skript. The subsystem block has a lot of input ports (including BUS- signals) and one ouput port. I thought it would be possible to create a "s function" of this subsystem and call the function from a skript. But it seems s functions aren't made for calling from a skript.
Another way would be copy the block to another model and connect the input/output ports with "from/to workspace" blocks. Then calling the new model for each input combination with the "sim" command. I think this way would be time and work intensive.
Is there a better way to "Model In the Loop" subsystem blocks?
greetings
답변 (1개)
Sebastian Castro
2015년 7월 7일
0 개 추천
If possible, you should convert that subsystem into a separate Simulink model. That lets you call the model by itself using the "sim" command, and its input/output ports can be set up in the "Data Import/Export" section of the configuration parameters.
Look at this page for examples of how to load MATLAB workspace data in as bus inputs:
- Sebastian
카테고리
도움말 센터 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!