Best way to call Simulink subsystem with various input parameters by skript
Ältere Kommentare anzeigen
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
Antworten (1)
Sebastian Castro
am 7 Jul. 2015
0 Stimmen
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
Kategorien
Mehr zu Simulink Functions finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!