model_initialize - Initialization entry point in generated code for ERT-based Simulink® model

Syntax

void model_initialize(void)
void model_initialize(boolean_T firstTime)

Arguments

firstTime

The Real-Time Workshop® Embedded Coder™ software generates this argument for Simulink models only if the IncludeERTFirstTime model configuration parameter is set to on. Use of the firstTime argument will be discontinued in a future release (see the note below).

Specifies value 0 (FALSE) or 1 (TRUE). If firstTime equals 1, model_initialize initializes rtModel and other data structures private to the model. If firstTime equals 0, model_initialize resets the model's states, but does not initialize other data structures. Call model_initialize with firstTime set to 0 to reset the model's states at a time greater than start time.

Description

The model_initialize function contains all model initialization code. The generated code for a Simulink model calls model_initialize once, at the beginning of model execution.

If the IncludeERTFirstTime model configuration parameter is set to on, the generated code passes in firstTime as 1 (TRUE).

See Also

model_SetEventsForThisBaseStep, model_step, model_terminate

Model Entry Points in the Real-Time Workshop Embedded Coder documentation

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS