Main Content


Set final simulation time in external mode platform abstraction layer


errorCode = extmodeSetFinalSimulationTime(finalTime); sets the final simulation time of the model in the external mode platform abstraction layer.

In the main function of your external mode target application, before extmodeInit, you can call extmodeSetFinalSimulationTime to set the final simulation time if:

  • You do not want to use extmodeParseArgs.

  • Your target hardware does not support parsing of command-line arguments but you want to override StopTime from the target application.

extmodeGetFinalSimulationTime and extmodeSetFinalSimulationTime are complementary functions.

Input Arguments

collapse all

Final simulation time of model.

Output Arguments

collapse all

Error code, returned as an extmodeErrorCode_T enumeration with one of these values:

  • EXTMODE_SUCCESS (0) –– No error detected.

  • EXTMODE_INV_ARG (-1) –– Arguments invalid.

Version History

Introduced in R2018a