Converting Simscape Models to C Code

With Simscape you can convert your models into C code, enabling you to use the accelerator modes of Simulink to reduce simulation time. You can also convert Simscape models into C code using Real-Time Workshop, which lets you:

  • Run your model in real time, enabling you to perform HIL testing
  • Integrate your model into other simulation environments
  • Compile your Simscape model for standalone simulations, which accelerate analyses like parameter studies and Monte Carlo simulations

Converting Simscape models to C code 4:30
A standalone executable is created from the model to accelerate a set of simulations where parameter values are varied.

Configuring your models to run in real time enables you to use hardware-in-the-loop testing instead of expensive prototypes to test your system. You can find mistakes earlier in the development process, reducing costs and shortening the design cycle.

Using HIL testing instead of hardware prototypes to test control algorithms 5:21
A Simulink model incorporating blocks from MathWorks physical modeling products is converted to C code and downloaded onto a Bachmann electronic M1 hardware controller.

Real-Time Simulation of Physical Systems Using Simscape

View webinar