cgsl_0404: Model startup and shutdown events by using Initialize Function and Terminate Function blocks for component deployment - MATLAB & Simulink (original) (raw)
Main Content
ID: Title | cgsl_0404: Model startup and shutdown events by using Initialize Function and Terminate Function blocks for component deployment |
---|---|
Description | To model startup and shutdown behavior, useInitialize Function and Terminate Function blocks. |
Notes | By following this guideline, the code generator produces one initialize function and one terminate function.When a Terminate Function block is not needed in the model, clear model configuration parameter Terminate function required (IncludeMdlTerminateFcn). |
Rationale | Decouples the execution order of component initialize and terminate functions from the execution order across components.Separates component startup and shutdown functionality from periodic and aperiodic algorithm function code. |
Model Advisor Check | Verify this guideline by using Model Advisor checkCheck Startup and Shutdown Event (Embedded Coder). |
Examples | ![]() |