Generate c++ code using imported model from Amesim

조회 수: 4 (최근 30일)
Adrian Velasco
Adrian Velasco 2019년 7월 2일
답변: Hari Krishna Ravuri 2019년 7월 17일
Is it possible to generate c++ code in simulink using an imported model from Amesim?

답변 (1개)

Hari Krishna Ravuri
Hari Krishna Ravuri 2019년 7월 17일
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

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by