Azzera filtri
Azzera filtri

How to generate C code from Simscape

12 visualizzazioni (ultimi 30 giorni)
Majid Fard
Majid Fard il 29 Ott 2019
Risposto: Vimal Rathod il 12 Nov 2019
I have built up a power system model that only contains Simscape blcoks (e.g. Transmission PI model, voltage source). Is it possible to compile this simscape model to C code? later I would like to run the C coe in Dspace hardware in loop simulator?
This is quite straighforward if the model only consists of normal simulink block but it seems it wont work as easy as that for physical blocks.
Any help is much appreciated.

Risposte (1)

Vimal Rathod
Vimal Rathod il 12 Nov 2019
Hi,
You could use simulink coder to generate C code from simulink as well as simscape models. The physical models will be coded according to the equations which describe their attributes.
You could refer to the following link for additional details on code generation on simscape and its limitations.
Use the above link and the links inside it to leverage the contents about simscape.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by