How do I visualize Mechanics Explorer of referenced models?

21 views (last 30 days)
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...

Answers (1)

Steve Miller
Steve Miller on 25 Oct 2021
Edited: Steve Miller on 25 Oct 2021
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 Comment
Ugo Pattacini
Ugo Pattacini on 10 Mar 2024
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.

Sign in to comment.

Categories

Find more on Simulation and Analysis in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!