How do I visualize Mechanics Explorer of referenced models?

21 次查看(过去 30 天)
I'm trying to run a Simscape multibody model as a referenced model. To be clear, my parent model is a simple simulink model whereas the referenced model contains a physical system modeled with simscape multibody blocks.
When run from the parent model, the simulation works as expected, but the Mechnics Explorer does not open. I found that this is a known issue (https://it.mathworks.com/help/physmod/sm/ug/find-and-fix-simulation-issues.html):
"No visualization in models with Model blocks. Models with Model blocks (often referred to as referenced models) simulate without visualization. During simulation, Simscape Multibody software issues a warning at the MATLAB® command line. If previously closed, The Mechanics Explorer visualization utility does not open."
I was wondering if there is any known workaround and/or solution to such an issue...

回答(1 个)

Steve Miller
Steve Miller 2021-10-25
编辑:Steve Miller 2021-10-25
Through release R2021b, you cannot visualize the simulation results within the Mechanics Explorer of a referenced model.
Some options:
  1. Save your Multibody model within a library instead of a Model Reference.
  2. Save your Multibody model within a Subsystem Reference instead of a Model Reference.
  3. Within the Multibody model, sense key quantities, output those values, and use them to drive a separate animation (could be in the Mechanics Explorer or some other rendering tool).
  4. Have a separate model where the Simscape Multibody model is not within a Model Reference for reviewing animations of specific input sequences.
--Steve
  1 个评论
Ugo Pattacini
Ugo Pattacini 2024-3-10
I followed suggestion number 4 in my case although I must say that when authoring system architectures that include physical behaviors it turns to be quite cumbersome to rely on these workarounds, especially when creating test harnesses out of the main architecture.
I really hope that this limitation will be taken into account in the next releases.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulation and Analysis 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by