I have a model which is doing:
output = input + par_init + par_edit
- par_edit: shall be tunable, to set this value externaly before running the generated code.
- par_init, is calculated from the first parameter par_edit, and defined in Simulink in the Model-Callback InitFcn.
The generated code looks like
/* Model step function */void ModelInit_step(void){ModelInit_Y.Out1 = (ModelInit_U.In1 + 6.123233995736766E-17) + par_edit;}/* Model initialize function */void ModelInit_initialize(void){}
How can I have Model InitFcn Callback generated in model Init function?
Best Answer