Skip to Main Content Skip to Search
Product Documentation

model_terminate - Termination entry point in generated code for ERT-based Simulink model

Syntax

void model_terminate(void)

Description

The Embedded Coder software generates the model_terminate function for a Simulink model when the Terminate function required configuration option is selected (the default) in the Configuration Parameters dialog box. model_terminate contains all model termination code and should be called as part of system shutdown.

When model_terminate is called, blocks that have a terminate function execute their terminate code. If logging is enabled, model_terminate ends data logging.

The model_terminate function should be called only once.

If your application runs indefinitely, you do not need the model_terminate function. To suppress the function, clear the Terminate function required configuration option in the Configuration Parameters dialog box.

See Also

model_initialize | model_SetEventsForThisBaseStep | model_step

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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