Multibody visualization when using test harness

조회 수: 5 (최근 30일)
Flávio Luiz
Flávio Luiz 2024년 9월 13일
편집: akshatsood 2024년 9월 17일
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
Flávio Luiz
Flávio Luiz 2024년 9월 17일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

akshatsood
akshatsood 2024년 9월 17일
편집: akshatsood 2024년 9월 17일
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.

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by