Configure model block in simscape

I'm using simscape multibody for modeling some mechanisms, and I'd like to create some library blocks, whose configurations parameters would allow to change the number of istance of some subblocks. Does it exist any way for realizing it? It looks Simulink is more static than scripting, and I don't know exactly how to proceed with.
Cheers,
Soldà Enrico

Réponses (1)

Aquatris
Aquatris le 24 Oct 2024
Modifié(e) : Aquatris le 24 Oct 2024

1 vote

In simulink you can create masked systems with parameters and attach a callback to those parameters. So in the callback you can add however many blocks to the model and make the necessary connections. Not a straightforward thing unless you created simulink models from script before.
See here for how you can use scripts to create simulink models.
See here for intro to mask parameter callbacks

Catégories

En savoir plus sur Simulation and Analysis dans Centre d'aide et File Exchange

Produits

Version

R2023b

Question posée :

le 24 Oct 2024

Modifié(e) :

le 24 Oct 2024

Community Treasure Hunt

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

Start Hunting!

Translated by