We have a model ProjName.slx (a main model with reference models embedded). The reference models run at different rates (2ms, 10ms, 100ms, 1000ms). The autocode produces step functions ProjName_step0, ProjName_step1, ProjName_step2, ProjName_step3. Is there any control over this naming? Where is it set

 채택된 답변

Mark McBroom
Mark McBroom 2022년 4월 25일

0 개 추천

댓글 수: 4

Wayne Munslow
Wayne Munslow 2022년 4월 25일
Thank you for the reply. The link you provided is for 2022a documentation. However, my project has been developed in 2017b and the it appears that the example does not exist in 2017b. Can you help with how to view our code mappings in 2017b?
Wayne Munslow
Wayne Munslow 2022년 4월 25일
Further to the above:
I have found a demo in 2017b (different name) which suggests that the step and initialize function names can be changed within a GUI which is launched by clicking "Configure Model Functions". However, that button is not visible in my project. Do you know what controls whether the button is visible or not?
Mark McBroom
Mark McBroom 2022년 4월 25일
Hi Wayne,
The documentation for this option lists the dependent configuration settings:
  • The button appears only for ERT-based targets with Code interface packaging set to a value other than C++ class.
  • This button requires an Embedded Coder� license when generating code.
  • This button is active only if your model uses an attached configuration set. If your model uses a referenced configuration set, the button is greyed out. If you want to configure a model-specific step function prototype for a referenced configuration set, use the MATLAB� function prototype control functions described in the help section "Configure Function Prototypes Programmatically"
Wayne Munslow
Wayne Munslow 2022년 4월 27일
Hi Mark,
Thanks for your answers. I also found out that, in the 2017b version we are using:
The first requirement is that the system target file is set to ert.tlc (or something derived from ert.tlc) – basically, your model needs to be set up to generate code with Embedded Coder.
After that, there are some limitations for using this feature, and perhaps your model is not compliant with the required settings which is preventing the button from being shown:
For instance: “Function prototype control does not support multitasking models. Multirate models are supported, but you must configure the models for single-tasking.”
I have added this in case it is useful to others who stumble upon the answers

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품

릴리스

R2017b

질문:

2022년 4월 11일

댓글:

2022년 4월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by