Simscape Block Parameter not Tunable

I wish to control a Simscape block parameter using the dashboard slider switch.
I select Temperature Source, but the slider switch does not recognize it as having a tunable parameter.
The only block I can link the switch to is the scope!
Are the dashboard elements not compatible with simscape ones?

 Respuesta aceptada

Pratyush Roy
Pratyush Roy el 11 de En. de 2022

0 votos

Hi Matthew,
Simscape run-time parameters are run-to-run tunable. Therefore, for Dashboard blocks linked to Simscape blocks, changing the dials during simulation does not affect the simulation results.
To use Dashboard blocks for run-to-run tuning of Simscape block parameters, we can designate the parameter as Run-time configurable, associate it with a workspace variable, and link the Dashboard block to the workspace variable. The link here might be helpful for more information.
Hope this helps!

3 comentarios

Matthew Mishrikey
Matthew Mishrikey el 11 de En. de 2022
Editada: Matthew Mishrikey el 11 de En. de 2022
I'm okay with having it so that the user sets the dashboard blocks first, then runs the sim. The settings don't need to be adjustable during the running.
Does it still then need to be "run-time" configurable? Seems rather slow that way, so if it could happen without setting to run-time that would be faster.
How do "link a dashboard block to a workspace variable"? I can only see how to connect them to other blocks.
Pratyush Roy
Pratyush Roy el 12 de En. de 2022
Hi Matthew,
Currently setting a Simscape parameter to any other configuration other than "run-time" and then connecting it to a Dashboard block is a limitation. The issue of tuning Simscape Variables using Dashboard blocks is a known one and our developers will try to fix it in a future release.
To link a dashboard block to a workspace variable, consider defining a variable, say T, in the base workspace and set the Parameter value for temperature in the Temperature Source as T. Then the dashboard blocks can be linked to the variable T. Please refer to the image file attached for reference,
Hope this helps!
I went to matlab workspace and wrote
ambT = 273.15
Then I changed the Temperature parameter of the temperature source to ambT.
Then I tried to connect the slider switch to the temperature source, but it does not recognize the temp source to have tunable parameters.
Then I tried to change the simscape preferences to show the run-time parameter setting, and I changed the Temperature parameter of the source to be run-time.
Then when I connect the the slider switch to the source, it recognizes the connection. However if I try to toggle the slider switch, the connection breaks.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Versión

R2021a

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by