Code Generation Applications
Code Generation Overview
Simscape™ Multibody™supports code generation through Simulink®Coder™. You can generate C/C++ code from aSimscape Multibodymodel 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
Simulation Acceleration
Simulink can generate C/C++ executable code to shorten simulation time. Two simulation modes rely on code generated from a model:
Accelerator
Rapid Accelerator
Simscape Multibodysupports the two accelerator modes. You can access the simulation accelerator modes from theDebugtab. Accelerator modes do not require additional Simulink code generation products.
Note
模拟加速器模式不支持模型金宝appvisualization. When you simulate aSimscape Multibodymodel inAccelerator
orRapid Accelerator
modes, Mechanics Explorer does not open with a 3-D display of your model.
Model Deployment
With Simulink Coder, you can generate standalone C/C++ code for deployment outside the Simulink environment. The code replicates the sourceSimscape Multibodymodel. You can use the stand-alone code for applications that include:
Hardware-In-Loop (HIL) testing
Software-In-Loop (SIL) testing
Rapid prototyping
Note
Simscape Multibodysupports, but does not perform, code generation for model deployment. Code generation for model deployment requires the Simulink Coder product.