Simscape™ Multibody™ supports code generation through Simulink® Coder™. You can generate C/C++ code from a Simscape Multibody model to accelerate simulation in the Simulink environment or to deploy a model onto external hardware. Model deployment requires an active Simulink Coder license while simulation acceleration does not.
Code Generation Applications
Simulink can generate C/C++ executable code to shorten simulation time. Two simulation modes rely on code generated from a model:
Simscape Multibody supports the two accelerator modes. You can access the simulation accelerator modes from the Debug tab. Accelerator modes do not require additional Simulink code generation products.
Simulation accelerator modes do not support model visualization.
When you simulate a Simscape
Multibody model in
Accelerator modes, Mechanics Explorer does not open
with a 3-D display of your model.
With Simulink Coder, you can generate standalone C/C++ code for deployment outside the Simulink environment. The code replicates the source Simscape Multibody model. You can use the stand-alone code for applications that include:
Hardware-In-Loop (HIL) testing
Software-In-Loop (SIL) testing
Simscape Multibody supports, but does not perform, code generation for model deployment. Code generation for model deployment requires the Simulink Coder product.