Select the type of joint between a multibody system and the world with a variable from the workspace

1 view (last 30 days)
In Simulink, using Simscape blocks, I have a multibody system that is joined to the world with a six degrees of freedom joint. My doubt is: How can I join the system with the world using two joints (6-DOF and a planar joint) and selecting with a workspace variable which joint is going to be active.

Answers (1)

Steve Miller
Steve Miller on 8 Jun 2021
The most common way to do this is using Variant Subsystems.
You add a Variant Subsystem to your model. Inside that Variant Subsystem, you put two subsystems where each subsystem contains the joint you wish to conditionally enable. Follow the steps from the documentation to specify objects in the Workspace to control which is active.
Another option is to use Comment Out, but this will require a MATLAB function to look at your workspace variable and comment out the block you do not want.
--Steve

Categories

Find more on Applications in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!