Removal of RT_MODEL variables in code generation

Hello,
I am using R2019b ert.tlc file for code generation.
Question: How to remove code generaiton for the RT_MODEL_m variables which are getting generated ?
Apparently something related is asked earlier in below link, but nobody gave the correct answer.
I suggested the below setting as suggested by the STAFF member, but it didnt help.
cs.set_param('CodeInterfacePackaging', 'Nonreusable function'); % Code interface packaging.
Any help will be appreciated !!!

 Respuesta aceptada

Mark McBroom
Mark McBroom el 22 de Abr. de 2020

2 votos

Look in TEST.h. What is in the data structure RT_MODEL_TEST? If there is an error_status variable, you can disable via this configuration parameter:
Thanks.
Mark.

7 comentarios

Nadeem Syed
Nadeem Syed el 22 de Abr. de 2020
Hello,
Yes the TEST.h has a data structure such as below
/* Real-time Model Data Structure */
struct tag_RTM_TEST {
const char_T *errorStatus;
};
I have choosen below configuration
cs.set_param('SuppressErrorStatus', 'off'); % Remove error status field in real-time model data structure
Still these variables shows up in generated code. Any thoughts ?
Mark McBroom
Mark McBroom el 22 de Abr. de 2020
After making the above change, what is in the data structure in TEST.h?
Nadeem Syed
Nadeem Syed el 22 de Abr. de 2020
The structure in TEST.h looks like below
/* Real-time Model Data Structure */
struct tag_RTM_TEST {
const char_T *errorStatus;
};
Mark McBroom
Mark McBroom el 22 de Abr. de 2020
Are you sure SuppressErrorStatus is set to 'off'. Error Status should not be in the tag_RTM_TEST data structure when the setting is 'off'.
Nadeem Syed
Nadeem Syed el 22 de Abr. de 2020
Yes in my configuration SuppressErrorStatus is set to off. Is there any other option which I need to check ?
I will try to post a sample model with my configuration. If that will help to understand the problem.
By any chance did you try this ?
Mark McBroom
Mark McBroom el 22 de Abr. de 2020
I am sorry. SuppressErrorStatus needs to be set to "on".
Nadeem Syed
Nadeem Syed el 23 de Abr. de 2020
ok thanks, it worked.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Deployment, Integration, and Supported Hardware en Centro de ayuda y File Exchange.

Productos

Versión

R2019b

Preguntada:

el 11 de Abr. de 2020

Comentada:

el 23 de Abr. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by