Simulink code generation utility function

5 visualizaciones (últimos 30 días)
Raymond Gilbert
Raymond Gilbert el 4 de Mzo. de 2019
Respondida: Mark McBroom el 6 de Mzo. de 2019
So, I am generating some C code for a model I have created using some code that I have modified.
The original 'autocoding' scripts produced a .h and .c file called look2_binlxpw
The scipt I have created shoves that look2 inside of the main .h and .c file.
That would normally be okay but the end goal is to provide this code to a customer and when I do so, I would rather have one utility that I can pass forward, since multiple files will end up coding with this look2_bin.
The old code that separated this away from the main function did so using
set_param(subsystem, 'RTWOptions', opts);
Where opts was a huge array of data, but it was set up in there. I am trying to avoid RTWOptions as it is obsolete
rtwtypes, rtgetNaN, rtnonfinite are all created and placed in the project folder. Not sure why this one wont or what the proper parameter for it is.

Respuesta aceptada

Mark McBroom
Mark McBroom el 6 de Mzo. de 2019
If you change the configuration parameter UtilityFunctionGeneration to "Shared location",
set_param(bdroot,'UtilityFuncGeneration', 'Shared location')
then code for blocks such as lookup table blocks will be placed in:
/slprj/ert/_sharedutils

Más respuestas (0)

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by