How to resolve code generation errors when Simulink functions have multiple instances
I am trying to generate code for a Simulink model where multiple model reference blocks refer to a single model. I would like to ask about the error I'm encountering. Below is the error message (some characters have been replaced):
Error:
Model 'model_xxxxxxxx', which is not an Export Function model, may not generate reusable code because it contains scoped Simulink function 'f_rand_yyyyy' which generates reusable code. Ensure that the model 'model_xxxxxxx' is an Export Function model to generate reusable code or Consider setting the model configuration parameter 'Code interface packaging' to 'Nonreusable function' and 'Total number of instances allowed per top model' to 'One'.
Recommended actions:
Consider setting the model configuration parameter 'Code interface packaging' to 'Nonreusable function'.
Consider setting the model configuration parameter 'Total number of instances allowed per top model' to 'One'.
① The referenced model uses a Simulink Function. Can I assume that is the cause of this error?
I referred to the following MATLAB documentation:
https://jp.mathworks.com/help/rtw/ug/code-generation-limitations-for-model-reference.html
Akzeptierte Antwort
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!