필터 지우기
필터 지우기

why Code generation with model reference initialize port is not working?

조회 수: 14 (최근 30일)
Ranganatha M
Ranganatha M 2020년 6월 9일
댓글: Binh Huynh Thanh 2022년 6월 20일
I tried to analyze initialize port setting in reference model. During model in loop it works fine but its functionality not understanding. During code generation wit ert.tlc and autosar.tlc it is giving below error :
The top model '__________' contains the model block '________' which has one or more of its Initialize, Reset or Terminate ports enabled. Code generated is not supported for such models.
Need c code for reference model initialize port setting to iinitialize function call subsystem. If we use trigger or enable it holds previous value instead of initial output. But we use initialize port with reference model block holds initial value till next change at output.
  댓글 수: 3
Binh Huynh Thanh
Binh Huynh Thanh 2022년 6월 20일
Hello All,
I have a same issue. But I can not underatand why.
But, it can be in simulation mode only. I can not generate the code using embeded coder packages.
Please help us.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jesús Zambrano
Jesús Zambrano 2020년 10월 23일
Hi Ranganatha and Samir,
Please follow the steps discribed in the following link:
In there you'll find the workflow to generate code for a model that responds to Initialize, Reset and Terminate events.
Hope it helps!
  댓글 수: 2
Samir Revelo
Samir Revelo 2020년 10월 23일
편집: Samir Revelo 2020년 10월 23일
Hello Jesús,
Thanks for your reply.
As I described in my post above I have actually following limitation (you can find this in link you shared above):
I need that my root model generates code which calls reset function of child refence model.
Is any solution going to be provided for this limitation as this is a use case which I need to handle with Simulink?
Thanks in advance.
Jesús Zambrano
Jesús Zambrano 2020년 10월 23일
편집: Jesús Zambrano 2020년 10월 23일
If the child includes explicit ports for Initialize, Reset, Terminate you can't generate code. If you use Initialize, Reset and Terminate function blocks then you can. Outside this workflow you will get a limitation at the moment.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by