Multibody visualization when using test harness

5 Ansichten (letzte 30 Tage)
Flávio Luiz
Flávio Luiz am 13 Sep. 2024
Bearbeitet: akshatsood am 17 Sep. 2024
Hi there,
I have a plan model (on system composer) with have some simscape components, a multibody component and simulink component (which is the controller loop).
All of this works perfectly when I ran on system composer level. But I created a test harness to support the test scenarios and test case as well. I this format, with test harness, the multibody visualization does not works.
Any workaround for this?
  1 Kommentar
Flávio Luiz
Flávio Luiz am 17 Sep. 2024
For more clarification, this is the issue:
Warning: Simscape Multibody visualization using Mechanics Explorer is not supported for models using model reference. Turn off visualization in the Simscape Multibody:Explorer configuration pane of the referenced model 'RearHitch_FullPlantModel_Composer'. Resolve this issue in order to remove the warning.
So, my question is if there is any workaround.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

akshatsood
akshatsood am 17 Sep. 2024
Bearbeitet: akshatsood am 17 Sep. 2024
The issue you are facing arises because Simscape Multibody visualization using Mechanics Explorer is not supported when using model references. This is a known limitation, and the warning you are receiving is a direct consequence. However, there are several workarounds you can consider for this:
1. Disable Visualization in the Referenced Model - As the warning suggests, you can turn off the visualization in the Simscape Multibody Explorer configuration pane of the referenced model. This will remove the warning, but you won't be able to visualize the multibody dynamics.
2. Use Logging for Visualization - Instead of Mechanics Explorer, you can log simulation data and use it to visualize the results post-simulation. MATLAB has function like "smwritevideo" for creating animations from logged data.
3. Switch to a Top-Level Model for Visualization - If possible, run the simulation from a top-level model that does not use model references for the multibody component. This way, you can still use Mechanics Explorer for visualization.
4. Custom Visualization - Create a custom visualization using MATLAB graphics or Simulink 3D Animation. This approach requires more effort but can provide flexibility in how the results are visualized.
These workarounds involve some trade-offs between ease of use and the ability to visualize the model. You can choose the one that best fits your needs and workflow.
Please refer to the documentation linked below for better understanding.
I hope this helps.

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by