Generate c++ code using imported model from Amesim

20 vues (au cours des 30 derniers jours)
Adrian Velasco
Adrian Velasco le 2 Juil 2019
Is it possible to generate c++ code in simulink using an imported model from Amesim?

Réponses (1)

Hari Krishna Ravuri
Hari Krishna Ravuri le 17 Juil 2019
Hi,
I understand that, you are trying to generate C++ code for a Simulink Project which uses an imported model from Simcenter Amesim. Using Amesim model in Simulink depends on the Hardware on which you are going to deploy. If the Hardware is compatible with both the Simulink and the imported Amesim model, then it is possible to generate C++ code for your Simulink Project. Amesim model cannot be imported into Simulink directly, for this Amesim provides an Amesim/Simulink interface by which you can construct a model of subsystem in Amesim and convert it into Simulink S-Function. This conversion can be achieved by “Interface Icon Block” in Amesim. Once the S-Function was generated, you can easily include in your Simulink Project. Then you can generate C++ code for your Simulink Project.
Please refer to the following documentations.
  1. https://www.mathworks.com/help/simulink/sfg/what-is-an-s-function.html
  2. https://www.mathworks.com/matlabcentral/answers/353253-how-do-i-generate-c-code-for-a-simulink-model-that-is-callable-from-c
  3. https://www.mathworks.com/help/dsp/ug/generate-c-code-from-simulink-model.html

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by