Simulink code generation utility function

7 Ansichten (letzte 30 Tage)
Raymond Gilbert
Raymond Gilbert am 4 Mär. 2019
Beantwortet: Mark McBroom am 6 Mär. 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.

Akzeptierte Antwort

Mark McBroom
Mark McBroom am 6 Mär. 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

Weitere Antworten (0)

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by