How can I create Simulink models with tunable runtime Block Parameter?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 28 Nov 2017
Modifié(e) : MathWorks Support Team
le 25 Août 2021
I would like to create a Simulink model with block parameters that can be changed during simulation run time. The parameters can be either in the Base or the Model workspace. How can I achieve this workflow?
Réponse acceptée
MathWorks Support Team
le 25 Août 2021
Modifié(e) : MathWorks Support Team
le 25 Août 2021
One possible way is to use the Simulink Dashboard blocks .
However, Dashboard blocks may not be ideal in all situations. For example, the parameters for the block might be coming from the output of another block. In these cases one can use the concepts of
along with block run time objects.
The attached model changes the Upper Saturation value of the saturation block during run time. The value to change during run time is specified in model workspace as variable 'x'. Run the model, and change the value of 'x' to see the output change for different values of 'x'. See the function changeParam.m to see the implementation of events and listeners to change the parameter.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Control Simulations with Interactive Dashboards dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!